dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14326
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4830: Changed the GUI of "Settings" module. Implemented a new setting for email (hostname, username and...
------------------------------------------------------------
revno: 4830
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-10-05 14:03:07 +0700
message:
Changed the GUI of "Settings" module. Implemented a new setting for email (hostname, username and password).
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSMTPSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSMTPSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/appearanceSettings.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/emailSettings.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/generalSettings.vm
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/options/setting/DefaultSystemSettingManager.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module_vi_VN.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/settingsMenu.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-09-30 17:01:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-10-05 07:03:07 +0000
@@ -1,7 +1,7 @@
package org.hisp.dhis.options;
/*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -88,4 +88,10 @@
String getSystemIdentifier();
String getFlagImage();
+
+ String getEmailHostName();
+
+ String getEmailUsername();
+
+ String getEmailPassword();
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/options/setting/DefaultSystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/options/setting/DefaultSystemSettingManager.java 2011-09-30 13:48:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/options/setting/DefaultSystemSettingManager.java 2011-10-05 07:03:07 +0000
@@ -33,6 +33,7 @@
import java.util.Collections;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.hisp.dhis.options.SystemSetting;
import org.hisp.dhis.options.SystemSettingManager;
@@ -56,14 +57,14 @@
{
this.systemSettingStore = systemSettingStore;
}
-
+
private List<String> flags;
public void setFlags( List<String> flags )
{
this.flags = flags;
}
-
+
// -------------------------------------------------------------------------
// SystemSettingManager implementation
// -------------------------------------------------------------------------
@@ -71,20 +72,20 @@
public void saveSystemSetting( String name, Serializable value )
{
SystemSetting setting = systemSettingStore.getByName( name );
-
+
if ( setting == null )
{
setting = new SystemSetting();
-
+
setting.setName( name );
setting.setValue( value );
-
+
systemSettingStore.save( setting );
}
else
{
setting.setValue( value );
-
+
systemSettingStore.update( setting );
}
}
@@ -92,14 +93,14 @@
public Serializable getSystemSetting( String name )
{
SystemSetting setting = systemSettingStore.getByName( name );
-
+
return setting != null && setting.hasValue() ? setting.getValue() : null;
- }
-
+ }
+
public Serializable getSystemSetting( String name, Serializable defaultValue )
{
SystemSetting setting = systemSettingStore.getByName( name );
-
+
return setting != null && setting.hasValue() ? setting.getValue() : defaultValue;
}
@@ -111,7 +112,7 @@
public void deleteSystemSetting( String name )
{
SystemSetting setting = systemSettingStore.getByName( name );
-
+
if ( setting != null )
{
systemSettingStore.delete( setting );
@@ -121,27 +122,42 @@
// -------------------------------------------------------------------------
// Specific methods
// -------------------------------------------------------------------------
-
+
public List<String> getFlags()
{
- Collections.sort( flags );
+ Collections.sort( flags );
return flags;
}
-
+
public List<String> getAggregationStrategies()
{
return Arrays.asList( AGGREGATION_STRATEGY_REAL_TIME, AGGREGATION_STRATEGY_BATCH );
}
-
+
public String getSystemIdentifier()
{
return (String) getSystemSetting( KEY_SYSTEM_IDENTIFIER );
}
-
+
public String getFlagImage()
{
String flag = (String) getSystemSetting( KEY_FLAG );
-
+
return flag != null ? flag + ".png" : null;
}
+
+ public String getEmailHostName()
+ {
+ return StringUtils.trimToNull( (String) getSystemSetting( KEY_EMAIL_HOST_NAME ) );
+ }
+
+ public String getEmailPassword()
+ {
+ return StringUtils.trimToNull( (String) getSystemSetting( KEY_EMAIL_PASSWORD ) );
+ }
+
+ public String getEmailUsername()
+ {
+ return StringUtils.trimToNull( (String) getSystemSetting( KEY_EMAIL_USERNAME ) );
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-10-02 09:53:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-10-05 07:03:07 +0000
@@ -425,5 +425,18 @@
"required" : true,
"rangelength" : [ 2, 255 ]
}
+ },
+ "emailSettings" : {
+ "smtpHostName" : {
+ "required" : true,
+ "url" : true
+ },
+ "smtpUsername" : {
+ "required" : true
+ },
+ "smtpPassword" : {
+ "required" : true,
+ "password" : true
+ }
}
};
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,127 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.List;
+import java.util.SortedMap;
+
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.options.style.StyleManager;
+import org.hisp.dhis.system.util.Filter;
+import org.hisp.dhis.system.util.FilterUtils;
+import org.hisp.dhis.webportal.module.Module;
+import org.hisp.dhis.webportal.module.ModuleManager;
+import org.hisp.dhis.webportal.module.StartableModuleFilter;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class GetAppearanceSettingsAction
+ implements Action
+{
+ private static final Filter<Module> startableFilter = new StartableModuleFilter();
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ private ModuleManager moduleManager;
+
+ public void setModuleManager( ModuleManager moduleManager )
+ {
+ this.moduleManager = moduleManager;
+ }
+
+ private StyleManager styleManager;
+
+ public void setStyleManager( StyleManager styleManager )
+ {
+ this.styleManager = styleManager;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private List<String> flags;
+
+ public List<String> getFlags()
+ {
+ return flags;
+ }
+
+ private List<Module> modules;
+
+ public List<Module> getModules()
+ {
+ return modules;
+ }
+
+ private SortedMap<String, String> styles;
+
+ public SortedMap<String, String> getStyles()
+ {
+ return styles;
+ }
+
+ private String currentStyle;
+
+ public String getCurrentStyle()
+ {
+ return currentStyle;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ styles = styleManager.getStyles();
+
+ currentStyle = styleManager.getSystemStyle();
+
+ flags = systemSettingManager.getFlags();
+
+ modules = moduleManager.getMenuModules();
+
+ FilterUtils.filter( modules, startableFilter );
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetGeneralSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,165 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.configuration.Configuration;
+import org.hisp.dhis.configuration.ConfigurationService;
+import org.hisp.dhis.dataelement.DataElementGroup;
+import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator;
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.user.UserGroup;
+import org.hisp.dhis.user.UserGroupService;
+import org.hisp.dhis.user.comparator.UserGroupComparator;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class GetGeneralSettingsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ private ConfigurationService configurationService;
+
+ public void setConfigurationService( ConfigurationService configurationService )
+ {
+ this.configurationService = configurationService;
+ }
+
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ private PeriodService periodService;
+
+ public void setPeriodService( PeriodService periodService )
+ {
+ this.periodService = periodService;
+ }
+
+ private UserGroupService userGroupService;
+
+ public void setUserGroupService( UserGroupService userGroupService )
+ {
+ this.userGroupService = userGroupService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private UserGroup feedbackRecipients;
+
+ public UserGroup getFeedbackRecipients()
+ {
+ return feedbackRecipients;
+ }
+
+ private Collection<String> aggregationStrategies;
+
+ public Collection<String> getAggregationStrategies()
+ {
+ return aggregationStrategies;
+ }
+
+ private List<DataElementGroup> dataElementGroups;
+
+ public List<DataElementGroup> getDataElementGroups()
+ {
+ return dataElementGroups;
+ }
+
+ private List<PeriodType> periodTypes;
+
+ public List<PeriodType> getPeriodTypes()
+ {
+ return periodTypes;
+ }
+
+ private List<UserGroup> userGroups;
+
+ public List<UserGroup> getUserGroups()
+ {
+ return userGroups;
+ }
+
+ private Configuration configuration;
+
+ public Configuration getConfiguration()
+ {
+ return configuration;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ aggregationStrategies = systemSettingManager.getAggregationStrategies();
+
+ configuration = configurationService.getConfiguration();
+
+ feedbackRecipients = configurationService.getConfiguration().getFeedbackRecipients();
+
+ dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
+
+ Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
+
+ periodTypes = new ArrayList<PeriodType>( periodService.getAllPeriodTypes() );
+
+ userGroups = new ArrayList<UserGroup>( userGroupService.getAllUserGroups() );
+
+ Collections.sort( userGroups, new UserGroupComparator() );
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSMTPSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSMTPSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSMTPSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,91 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.options.SystemSettingManager;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class GetSMTPSettingsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private String smtpHostName;
+
+ public String getSmtpHostName()
+ {
+ return smtpHostName;
+ }
+
+ private String smtpUsername;
+
+ public String getSmtpUsername()
+ {
+ return smtpUsername;
+ }
+
+ private String smtpPassword;
+
+ public String getSmtpPassword()
+ {
+ return smtpPassword;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ smtpHostName = systemSettingManager.getEmailHostName();
+
+ smtpPassword = systemSettingManager.getEmailPassword();
+
+ smtpUsername = systemSettingManager.getEmailUsername();
+
+ return SUCCESS;
+ }
+}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 2011-09-30 13:18:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 1970-01-01 00:00:00 +0000
@@ -1,226 +0,0 @@
-package org.hisp.dhis.settings.action.system;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.SortedMap;
-
-import org.hisp.dhis.configuration.Configuration;
-import org.hisp.dhis.configuration.ConfigurationService;
-import org.hisp.dhis.dataelement.DataElementGroup;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator;
-import org.hisp.dhis.options.SystemSettingManager;
-import org.hisp.dhis.options.style.StyleManager;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.system.util.Filter;
-import org.hisp.dhis.system.util.FilterUtils;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.comparator.UserGroupComparator;
-import org.hisp.dhis.webportal.module.Module;
-import org.hisp.dhis.webportal.module.ModuleManager;
-import org.hisp.dhis.webportal.module.StartableModuleFilter;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetSystemSettingsAction
- implements Action
-{
- private static final Filter<Module> startableFilter = new StartableModuleFilter();
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private SystemSettingManager systemSettingManager;
-
- public void setSystemSettingManager( SystemSettingManager systemSettingManager )
- {
- this.systemSettingManager = systemSettingManager;
- }
-
- private ModuleManager moduleManager;
-
- public void setModuleManager( ModuleManager moduleManager )
- {
- this.moduleManager = moduleManager;
- }
-
- private StyleManager styleManager;
-
- public void setStyleManager( StyleManager styleManager )
- {
- this.styleManager = styleManager;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private ConfigurationService configurationService;
-
- public void setConfigurationService( ConfigurationService configurationService )
- {
- this.configurationService = configurationService;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private List<String> flags;
-
- public List<String> getFlags()
- {
- return flags;
- }
-
- private List<Module> modules;
-
- public List<Module> getModules()
- {
- return modules;
- }
-
- private SortedMap<String, String> styles;
-
- public SortedMap<String, String> getStyles()
- {
- return styles;
- }
-
- private String currentStyle;
-
- public String getCurrentStyle()
- {
- return currentStyle;
- }
-
- private List<UserGroup> userGroups;
-
- public List<UserGroup> getUserGroups()
- {
- return userGroups;
- }
-
- private UserGroup feedbackRecipients;
-
- public UserGroup getFeedbackRecipients()
- {
- return feedbackRecipients;
- }
-
- private Collection<String> aggregationStrategies;
-
- public Collection<String> getAggregationStrategies()
- {
- return aggregationStrategies;
- }
-
- private Configuration configuration;
-
- public Configuration getConfiguration()
- {
- return configuration;
- }
-
- private List<DataElementGroup> dataElementGroups;
-
- public List<DataElementGroup> getDataElementGroups()
- {
- return dataElementGroups;
- }
-
- private List<PeriodType> periodTypes;
-
- public List<PeriodType> getPeriodTypes()
- {
- return periodTypes;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- flags = systemSettingManager.getFlags();
-
- modules = moduleManager.getMenuModules();
-
- FilterUtils.filter( modules, startableFilter );
-
- styles = styleManager.getStyles();
-
- currentStyle = styleManager.getSystemStyle();
-
- aggregationStrategies = systemSettingManager.getAggregationStrategies();
-
- configuration = configurationService.getConfiguration();
-
- dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
-
- Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
-
- periodTypes = new ArrayList<PeriodType>( periodService.getAllPeriodTypes() );
-
- userGroups = new ArrayList<UserGroup>( userGroupService.getAllUserGroups() );
-
- Collections.sort( userGroups, new UserGroupComparator() );
-
- feedbackRecipients = configurationService.getConfiguration().getFeedbackRecipients();
-
- return SUCCESS;
- }
-}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,122 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import static org.hisp.dhis.options.SystemSettingManager.KEY_APPLICATION_TITLE;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_FLAG;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
+
+import org.apache.commons.lang.StringUtils;
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.options.style.StyleManager;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class SetAppearanceSettingsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ private StyleManager styleManager;
+
+ public void setStyleManager( StyleManager styleManager )
+ {
+ this.styleManager = styleManager;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private String applicationTitle;
+
+ public void setApplicationTitle( String applicationTitle )
+ {
+ this.applicationTitle = applicationTitle;
+ }
+
+ private String flag;
+
+ public void setFlag( String flag )
+ {
+ this.flag = flag;
+ }
+
+ private String startModule;
+
+ public void setStartModule( String startModule )
+ {
+ this.startModule = startModule;
+ }
+
+ private String currentStyle;
+
+ public void setCurrentStyle( String style )
+ {
+ this.currentStyle = style;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ applicationTitle = StringUtils.trimToNull( applicationTitle );
+
+ if ( flag != null && flag.equals( "NO_FLAG" ) )
+ {
+ flag = null;
+ }
+
+ if ( startModule != null && startModule.equals( "NO_START_PAGE" ) )
+ {
+ startModule = null;
+ }
+
+ systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
+ systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
+ systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
+ styleManager.setSystemStyle( currentStyle );
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,189 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import static org.hisp.dhis.options.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_COMPLETENESS_OFFSET;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART;
+
+import org.hisp.dhis.configuration.Configuration;
+import org.hisp.dhis.configuration.ConfigurationService;
+import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.user.UserGroupService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class SetGeneralSettingsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ private UserGroupService userGroupService;
+
+ public void setUserGroupService( UserGroupService userGroupService )
+ {
+ this.userGroupService = userGroupService;
+ }
+
+ private ConfigurationService configurationService;
+
+ public void setConfigurationService( ConfigurationService configurationService )
+ {
+ this.configurationService = configurationService;
+ }
+
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ private PeriodService periodService;
+
+ public void setPeriodService( PeriodService periodService )
+ {
+ this.periodService = periodService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ private String aggregationStrategy;
+
+ public void setAggregationStrategy( String aggregationStrategy )
+ {
+ this.aggregationStrategy = aggregationStrategy;
+ }
+
+ private Integer infrastructuralDataElements;
+
+ public void setInfrastructuralDataElements( Integer infrastructuralDataElements )
+ {
+ this.infrastructuralDataElements = infrastructuralDataElements;
+ }
+
+ private String infrastructuralPeriodType;
+
+ public void setInfrastructuralPeriodType( String infrastructuralPeriodType )
+ {
+ this.infrastructuralPeriodType = infrastructuralPeriodType;
+ }
+
+ private Boolean omitIndicatorsZeroNumeratorDataMart;
+
+ public void setOmitIndicatorsZeroNumeratorDataMart( Boolean omitIndicatorsZeroNumeratorDataMart )
+ {
+ this.omitIndicatorsZeroNumeratorDataMart = omitIndicatorsZeroNumeratorDataMart;
+ }
+
+ private boolean disableDataEntryWhenCompleted;
+
+ public void setDisableDataEntryWhenCompleted( boolean disableDataEntryWhenCompleted )
+ {
+ this.disableDataEntryWhenCompleted = disableDataEntryWhenCompleted;
+ }
+
+ private Double factorDeviation;
+
+ public void setFactorDeviation( Double factorDeviation )
+ {
+ this.factorDeviation = factorDeviation;
+ }
+
+ private Integer feedbackRecipients;
+
+ public void setFeedbackRecipients( Integer feedbackRecipients )
+ {
+ this.feedbackRecipients = feedbackRecipients;
+ }
+
+ private Integer completenessOffset;
+
+ public void setCompletenessOffset( Integer completenessOffset )
+ {
+ this.completenessOffset = completenessOffset;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ systemSettingManager.saveSystemSetting( KEY_AGGREGATION_STRATEGY, aggregationStrategy );
+ systemSettingManager.saveSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART,
+ omitIndicatorsZeroNumeratorDataMart );
+ systemSettingManager
+ .saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
+ systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
+ systemSettingManager.saveSystemSetting( KEY_COMPLETENESS_OFFSET, completenessOffset );
+
+ Configuration configuration = configurationService.getConfiguration();
+
+ if ( feedbackRecipients != null )
+ {
+ configuration.setFeedbackRecipients( userGroupService.getUserGroup( feedbackRecipients ) );
+ }
+
+ if ( infrastructuralDataElements != null )
+ {
+ configuration.setInfrastructuralDataElements( dataElementService
+ .getDataElementGroup( infrastructuralDataElements ) );
+ }
+
+ if ( infrastructuralPeriodType != null )
+ {
+ configuration.setInfrastructuralPeriodType( periodService.getPeriodTypeByClass( PeriodType
+ .getPeriodTypeByName( infrastructuralPeriodType ).getClass() ) );
+ }
+
+ configurationService.setConfiguration( configuration );
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSMTPSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSMTPSettingsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSMTPSettingsAction.java 2011-10-05 07:03:07 +0000
@@ -0,0 +1,95 @@
+package org.hisp.dhis.settings.action.system;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+import static org.hisp.dhis.options.SystemSettingManager.KEY_EMAIL_HOST_NAME;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_EMAIL_PASSWORD;
+import static org.hisp.dhis.options.SystemSettingManager.KEY_EMAIL_USERNAME;
+
+import org.hisp.dhis.options.SystemSettingManager;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class SetSMTPSettingsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private String smtpHostName;
+
+ public void setSmtpHostName( String hostName )
+ {
+ this.smtpHostName = hostName;
+ }
+
+ private String smtpUsername;
+
+ public void setSmtpUsername( String username )
+ {
+ this.smtpUsername = username;
+ }
+
+ private String smtpPassword;
+
+ public void setSmtpPassword( String password )
+ {
+ this.smtpPassword = password;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ systemSettingManager.saveSystemSetting( KEY_EMAIL_HOST_NAME, smtpHostName );
+
+ systemSettingManager.saveSystemSetting( KEY_EMAIL_PASSWORD, smtpPassword );
+
+ systemSettingManager.saveSystemSetting( KEY_EMAIL_USERNAME, smtpUsername );
+
+ return SUCCESS;
+ }
+
+}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2011-09-30 12:21:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 1970-01-01 00:00:00 +0000
@@ -1,252 +0,0 @@
-package org.hisp.dhis.settings.action.system;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.hisp.dhis.options.SystemSettingManager.KEY_AGGREGATION_STRATEGY;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_APPLICATION_TITLE;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_COMPLETENESS_OFFSET;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_FLAG;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
-import static org.hisp.dhis.options.SystemSettingManager.KEY_SYSTEM_IDENTIFIER;
-
-import org.apache.commons.lang.StringUtils;
-import org.hisp.dhis.configuration.Configuration;
-import org.hisp.dhis.configuration.ConfigurationService;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.SystemSettingManager;
-import org.hisp.dhis.options.style.StyleManager;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.user.UserGroupService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class SetSystemSettingsAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private SystemSettingManager systemSettingManager;
-
- public void setSystemSettingManager( SystemSettingManager systemSettingManager )
- {
- this.systemSettingManager = systemSettingManager;
- }
-
- private StyleManager styleManager;
-
- public void setStyleManager( StyleManager styleManager )
- {
- this.styleManager = styleManager;
- }
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private ConfigurationService configurationService;
-
- public void setConfigurationService( ConfigurationService configurationService )
- {
- this.configurationService = configurationService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private String systemIdentifier;
-
- public void setSystemIdentifier( String systemIdentifier )
- {
- this.systemIdentifier = systemIdentifier;
- }
-
- private String applicationTitle;
-
- public void setApplicationTitle( String applicationTitle )
- {
- this.applicationTitle = applicationTitle;
- }
-
- private String flag;
-
- public void setFlag( String flag )
- {
- this.flag = flag;
- }
-
- private String startModule;
-
- public void setStartModule( String startModule )
- {
- this.startModule = startModule;
- }
-
- private Integer infrastructuralDataElements;
-
- public void setInfrastructuralDataElements( Integer infrastructuralDataElements )
- {
- this.infrastructuralDataElements = infrastructuralDataElements;
- }
-
- private String infrastructuralPeriodType;
-
- public void setInfrastructuralPeriodType( String infrastructuralPeriodType )
- {
- this.infrastructuralPeriodType = infrastructuralPeriodType;
- }
-
- private Boolean omitIndicatorsZeroNumeratorDataMart;
-
- public void setOmitIndicatorsZeroNumeratorDataMart( Boolean omitIndicatorsZeroNumeratorDataMart )
- {
- this.omitIndicatorsZeroNumeratorDataMart = omitIndicatorsZeroNumeratorDataMart;
- }
-
- private boolean disableDataEntryWhenCompleted;
-
- public void setDisableDataEntryWhenCompleted( boolean disableDataEntryWhenCompleted )
- {
- this.disableDataEntryWhenCompleted = disableDataEntryWhenCompleted;
- }
-
- private Double factorDeviation;
-
- public void setFactorDeviation( Double factorDeviation )
- {
- this.factorDeviation = factorDeviation;
- }
-
- private String currentStyle;
-
- public void setCurrentStyle( String style )
- {
- this.currentStyle = style;
- }
-
- private String aggregationStrategy;
-
- public void setAggregationStrategy( String aggregationStrategy )
- {
- this.aggregationStrategy = aggregationStrategy;
- }
-
- private Integer feedbackRecipients;
-
- public void setFeedbackRecipients( Integer feedbackRecipients )
- {
- this.feedbackRecipients = feedbackRecipients;
- }
-
- private Integer completenessOffset;
-
- public void setCompletenessOffset( Integer completenessOffset )
- {
- this.completenessOffset = completenessOffset;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- applicationTitle = StringUtils.trimToNull( applicationTitle );
-
- if ( flag != null && flag.equals( "NO_FLAG" ) )
- {
- flag = null;
- }
-
- if ( startModule != null && startModule.equals( "NO_START_PAGE" ) )
- {
- startModule = null;
- }
-
- systemSettingManager.saveSystemSetting( KEY_SYSTEM_IDENTIFIER, systemIdentifier );
- systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
- systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
- systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
- systemSettingManager.saveSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, omitIndicatorsZeroNumeratorDataMart );
- systemSettingManager.saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
- systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
- styleManager.setSystemStyle( currentStyle );
- systemSettingManager.saveSystemSetting( KEY_AGGREGATION_STRATEGY, aggregationStrategy );
- systemSettingManager.saveSystemSetting( KEY_COMPLETENESS_OFFSET, completenessOffset );
-
- Configuration configuration = configurationService.getConfiguration();
-
- if ( feedbackRecipients != null )
- {
- configuration.setFeedbackRecipients( userGroupService.getUserGroup( feedbackRecipients ) );
- }
-
- if ( infrastructuralDataElements != null )
- {
- configuration.setInfrastructuralDataElements( dataElementService
- .getDataElementGroup( infrastructuralDataElements ) );
- }
-
- if ( infrastructuralPeriodType != null )
- {
- configuration.setInfrastructuralPeriodType( periodService.getPeriodTypeByClass( PeriodType
- .getPeriodTypeByName( infrastructuralPeriodType ).getClass() ) );
- }
-
- configurationService.setConfiguration( configuration );
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 12:21:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-10-05 07:03:07 +0000
@@ -5,25 +5,45 @@
<!-- System settings -->
- <bean id="org.hisp.dhis.settings.action.system.GetSystemSettingsAction" class="org.hisp.dhis.settings.action.system.GetSystemSettingsAction"
+ <bean id="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction" class="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction"
+ scope="prototype">
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.settings.action.system.SetGeneralSettingsAction" class="org.hisp.dhis.settings.action.system.SetGeneralSettingsAction"
+ scope="prototype">
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.settings.action.system.GetAppearanceSettingsAction" class="org.hisp.dhis.settings.action.system.GetAppearanceSettingsAction"
scope="prototype">
<property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
<property name="moduleManager" ref="org.hisp.dhis.webportal.module.ModuleManager" />
<property name="styleManager" ref="org.hisp.dhis.options.style.StyleManager" />
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
</bean>
- <bean id="org.hisp.dhis.settings.action.system.SetSystemSettingsAction" class="org.hisp.dhis.settings.action.system.SetSystemSettingsAction"
+ <bean id="org.hisp.dhis.settings.action.system.SetAppearanceSettingsAction" class="org.hisp.dhis.settings.action.system.SetAppearanceSettingsAction"
scope="prototype">
<property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
<property name="styleManager" ref="org.hisp.dhis.options.style.StyleManager" />
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.settings.action.system.GetSMTPSettingsAction" class="org.hisp.dhis.settings.action.system.GetSMTPSettingsAction"
+ scope="prototype">
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ </bean>
+
+ <bean id="org.hisp.dhis.settings.action.system.SetSMTPSettingsAction" class="org.hisp.dhis.settings.action.system.SetSMTPSettingsAction"
+ scope="prototype">
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
</bean>
<!-- User settings -->
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2011-08-18 19:36:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2011-10-05 07:03:07 +0000
@@ -8,6 +8,12 @@
dashboard_charts_to_display = Dashboard Charts to Display
code = Code
system_settings = System settings
+general_settings = General settings
+appearance_settings = Appearance settings
+smtp_settings = Email settings
+host_name = Host name (URL)
+username = User name
+password = Password
shortname = Short name
custom = Custom
user_settings = User settings
@@ -80,7 +86,9 @@
forum_integration = Forum integration
no_start_page = No start page
intro_user_settings = Customize the system with user specific settings for locale, sort order, display property, style and more.
-intro_system_settings = Customize the system behavior with regard to reporting framework, start page, title, flag and more.
+intro_general_settings = Customize the system behavior with regard to aggregation strategy, infrastructural data elements, infrastructural period type, disable data entry when data set completed and more.
+intro_appearance_settings = Customize the system behavior with regard to application title, style, flag, start page.
+intro_smtp_settings = Customize the system behavior with regard to e-mail (SMTP).
disable_dataentry_when_dataset_completed = Disable data entry when data set completed
max_attempts = Max number of login attempts
lockout_timeframe = Lockout minutes after max number of login attempts
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module_vi_VN.properties 2011-02-22 08:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module_vi_VN.properties 2011-10-05 07:03:07 +0000
@@ -1,120 +1,128 @@
zanzibar=Zanzibar
zambia=Zambia
-who=T\u1ED5 ch\u1EE9c Y t\u1EBF th\u1EBF gi\u1EDBi
-welcome_to=Ch\u00E0o m\u1EEBng \u0111\u1EBFn v\u1EDBi
+who=T\u1ed5 ch\u1ee9c Y t\u1ebf th\u1ebf gi\u1edbi
+welcome_to=Ch\u00e0o m\u1eebng \u0111\u1ebfn v\u1edbi
vista=Vista
-vietnam=Vi\u1EC7t nam
-user_settings=C\u00E0i \u0111\u1EB7t ng\u01B0\u1EDDi d\u00F9ng
+vietnam=Vi\u1ec7t nam
+user_settings=C\u00e0i \u0111\u1eb7t ng\u01b0\u1eddi d\u00f9ng
uganda=Uganda
-top_background_color=M\u00E0u n\u1EC1n
-title_color=M\u00E0u ti\u00EAu \u0111\u1EC1
+top_background_color=M\u00e0u n\u1ec1n
+title_color=M\u00e0u ti\u00eau \u0111\u1ec1
tanzania=Tanzania
tajikistan=Tajikistan
system_settings=C\u00e0i \u0111\u1eb7t h\u1ec7 th\u1ed1ng
swaziland=Swaziland
-style=Ki\u1EC3u
-store_top_background_color=L\u01B0u m\u00E0u n\u1EC1n ph\u00EDa tr\u00EAn
+style=Ki\u1ec3u
+store_top_background_color=L\u01b0u m\u00e0u n\u1ec1n ph\u00eda tr\u00ean
store_title_color=L\u01b0u m\u00e0u c\u1ee7a d\u00f2ng ti\u00eau \u0111\u1ec1
store_title=L\u01b0u m\u00e0u c\u1ee7a ti\u00eau \u0111\u1ec1
store_menu_element_colour=L\u01b0u m\u00e0y c\u1ee7a tr\u00ecnh \u0111\u01a1n
store_left_background_color=L\u01b0u m\u00e0u n\u1ec1n b\u00ean tr\u00e1i
-store_background_color_in_menu=L\u01B0u m\u00E0u n\u1EC1n c\u1EE7a tr\u00ECnh \u0111\u01A1n
-store_active_menu_element_color=L\u01B0u m\u00E0u c\u1EE7a tr\u00ECnh \u0111\u01A1n \u0111\u01B0\u1EE3c k\u00EDch ho\u1EA1t
-store=L\u01B0u
-start_page=Trang nh\u1EA5t
-south_africa_department_of_health=B\u1ED9 Y t\u1EBF Nam Phi
+store_background_color_in_menu=L\u01b0u m\u00e0u n\u1ec1n c\u1ee7a tr\u00ecnh \u0111\u01a1n
+store_active_menu_element_color=L\u01b0u m\u00e0u c\u1ee7a tr\u00ecnh \u0111\u01a1n \u0111\u01b0\u1ee3c k\u00edch ho\u1ea1t
+store=L\u01b0u
+start_page=Trang nh\u1ea5t
+south_africa_department_of_health=B\u1ed9 Y t\u1ebf Nam Phi
south_africa=Nam Phi
-sort_order=Th\u1EE9 t\u1EF1 s\u1EAFp x\u1EBFp
+sort_order=Th\u1ee9 t\u1ef1 s\u1eafp x\u1ebfp
sierra_leone_coat_of_arms=Sierra Leone Coat of arms
sierra_leone=Sierra Leone
-shortname=T\u00EAn vi\u1EBFt t\u1EAFt
-settings=C\u00E1c c\u00E0i \u0111\u1EB7t
-set_top_background_color=M\u00E0u n\u1EC1n ph\u00EDa tr\u00EAn
-set_title_color=M\u00E0u c\u1EE7a d\u00F2ng ti\u00EAu \u0111\u1EC1
-set_title=Ti\u00EAu \u0111\u1EC1 ch\u01B0\u01A1ng tr\u00ECnh
-set_menu_element_colour=M\u00E0u c\u1EE7a tr\u00ECnh \u0111\u01A1n
-set_left_background_color=M\u00E0u n\u1EC1n b\u00EAn tr\u00E1i
-set_background_color_in_menu=M\u00E0u n\u1EC1n c\u1EE7a tr\u00ECnh \u0111\u01A1n
-set_active_menu_element_color=M\u00E0u c\u1EE7a tr\u00ECnh \u0111\u01A1n k\u00EDch ho\u1EA1t
-save_zero_values=L\u01B0u c\u00E1c gi\u00E1 tr\u1ECB 0 \u0111\u1EC3 t\u1ED5ng h\u1EE3p c\u00E1c ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u
-report_framework=H\u1EC7 th\u1ED1ng b\u00E1o c\u00E1o
-regular=B\u00ECnh th\u01B0\u1EDDng
-portal=C\u1ED5ng \u0111i\u1EC7n t\u1EED
+shortname=T\u00ean vi\u1ebft t\u1eaft
+settings=C\u00e1c c\u00e0i \u0111\u1eb7t
+set_top_background_color=M\u00e0u n\u1ec1n ph\u00eda tr\u00ean
+set_title_color=M\u00e0u c\u1ee7a d\u00f2ng ti\u00eau \u0111\u1ec1
+set_title=Ti\u00eau \u0111\u1ec1 ch\u01b0\u01a1ng tr\u00ecnh
+set_menu_element_colour=M\u00e0u c\u1ee7a tr\u00ecnh \u0111\u01a1n
+set_left_background_color=M\u00e0u n\u1ec1n b\u00ean tr\u00e1i
+set_background_color_in_menu=M\u00e0u n\u1ec1n c\u1ee7a tr\u00ecnh \u0111\u01a1n
+set_active_menu_element_color=M\u00e0u c\u1ee7a tr\u00ecnh \u0111\u01a1n k\u00edch ho\u1ea1t
+save_zero_values=L\u01b0u c\u00e1c gi\u00e1 tr\u1ecb 0 \u0111\u1ec3 t\u1ed5ng h\u1ee3p c\u00e1c ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
+report_framework=H\u1ec7 th\u1ed1ng b\u00e1o c\u00e1o
+regular=B\u00ecnh th\u01b0\u1eddng
+portal=C\u1ed5ng \u0111i\u1ec7n t\u1eed
openhealth=OpenHealth
-omit_indicators_zero_numerator_data_mart=L\u01B0\u1EE3t b\u1ECF c\u00E1c gi\u00E1 tr\u1ECB ch\u1EC9 s\u1ED1 v\u1EDBi t\u1EED s\u1ED1 b\u1EB1ng 0 trong d\u1EEF li\u1EC7u t\u1ED5ng h\u1EE3p
+omit_indicators_zero_numerator_data_mart=L\u01b0\u1ee3t b\u1ecf c\u00e1c gi\u00e1 tr\u1ecb ch\u1ec9 s\u1ed1 v\u1edbi t\u1eed s\u1ed1 b\u1eb1ng 0 trong d\u1eef li\u1ec7u t\u1ed5ng h\u1ee3p
norway=Norway
-no_start_page=Kh\u00F4ng c\u00F3 trang nh\u1EA5t
-no_flag=Kh\u00F4ng c\u00F3 c\u1EDD qu\u1ED1c gia
+no_start_page=Kh\u00f4ng c\u00f3 trang nh\u1ea5t
+no_flag=Kh\u00f4ng c\u00f3 c\u1edd qu\u1ed1c gia
nigeria=Nigeria
namibia=Namibia
mozambique=Mozambique
-menu_element_color=M\u00E0u thanh c\u00F4ng c\u1EE5
-max_attempts=S\u1ED1 ng\u01B0\u1EDDi d\u00F9ng t\u1ED1i \u0111a \u0111\u0103ng nh\u1EADp
+menu_element_color=M\u00e0u thanh c\u00f4ng c\u1ee5
+max_attempts=S\u1ed1 ng\u01b0\u1eddi d\u00f9ng t\u1ed1i \u0111a \u0111\u0103ng nh\u1eadp
mali=Mali
malawi=Malawi
-macos=H\u1EC7 \u0111i\u1EC1u h\u00E0nh Mac
-lockout_timeframe=\u0110\u1ECBnh m\u1EE9c s\u1ED1 ph\u00FAt sau khi s\u1ED1 ng\u01B0\u1EDDi d\u00F9ng t\u1ED1i \u0111a \u0111\u0103ng nh\u1EADp
-light_blue=M\u00E0u xanh nh\u1EA1t
+macos=H\u1ec7 \u0111i\u1ec1u h\u00e0nh Mac
+lockout_timeframe=\u0110\u1ecbnh m\u1ee9c s\u1ed1 ph\u00fat sau khi s\u1ed1 ng\u01b0\u1eddi d\u00f9ng t\u1ed1i \u0111a \u0111\u0103ng nh\u1eadp
+light_blue=M\u00e0u xanh nh\u1ea1t
lesotho=Lesotho
-left_background_color=M\u00E0u n\u1EC1n ph\u00EDa tr\u00E1i
-language=Ng\u00F4n ng\u1EEF giao di\u1EC7n
+left_background_color=M\u00e0u n\u1ec1n ph\u00eda tr\u00e1i
+language=Ng\u00f4n ng\u1eef giao di\u1ec7n
kenya=Kenya
-jasper=C\u00E1c b\u00E1o c\u00E1o Jasper
-ivory_coast=B\u1EDD bi\u1EC3n ng\u00E0
-irc=\u1EE6y ban gi\u1EA3i c\u1EE9u qu\u1ED1c t\u1EBF
-intro_user_settings=T\u00F9y bi\u1EBFn h\u1EC7 th\u1ED1ng v\u1EDBi c\u00E1c thi\u1EBFt l\u1EADp ng\u01B0\u1EDDi d\u00F9ng cho \u0111\u1ECBnh v\u1ECB, th\u1EE9 t\u1EF1 s\u1EAFp x\u1EBFp, thu\u1ED9c t\u00EDnh hi\u1EC3n th\u1ECB, c\u00E1ch th\u1EE9c v\u00E0 h\u01A1n n\u1EEFa.
-intro_system_settings=T\u00F9y bi\u1EBFn h\u1EC7 th\u1ED1ng li\u00EAn quan \u0111\u1EBFn h\u1EC7 th\u1ED1ng b\u00E1o c\u00E1o, trang \u0111\u1EA7u, ti\u00EAu \u0111\u1EC1, c\u1EDD qu\u1ED1c gia v\u00E0 nh\u1EEFng th\u1EE9 kh\u00E1c.
+jasper=C\u00e1c b\u00e1o c\u00e1o Jasper
+ivory_coast=B\u1edd bi\u1ec3n ng\u00e0
+irc=\u1ee6y ban gi\u1ea3i c\u1ee9u qu\u1ed1c t\u1ebf
+intro_user_settings=T\u00f9y bi\u1ebfn h\u1ec7 th\u1ed1ng v\u1edbi c\u00e1c thi\u1ebft l\u1eadp ng\u01b0\u1eddi d\u00f9ng cho \u0111\u1ecbnh v\u1ecb, th\u1ee9 t\u1ef1 s\u1eafp x\u1ebfp, thu\u1ed9c t\u00ednh hi\u1ec3n th\u1ecb, c\u00e1ch th\u1ee9c v\u00e0 h\u01a1n n\u1eefa.
+intro_general_settings = Thi\u1ebft l\u1eadp h\u1ec7 th\u1ed1ng v\u1ec1 c\u00e1ch th\u1ee9c t\u1ed5ng h\u1ee3p d\u1eef li\u1ec7u, C\u01a1 s\u1edf h\u1ea1 t\u1ea7ng h\u00f3a ph\u1ea7n t\u1eed d\u1eef li\u1ec7u, C\u01a1 s\u1edf h\u1ea1 t\u1ea7ng h\u00f3a ki\u1ec3u th\u1eddi gian, Kh\u00f3a bi\u1ec3u nh\u1eadp khi ho\u00e0n t\u1ea5t v\u00e0 h\u01a1n n\u1eefa.
+intro_appearance_settings = Thi\u1ebft l\u1eadp h\u1ec7 th\u1ed1ng v\u1ec1 ti\u00eau \u0111\u1ec1 c\u1ee7a \u1ee9ng d\u1ee5ng, ki\u1ec3u phong c\u00e1ch, c\u1edd v\u00e0 trang ch\u00ednh khi v\u00e0o h\u1ec7 th\u1ed1ng.
+intro_smtp_settings = Thi\u1ebft l\u1eadp h\u1ec7 th\u1ed1ng v\u1ec1 th\u01b0 \u0111i\u1ec7n t\u1eed.
india=India
-green=M\u00E0u xanh l\u00E1 c\u00E2y
+green=M\u00e0u xanh l\u00e1 c\u00e2y
ghana=Ghana
gambia=Gambia
-forum_integration=T\u1ED5ng h\u1EE3p di\u1EC5n \u0111\u00E0n
-flag=C\u1EDD qu\u1ED1c gia
-extended=\u0110\u01B0\u1EE3c m\u1EDF r\u1ED9ng
+forum_integration=T\u1ed5ng h\u1ee3p di\u1ec5n \u0111\u00e0n
+flag=C\u1edd qu\u1ed1c gia
+extended=\u0110\u01b0\u1ee3c m\u1edf r\u1ed9ng
ethiopia=Ethiopia
-display_property=Thu\u1ED9c t\u00EDnh hi\u1EC3n th\u1ECB
-disable_dataentry_when_dataset_completed=Kh\u00F4ng cho thay \u0111\u1ED5i d\u1EEF li\u1EC7u khi t\u1EADp h\u1EE3p d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c khai b\u00E1o ho\u00E0n ch\u1EC9nh.
+display_property=Thu\u1ed9c t\u00ednh hi\u1ec3n th\u1ecb
+disable_dataentry_when_dataset_completed=Kh\u00f4ng cho thay \u0111\u1ed5i d\u1eef li\u1ec7u khi t\u1eadp h\u1ee3p d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c khai b\u00e1o ho\u00e0n ch\u1ec9nh.
disable_dataentry_when_dataset_completed = Kh\u00f4ng cho thay \u0111\u1ed5i d\u1eef li\u1ec7u khi t\u1eadp h\u1ee3p d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c khai b\u00e1o ho\u00e0n ch\u1ec9nh.#Resource generated by I18n Resource Editor
-dhis-web-validationrule=Ch\u1EA5t l\u01B0\u1EE3ng d\u1EEF li\u1EC7u
-dhis-web-reports=C\u00E1c b\u00E1o c\u00E1o NRHM
-dhis-web-reporting=C\u00E1c b\u00E1o c\u00E1o
-dhis-web-openhealth-integration=Ph\u00E2n t\u00EDch d\u1EEF li\u1EC7u
-dhis-web-maintenance-user=C\u00E1c ng\u01B0\u1EDDi d\u00F9ng
+dhis-web-validationrule=Ch\u1ea5t l\u01b0\u1ee3ng d\u1eef li\u1ec7u
+dhis-web-reports=C\u00e1c b\u00e1o c\u00e1o NRHM
+dhis-web-reporting=C\u00e1c b\u00e1o c\u00e1o
+dhis-web-openhealth-integration=Ph\u00e2n t\u00edch d\u1eef li\u1ec7u
+dhis-web-maintenance-user=C\u00e1c ng\u01b0\u1eddi d\u00f9ng
dhis-web-maintenance-settings=C\u00e0i \u0111\u1eb7t
-dhis-web-maintenance-organisationunit=C\u00E1c \u0111\u01A1n v\u1ECB
-dhis-web-maintenance-dataset=C\u00E1c t\u1EADp d\u1EEF li\u1EC7u
-dhis-web-maintenance-datadictionary=C\u00E1c ph\u1EA7n t\u1EED d\u1EEF li\u1EC7u v\u00E0 C\u00E1c ch\u1EC9 s\u1ED1
-dhis-web-maintenance-dataadmin=Qu\u1EA3n tr\u1ECB d\u1EEF li\u1EC7u
-dhis-web-jforum-integration=Di\u1EC5n \u0111\u00E0n
-dhis-web-integration=T\u1ED5ng h\u1EE3p NHRM
-dhis-web-importexport=V\u00E0o-Ra d\u1EEF li\u1EC7u
-dhis-web-gis=B\u1EA3n \u0111\u1ED3 s\u1ED1
-dhis-web-datamart=D\u1EEF li\u1EC7u t\u1ED5ng h\u1EE3p
-dhis-web-dataentry=Nh\u1EADp d\u1EEF li\u1EC7u v\u00E0o
-dhis-web-dashboard=B\u1EA3ng \u0111i\u1EC1u khi\u1EC3n
-dhis-web-dashboard-integration=B\u1EA3ng \u0111i\u1EC1u khi\u1EC3n
+dhis-web-maintenance-organisationunit=C\u00e1c \u0111\u01a1n v\u1ecb
+dhis-web-maintenance-dataset=C\u00e1c t\u1eadp d\u1eef li\u1ec7u
+dhis-web-maintenance-datadictionary=C\u00e1c ph\u1ea7n t\u1eed d\u1eef li\u1ec7u v\u00e0 C\u00e1c ch\u1ec9 s\u1ed1
+dhis-web-maintenance-dataadmin=Qu\u1ea3n tr\u1ecb d\u1eef li\u1ec7u
+dhis-web-jforum-integration=Di\u1ec5n \u0111\u00e0n
+dhis-web-integration=T\u1ed5ng h\u1ee3p NHRM
+dhis-web-importexport=V\u00e0o-Ra d\u1eef li\u1ec7u
+dhis-web-gis=B\u1ea3n \u0111\u1ed3 s\u1ed1
+dhis-web-datamart=D\u1eef li\u1ec7u t\u1ed5ng h\u1ee3p
+dhis-web-dataentry=Nh\u1eadp d\u1eef li\u1ec7u v\u00e0o
+dhis-web-dashboard=B\u1ea3ng \u0111i\u1ec1u khi\u1ec3n
+dhis-web-dashboard-integration=B\u1ea3ng \u0111i\u1ec1u khi\u1ec3n
delete_top_background_color=X\u00f3a m\u00e0u n\u1ec1n ph\u00eda tr\u00ean
delete_title_color=X\u00f3a m\u00e0u c\u1ee7a d\u00f2ng ti\u00eau \u0111\u1ec1
delete_menu_element_colour=X\u00f3a m\u00e0u c\u1ee7a c\u00e1c th\u00e0nh ph\u1ea7n tr\u00ecnh \u0111\u01a1n
delete_left_background_color=X\u00f3a m\u00e0u n\u1ec1n b\u00ean tr\u00e1i
delete_background_color_in_menu=X\u00f3a m\u00e0u n\u1ec1n c\u1ee7a tr\u00ecnh \u0111\u01a1n
delete_active_menu_element_color=X\u00f3a m\u00e0u c\u1ee7a tr\u00ecnh \u0111\u01a1n k\u00edch ho\u1ea1t
-db_language=Ng\u00F4n ng\u1EEF c\u01A1 s\u1EDF d\u1EEF li\u1EC7u
-data_dictionary_mode=Ch\u1EBF \u0111\u1ED9 t\u1EEB \u0111i\u1EC3n d\u1EEF li\u1EC7u
-data_analysis_factor=Y\u1EBFu t\u1ED1 ph\u00E2n t\u00EDch d\u1EEF li\u1EC7u
-custom=L\u1EC1 th\u00F3i
-color_scheme=M\u1EABu m\u00E0u
-code=M\u00E3
+db_language=Ng\u00f4n ng\u1eef c\u01a1 s\u1edf d\u1eef li\u1ec7u
+data_dictionary_mode=Ch\u1ebf \u0111\u1ed9 t\u1eeb \u0111i\u1ec3n d\u1eef li\u1ec7u
+data_analysis_factor=Y\u1ebfu t\u1ed1 ph\u00e2n t\u00edch d\u1eef li\u1ec7u
+custom=L\u1ec1 th\u00f3i
+color_scheme=M\u1eabu m\u00e0u
+code=M\u00e3
choose_sort_order=Ch\u1ecdn th\u1ee9 t\u1ef1 s\u1eafp x\u1ebfp
choose_language=Ch\u1ecdn ng\u00f4n ng\u1eef
choose_display_property=Ch\u1ecdn ch\u1ebf \u0111\u1ed9 hi\u1ec3n th\u1ecb
choose_db_language=Ch\u1ecdn ng\u00f4n ng\u1eef c\u01a1 s\u1edf d\u1eef li\u1ec7u
botswana=Botswana
-blue=M\u00F9a xanh
+blue=M\u00f9a xanh
birt=BIRT
-background_color_in_menu=M\u00E0u n\u1EC1n c\u1EE7a thanh c\u00F4ng c\u1EE5
-auto_save_data_entry_form=T\u1EF1 l\u01B0u m\u1EABu nh\u1EADp d\u1EEF li\u1EC7u
+background_color_in_menu=M\u00e0u n\u1ec1n c\u1ee7a thanh c\u00f4ng c\u1ee5
+auto_save_data_entry_form=T\u1ef1 l\u01b0u m\u1eabu nh\u1eadp d\u1eef li\u1ec7u
armenia=Armenia
-application_title=Ti\u00EAu \u0111\u1EC1 \u1EE9ng d\u1EE5ng
+application_title=Ti\u00eau \u0111\u1ec1 \u1ee9ng d\u1ee5ng
alternativename=T\u00ean thay th\u1ebf
-active_menu_element_color=K\u00EDch ho\u1EA1t m\u00E0u c\u1EE7a thanh c\u00F4ng c\u1EE5
\ No newline at end of file
+active_menu_element_color=K\u00edch ho\u1ea1t m\u00e0u c\u1ee7a thanh c\u00f4ng c\u1ee5
+general_settings = Thi\u1ebft l\u1eadp t\u1ed5ng qu\u00e1t
+appearance_settings = Thi\u1ebft l\u1eadp giao di\u1ec7n
+smtp_settings = Thi\u1ebft l\u1eadp giao th\u1ee9c th\u01b0 \u0111i\u1ec7n t\u1eed
+host_name = \u0110\u1ecba ch\u1ec9 m\u00e1y ch\u1ee7 (URL)
+username = T\u00ean \u0111\u0103ng nh\u1eadp
+password = M\u1eadt kh\u1ea9u
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml 2011-06-23 14:44:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml 2011-10-05 07:03:07 +0000
@@ -14,17 +14,43 @@
<param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
</action>
- <!-- System settings -->
-
- <action name="systemSettings" class="org.hisp.dhis.settings.action.system.GetSystemSettingsAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-settings/systemSettings.vm</param>
- <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
- <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
- </action>
-
- <action name="setSystemSettings" class="org.hisp.dhis.settings.action.system.SetSystemSettingsAction">
- <result name="success" type="redirect">systemSettings.action</result>
+ <!-- General settings -->
+
+ <action name="generalSettings" class="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-settings/generalSettings.vm</param>
+ <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
+ <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
+ </action>
+
+ <action name="setGeneralSettings" class="org.hisp.dhis.settings.action.system.SetGeneralSettingsAction">
+ <result name="success" type="redirect">generalSettings.action</result>
+ </action>
+
+ <!-- Appearance settings -->
+
+ <action name="appearanceSettings" class="org.hisp.dhis.settings.action.system.GetAppearanceSettingsAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-settings/appearanceSettings.vm</param>
+ <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
+ <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
+ </action>
+
+ <action name="setAppearanceSettings" class="org.hisp.dhis.settings.action.system.SetAppearanceSettingsAction">
+ <result name="success" type="redirect">appearanceSettings.action</result>
+ </action>
+
+ <!-- Email settings -->
+
+ <action name="emailSettings" class="org.hisp.dhis.settings.action.system.GetSMTPSettingsAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-settings/emailSettings.vm</param>
+ <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
+ <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
+ </action>
+
+ <action name="setEmailSettings" class="org.hisp.dhis.settings.action.system.SetSMTPSettingsAction">
+ <result name="success" type="redirect">emailSettings.action</result>
</action>
<!-- User settings -->
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/appearanceSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/appearanceSettings.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/appearanceSettings.vm 2011-10-05 07:03:07 +0000
@@ -0,0 +1,46 @@
+
+<h3>$i18n.getString( "appearance_settings" )</h3>
+
+<form id="appearanceSettingForm" method="post" action="setAppearanceSettings.action">
+
+<!-- application_title -->
+<h4>$i18n.getString( "application_title" )</h4>
+
+<p><input type="text" name="applicationTitle" style="width:30em" maxlength="40" value="$!applicationTitle"/></p>
+
+<!-- style -->
+<h4>$i18n.getString( "style" )</h4>
+
+<select style="width:30em" name='currentStyle' id='currentStyle'>
+ #foreach( $style in $styles.entrySet() )
+ <option value="$style.value" #if( $style.value == $currentStyle )selected="selected"#end>$i18n.getString( $style.key )</option>
+ #end
+</select>
+
+<!-- flag -->
+<h4>$i18n.getString( "flag" )</h4>
+
+<p>
+<select name="flag" style="width:30em">
+ <option value="NO_FLAG">$i18n.getString( "no_flag" )</option>
+ #foreach ( $flag in $flags )
+ <option value="$flag" #if( $flag == $keyFlag )selected="selected"#end>$i18n.getString( $flag )</option>
+ #end
+</select>
+</p>
+
+<!-- start_page -->
+<h4>$i18n.getString( "start_page" )</h4>
+
+<p>
+<select name="startModule" style="width:30em">
+ <option value="NO_START_PAGE">$i18n.getString( "no_start_page" )</option>
+ #foreach ( $module in $modules )
+ <option value="$module.name" #if( $module.name == $startModule )selected="selected"#end>$i18n.getString( "$module.name" )</option>
+ #end
+</select>
+</p>
+
+<p><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/></p>
+
+</form>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/emailSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/emailSettings.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/emailSettings.vm 2011-10-05 07:03:07 +0000
@@ -0,0 +1,30 @@
+<script>
+ jQuery(document).ready(function() {
+ validation2( 'emailSettingForm', function( form ) {
+ form.submit();
+ }, {
+ "rules" : getValidationRules( "emailSettings" )
+ });
+ });
+</script>
+
+
+<h3>$i18n.getString( "smtp_settings" )</h3>
+
+<form id="emailSettingForm" method="post" action="setEmailSettings.action">
+
+<h4>$i18n.getString( "host_name" )</h4>
+
+<p><input type="text" id="smtpHostName" name="smtpHostName" style="width:20em" value="$!smtpHostName"/></p>
+
+<h4>$i18n.getString( "username" )</h4>
+
+<p><input type="text" id="smtpUsername" name="smtpUsername" value="$!smtpUsername" style="width:20em" autocomplete="off"/></p>
+
+<h4>$i18n.getString( "password" )</h4>
+
+<p><input type="password" id="smtpPassword" name="smtpPassword" value="$!smtpPassword" style="width:20em" autocomplete="off"/></p>
+
+<p><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/></p>
+
+</form>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/generalSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/generalSettings.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/generalSettings.vm 2011-10-05 07:03:07 +0000
@@ -0,0 +1,79 @@
+
+<h3>$i18n.getString( "general_settings" )</h3>
+
+<form id="generalSettingForm" method="post" action="setGeneralSettings.action">
+
+<!-- aggregation_strategy -->
+<h4>$i18n.getString( "aggregation_strategy" )</h4>
+
+<p><select name="aggregationStrategy" style="width:30em">
+ #foreach( $strategy in $aggregationStrategies )
+ <option value="$strategy" #if( $aggregationStrategy == $strategy )selected="selected"#end>$i18n.getString( $strategy )</option>
+ #end
+</select></p>
+
+<!-- infrastructural_data_elements -->
+<h4>$i18n.getString( "infrastructural_data_elements" )</h4>
+
+<p>
+<select name="infrastructuralDataElements" style="width:30em">
+ #foreach ( $group in $dataElementGroups )
+ <option value="$group.id" #if( $group.id == $configuration.infrastructuralDataElements.id )selected="selected"#end>$group.name</option>
+ #end
+</select>
+</p>
+
+<!-- infrastructural_period_type -->
+<h4>$i18n.getString( "infrastructural_period_type" )</h4>
+
+<p>
+<select name="infrastructuralPeriodType" style="width:30em">
+ #foreach ( $type in $periodTypes )
+ <option value="$type.name" #if( $type.name == $configuration.infrastructuralPeriodTypeDefaultIfNull.name )selected="selected"#end>$type.name</option>
+ #end
+</select>
+</p>
+
+<!-- feedback_recipients -->
+<h4>$i18n.getString( "feedback_recipients" )</h4>
+
+<p>
+<select name="feedbackRecipients" style="width:30em">
+ <option value="-1">$i18n.getString( "no_feedback_recipients" )</option>
+ #foreach ( $group in $userGroups )
+ <option value="$group.id" #if( $group.id == $!feedbackRecipients.id )selected="selected"#end>$encoder.htmlEncode( $group.name )</option>
+ #end
+</select>
+</p>
+
+<!-- omit_indicators_zero_numerator_data_mart -->
+<h4>$i18n.getString( "omit_indicators_zero_numerator_data_mart" )</h4>
+
+<p>
+ <input type="checkbox" id="omitIndicatorsZeroNumeratorDataMart" name="omitIndicatorsZeroNumeratorDataMart" value="true" #if( $omitIndicatorsZeroNumeratorDataMart )checked="checked"#end/>
+</p>
+
+<!-- disable_dataentry_when_dataset_completed -->
+<h4>$i18n.getString( "disable_dataentry_when_dataset_completed" )</h4>
+
+<p>
+ <input type="checkbox" id="disableDataEntryWhenCompleted" name="disableDataEntryWhenCompleted" value="true" #if( $dataEntryFormCompleted )checked="checked"#end/>
+</p>
+
+<!-- data_analysis_factor -->
+<h4>$i18n.getString( "data_analysis_factor" )</h4>
+
+<p>
+ <input type="text" id="factorDeviation" name="factorDeviation" value="$!factorDeviation"/>
+</p>
+
+<!-- days_after_period_timeliness -->
+<h4>$i18n.getString( "days_after_period_timeliness" )</h4>
+
+<p>
+ <input type="text" id="completenessOffset" name="completenessOffset" value="$!completenessOffset"/>
+</p>
+
+<p><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/></p>
+
+</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm 2011-05-31 12:24:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm 2011-10-05 07:03:07 +0000
@@ -9,6 +9,8 @@
<ul id="introList">
#introListImgItem( "userSettings.action" "user_settings" "usersettings" )
- #introListImgItem( "systemSettings.action" "system_settings" "systemsettings" )
+ #introListImgItem( "generalSettings.action" "general_settings" "systemsettings" )
+ #introListImgItem( "appearanceSettings.action" "appearance_settings" "systemsettings" )
+ #introListImgItem( "emailSettings.action" "smtp_settings" "systemsettings" )
</ul>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/settingsMenu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/settingsMenu.vm 2009-11-03 09:05:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/settingsMenu.vm 2011-10-05 07:03:07 +0000
@@ -1,5 +1,11 @@
-<h2>$i18n.getString( "settings" ) </h2>
+<h2>$i18n.getString( "user_settings" ) </h2>
<ul>
<li><a href="userSettings.action">$i18n.getString( "user_settings" ) </a></li>
- <li><a href="systemSettings.action">$i18n.getString( "system_settings" ) </a></li>
+</ul>
+
+<h2>$i18n.getString( "system_settings" ) </h2>
+<ul>
+ <li><a href="generalSettings.action">$i18n.getString( "general_settings" ) </a></li>
+ <li><a href="appearanceSettings.action">$i18n.getString( "appearance_settings" ) </a></li>
+ <li><a href="emailSettings.action">$i18n.getString( "smtp_settings" ) </a></li>
</ul>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2011-09-30 13:18:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 1970-01-01 00:00:00 +0000
@@ -1,115 +0,0 @@
-
-<h3>$i18n.getString( "system_settings" )</h3>
-
-<form id="systemSettingForm" method="post" action="setSystemSettings.action">
-
-<!-- TODO temporarily disabled
-
-<h4>$i18n.getString( "system_identifier" ) ($i18n.getString( "can_be_set_once" ))</h4>
-
-<p><input type="text" name="systemIdentifier" style="width:30em" maxlength="40" value="$!keySystemIdentifier"#if( $keySystemIdentifier ) disabled="disabled"#end/></p>
-
--->
-
-<h4>$i18n.getString( "application_title" )</h4>
-
-<p><input type="text" name="applicationTitle" style="width:30em" maxlength="40" value="$!applicationTitle"/></p>
-
-<h4>$i18n.getString( "aggregation_strategy" )</h4>
-
-<p>
-<select name="aggregationStrategy" style="width:30em">
- #foreach( $strategy in $aggregationStrategies )
- <option value="$strategy" #if( $aggregationStrategy == $strategy )selected="selected"#end>$i18n.getString( $strategy )</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "style" )</h4>
-
-<select style="width:30em" name='currentStyle' id='currentStyle'>
- #foreach( $style in $styles.entrySet() )
- <option value="$style.value" #if( $style.value == $currentStyle )selected="selected"#end>$i18n.getString( $style.key )</option>
- #end
-</select>
-
-<h4>$i18n.getString( "flag" )</h4>
-
-<p>
-<select name="flag" style="width:30em">
- <option value="NO_FLAG">$i18n.getString( "no_flag" )</option>
- #foreach ( $flag in $flags )
- <option value="$flag" #if( $flag == $keyFlag )selected="selected"#end>$i18n.getString( $flag )</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "start_page" )</h4>
-
-<p>
-<select name="startModule" style="width:30em">
- <option value="NO_START_PAGE">$i18n.getString( "no_start_page" )</option>
- #foreach ( $module in $modules )
- <option value="$module.name" #if( $module.name == $startModule )selected="selected"#end>$i18n.getString( "$module.name" )</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "infrastructural_data_elements" )</h4>
-
-<p>
-<select name="infrastructuralDataElements" style="width:30em">
- #foreach ( $group in $dataElementGroups )
- <option value="$group.id" #if( $group.id == $configuration.infrastructuralDataElements.id )selected="selected"#end>$group.name</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "infrastructural_period_type" )</h4>
-
-<p>
-<select name="infrastructuralPeriodType" style="width:30em">
- #foreach ( $type in $periodTypes )
- <option value="$type.name" #if( $type.name == $configuration.infrastructuralPeriodTypeDefaultIfNull.name )selected="selected"#end>$type.name</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "feedback_recipients" )</h4>
-
-<p>
-<select name="feedbackRecipients" style="width:30em">
- <option value="-1">$i18n.getString( "no_feedback_recipients" )</option>
- #foreach ( $group in $userGroups )
- <option value="$group.id" #if( $group.id == $!feedbackRecipients.id )selected="selected"#end>$encoder.htmlEncode( $group.name )</option>
- #end
-</select>
-</p>
-
-<h4>$i18n.getString( "omit_indicators_zero_numerator_data_mart" )</h4>
-
-<p>
- <input type="checkbox" id="omitIndicatorsZeroNumeratorDataMart" name="omitIndicatorsZeroNumeratorDataMart" value="true" #if( $omitIndicatorsZeroNumeratorDataMart )checked="checked"#end/>
-</p>
-
-<h4>$i18n.getString( "disable_dataentry_when_dataset_completed" )</h4>
-
-<p>
- <input type="checkbox" id="disableDataEntryWhenCompleted" name="disableDataEntryWhenCompleted" value="true" #if( $dataEntryFormCompleted )checked="checked"#end/>
-</p>
-
-<h4>$i18n.getString( "data_analysis_factor" )</h4>
-
-<p>
- <input type="text" id="factorDeviation" name="factorDeviation" value="$!factorDeviation"/>
-</p>
-
-<h4>$i18n.getString( "days_after_period_timeliness" )</h4>
-
-<p>
- <input type="text" id="completenessOffset" name="completenessOffset" value="$!completenessOffset"/>
-</p>
-
-<p><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/></p>
-
-</form>