aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-10-16 20:09:40 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-10-16 20:09:40 +0200
commit8d417057d38d56510a1d3d2e39381a1df3dd96ee (patch)
tree26e2d71409bdb10a5fefad1b538af583e984b776 /id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java
parenta7c22b659f5bc760cb46d5892409dab12cc047d6 (diff)
downloadmoa-id-spss-8d417057d38d56510a1d3d2e39381a1df3dd96ee.tar.gz
moa-id-spss-8d417057d38d56510a1d3d2e39381a1df3dd96ee.tar.bz2
moa-id-spss-8d417057d38d56510a1d3d2e39381a1df3dd96ee.zip
@ConfigWebTool
--add JS ColorPicker to select colors easier --add BKUSelectionFrom preview --add useMandate checkbox --change position of some checkboxes in OA configuration @MOAID lib --change API of BKUFormCustomization utils
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java79
1 files changed, 64 insertions, 15 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java
index 0d13de3fe..6c90ac89a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java
@@ -1,12 +1,15 @@
package at.gv.egovernment.moa.id.configuration.data;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType;
import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
+import at.gv.egovernment.moa.id.util.FormBuildUtils;
import at.gv.egovernment.moa.util.MiscUtil;
public class FormularCustomization {
@@ -27,13 +30,17 @@ public class FormularCustomization {
private String appletRedirectTarget = null;
public static List<String> appletRedirectTargetList = null;
+
+ public static List<String> fontTypeList = null;
+ public String fontTypeListValue = null;
public FormularCustomization() {
appletRedirectTargetList = Arrays.asList("","_blank","_self","_parent","_top");
+ fontTypeList = Arrays.asList("","Verdana","Geneva","Arial","Helvetica","sans-serif","Times New Roman");
+ Collections.sort(fontTypeList);
}
-
-
- public void parse(OnlineApplication dbOAConfig) {
+
+ public void parse(OnlineApplication dbOAConfig, Map<String, String> map) {
AuthComponentOA auth = dbOAConfig.getAuthComponentOA();
if (auth != null) {
@@ -42,41 +49,61 @@ public class FormularCustomization {
BKUSelectionCustomizationType formcustom = templates.getBKUSelectionCustomization();
if (formcustom != null) {
- if (formcustom.isMandateLoginButton() != null)
+ if (formcustom.isMandateLoginButton() != null) {
showMandateLoginButton = formcustom.isMandateLoginButton();
+ }
- if (formcustom.isOnlyMandateLoginAllowed() != null)
+ if (formcustom.isOnlyMandateLoginAllowed() != null) {
onlyMandateAllowed = formcustom.isOnlyMandateLoginAllowed();
+ }
if (MiscUtil.isNotEmpty(formcustom.getAppletRedirectTarget()))
appletRedirectTarget = formcustom.getAppletRedirectTarget();
- if (MiscUtil.isNotEmpty(formcustom.getBackGroundColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getBackGroundColor())) {
backGroundColor = formcustom.getBackGroundColor();
+ map.put(FormBuildUtils.MAIN_BACKGROUNDCOLOR, formcustom.getBackGroundColor());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColor())) {
button_BackGroundColor = formcustom.getButtonBackGroundColor();
-
- if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColorFocus()))
+ map.put(FormBuildUtils.BUTTON_BACKGROUNDCOLOR, formcustom.getButtonBackGroundColor());
+ }
+
+ if (MiscUtil.isNotEmpty(formcustom.getButtonBackGroundColorFocus())) {
button_BackGroundColorFocus = formcustom.getButtonBackGroundColorFocus();
+ map.put(FormBuildUtils.BUTTON_BACKGROUNDCOLOR_FOCUS, formcustom.getButtonBackGroundColorFocus());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getButtonFontColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getButtonFontColor())) {
button_FrontColor = formcustom.getButtonFontColor();
+ map.put(FormBuildUtils.BUTTON_COLOR, formcustom.getButtonFontColor());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getFontType()))
+ if (MiscUtil.isNotEmpty(formcustom.getFontType())) {
fontType = formcustom.getFontType();
+ map.put(FormBuildUtils.FONTFAMILY, formcustom.getFontType());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getFrontColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getFrontColor())) {
frontColor = formcustom.getFrontColor();
+ map.put(FormBuildUtils.MAIN_COLOR, formcustom.getFrontColor());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getHeaderBackGroundColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getHeaderBackGroundColor())) {
header_BackGroundColor = formcustom.getHeaderBackGroundColor();
+ map.put(FormBuildUtils.HEADER_BACKGROUNDCOLOR, formcustom.getHeaderBackGroundColor());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getHeaderFrontColor()))
+ if (MiscUtil.isNotEmpty(formcustom.getHeaderFrontColor())) {
header_FrontColor = formcustom.getHeaderFrontColor();
+ map.put(FormBuildUtils.HEADER_COLOR, formcustom.getHeaderFrontColor());
+ }
- if (MiscUtil.isNotEmpty(formcustom.getHeaderText()))
+ if (MiscUtil.isNotEmpty(formcustom.getHeaderText())) {
header_text = formcustom.getHeaderText();
+ map.put(FormBuildUtils.HEADER_TEXT, formcustom.getHeaderText());
+ }
}
}
}
@@ -281,6 +308,28 @@ public class FormularCustomization {
return appletRedirectTargetList;
}
+ /**
+ * @return the fontTypeList
+ */
+ public List<String> getFontTypeList() {
+ return fontTypeList;
+ }
+
+ /**
+ * @return the fontTypeListValue
+ */
+ public String getFontTypeListValue() {
+ return fontTypeListValue;
+ }
+
+ /**
+ * @param fontTypeListValue the fontTypeListValue to set
+ */
+ public void setFontTypeListValue(String fontTypeListValue) {
+ this.fontTypeListValue = fontTypeListValue;
+ }
+
+
}