132 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
|
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
|
|
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
/*
|
|
|
15 |
* Créé le 6 mars 2012
|
|
|
16 |
*/
|
|
|
17 |
package org.openconcerto.erp.preferences;
|
|
|
18 |
|
|
|
19 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
|
|
20 |
import org.openconcerto.erp.core.sales.invoice.report.MailRelanceCreator;
|
|
|
21 |
import org.openconcerto.sql.Configuration;
|
|
|
22 |
import org.openconcerto.sql.preferences.SQLPreferences;
|
|
|
23 |
import org.openconcerto.ui.preferences.JavaPrefPreferencePanel;
|
|
|
24 |
import org.openconcerto.ui.preferences.PrefView;
|
|
|
25 |
import org.openconcerto.utils.PrefType;
|
|
|
26 |
|
|
|
27 |
public class MailRelancePreferencePanel extends JavaPrefPreferencePanel {
|
|
|
28 |
public static String MAIL_RELANCE_DATE_PATTERN = "MailRelanceDatePattern";
|
|
|
29 |
public static String MAIL_RELANCE = "MailRelance";
|
|
|
30 |
public static String MAIL_RELANCE_OBJET = "MailRelanceObjet";
|
|
|
31 |
|
|
|
32 |
public MailRelancePreferencePanel() {
|
|
|
33 |
super("Email de relance client", null);
|
|
|
34 |
setPrefs(new SQLPreferences(((ComptaPropsConfiguration) Configuration.getInstance()).getRootSociete()));
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
@Override
|
|
|
38 |
protected void addViews() {
|
|
|
39 |
|
|
|
40 |
PrefView<String> viewExpandDate = new PrefView<String>(PrefType.STRING_TYPE, "Format des dates", MAIL_RELANCE_DATE_PATTERN);
|
|
|
41 |
PrefView<String> viewExpandObjet = new PrefView<String>(PrefType.STRING_TYPE, "Objet du mail de relance", MAIL_RELANCE_OBJET);
|
|
|
42 |
PrefView<String> viewExpandNom = new PrefView<String>(PrefType.STRING_TYPE, 2048, "Contenu du mail de relance", MAIL_RELANCE);
|
|
|
43 |
viewExpandDate.setDefaultValue("dd/MM/yyyy");
|
|
|
44 |
MailRelanceCreator mailCreator = new MailRelanceCreator();
|
|
|
45 |
viewExpandNom.setDefaultValue(mailCreator.getDefaultValue());
|
|
|
46 |
viewExpandObjet.setDefaultValue(mailCreator.getDefaultObject());
|
|
|
47 |
this.addView(viewExpandDate);
|
|
|
48 |
this.addView(viewExpandObjet);
|
|
|
49 |
this.addView(viewExpandNom);
|
|
|
50 |
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
}
|