← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4850: System settings - Changed to jQuery instead of using form submit.

 

------------------------------------------------------------
revno: 4850
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-10-06 14:05:49 +0700
message:
  System settings - Changed to jQuery instead of using form submit.
removed:
  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
added:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemEmailSettings.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm
modified:
  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/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-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	2011-10-05 07:03:07 +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-06 07:05:49 +0000
@@ -32,6 +32,7 @@
 import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
 
 import org.apache.commons.lang.StringUtils;
+import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.options.SystemSettingManager;
 import org.hisp.dhis.options.style.StyleManager;
 
@@ -94,6 +95,20 @@
         this.currentStyle = style;
     }
 
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -111,12 +126,14 @@
         {
             startModule = null;
         }
-        
+
         systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
         systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
         systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
         styleManager.setSystemStyle( currentStyle );
 
+        message = i18n.getString( "settings_updated" );
+
         return SUCCESS;
     }
 }

=== modified 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	2011-10-05 07:03:07 +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-06 07:05:49 +0000
@@ -36,6 +36,7 @@
 import org.hisp.dhis.configuration.Configuration;
 import org.hisp.dhis.configuration.ConfigurationService;
 import org.hisp.dhis.dataelement.DataElementService;
+import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.options.SystemSettingManager;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
@@ -149,6 +150,20 @@
         this.completenessOffset = completenessOffset;
     }
 
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -184,6 +199,8 @@
 
         configurationService.setConfiguration( configuration );
 
+        message = i18n.getString( "settings_updated" );
+        
         return SUCCESS;
     }
 }

=== modified 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	2011-10-05 07:03:07 +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-06 07:05:49 +0000
@@ -30,6 +30,7 @@
 import static org.hisp.dhis.options.SystemSettingManager.KEY_EMAIL_PASSWORD;
 import static org.hisp.dhis.options.SystemSettingManager.KEY_EMAIL_USERNAME;
 
+import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.options.SystemSettingManager;
 
 import com.opensymphony.xwork2.Action;
@@ -44,7 +45,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-    
+
     private SystemSettingManager systemSettingManager;
 
     public void setSystemSettingManager( SystemSettingManager systemSettingManager )
@@ -77,6 +78,20 @@
         this.smtpPassword = password;
     }
 
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -84,12 +99,13 @@
     public String execute()
     {
         systemSettingManager.saveSystemSetting( KEY_EMAIL_HOST_NAME, smtpHostName );
-        
+
         systemSettingManager.saveSystemSetting( KEY_EMAIL_PASSWORD, smtpPassword );
-        
+
         systemSettingManager.saveSystemSetting( KEY_EMAIL_USERNAME, smtpUsername );
 
+        message = i18n.getString( "settings_updated" );
+
         return SUCCESS;
     }
-
 }

=== 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-10-05 13:46:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2011-10-06 07:05:49 +0000
@@ -110,4 +110,5 @@
 infrastructural_data_elements = Infrastructural data elements
 infrastructural_period_type = Infrastructural period type
 feedback_recipients = Feedback recipients
-no_feedback_recipients = No message recipients
\ No newline at end of file
+no_feedback_recipients = No message recipients
+settings_updated = Settings were updated
\ No newline at end of file

=== 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-10-05 07:03:07 +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-06 07:05:49 +0000
@@ -120,9 +120,10 @@
 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
-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
+general = Thi\u1ebft l\u1eadp t\u1ed5ng qu\u00e1t
+appearance = Thi\u1ebft l\u1eadp giao di\u1ec7n
+email = 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
+password = M\u1eadt kh\u1ea9u
+settings_updated = C\u00e1c thi\u1ebft l\u1eadp \u0111\u00e3 \u0111\u01b0\u1ee3c thay \u0111\u1ed5i
\ 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-10-05 07:03:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml	2011-10-06 07:05:49 +0000
@@ -16,41 +16,47 @@
     
     <!-- General settings -->
 
-    <action name="generalSettings" class="org.hisp.dhis.settings.action.system.GetGeneralSettingsAction">
+    <action name="systemGeneralSettings" 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="page">/dhis-web-maintenance-settings/systemGeneralSettings.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 name="setSystemGeneralSettings" class="org.hisp.dhis.settings.action.system.SetGeneralSettingsAction">
+      <result name="success" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+	  <param name="onExceptionReturn">plainTextError</param>
     </action>
 	
     <!-- Appearance settings -->
 
-    <action name="appearanceSettings" class="org.hisp.dhis.settings.action.system.GetAppearanceSettingsAction">
+    <action name="systemAppearanceSettings" 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="page">/dhis-web-maintenance-settings/systemAppearanceSettings.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 name="setSystemAppearanceSettings" class="org.hisp.dhis.settings.action.system.SetAppearanceSettingsAction">
+      <result name="success" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+	  <param name="onExceptionReturn">plainTextError</param>
     </action>
 	
     <!-- Email settings -->
 
-    <action name="emailSettings" class="org.hisp.dhis.settings.action.system.GetSMTPSettingsAction">
+    <action name="systemEmailSettings" 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="page">/dhis-web-maintenance-settings/systemEmailSettings.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 name="setSystemEmailSettings" class="org.hisp.dhis.settings.action.system.SetSMTPSettingsAction">
+      <result name="success" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+	  <param name="onExceptionReturn">plainTextError</param>
     </action>
     
     <!-- User settings -->

=== removed 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	2011-10-05 13:46:03 +0000
+++ 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
@@ -1,46 +0,0 @@
-
-<h3>$i18n.getString( "system_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>

=== removed 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	2011-10-05 13:46:03 +0000
+++ 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
@@ -1,30 +0,0 @@
-<script>
-	jQuery(document).ready(function() {
-		validation2( 'emailSettingForm', function( form ) {
-			form.submit();
-		}, {
-			"rules" : getValidationRules( "emailSettings" )
-		});
-	});
-</script>
-
-
-<h3>$i18n.getString( "system_email_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>

=== removed 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	2011-10-05 13:46:03 +0000
+++ 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
@@ -1,79 +0,0 @@
-
-<h3>$i18n.getString( "system_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-10-05 13:46:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/index.vm	2011-10-06 07:05:49 +0000
@@ -9,8 +9,8 @@
 
 <ul id="introList">
     #introListImgItem( "userSettings.action" "user_general_settings" "usersettings" )
-    #introListImgItem( "generalSettings.action" "system_general_settings" "systemsettings" )
-    #introListImgItem( "appearanceSettings.action" "system_appearance_settings" "systemsettings" )
-    #introListImgItem( "emailSettings.action" "system_email_settings" "systemsettings" )
+    #introListImgItem( "systemGeneralSettings.action" "system_general_settings" "systemsettings" )
+    #introListImgItem( "systemAppearanceSettings.action" "system_appearance_settings" "systemsettings" )
+    #introListImgItem( "systemEmailSettings.action" "system_email_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	2011-10-05 13:46:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/settingsMenu.vm	2011-10-06 07:05:49 +0000
@@ -5,7 +5,7 @@
 
 <h2>$i18n.getString( "system_settings" )&nbsp;</h2>
 <ul>
-	<li><a href="generalSettings.action">$i18n.getString( "general" )&nbsp;</a></li>
-	<li><a href="appearanceSettings.action">$i18n.getString( "appearance" )&nbsp;</a></li>
-	<li><a href="emailSettings.action">$i18n.getString( "email" )&nbsp;</a></li>
+	<li><a href="systemGeneralSettings.action">$i18n.getString( "general" )&nbsp;</a></li>
+	<li><a href="systemAppearanceSettings.action">$i18n.getString( "appearance" )&nbsp;</a></li>
+	<li><a href="systemEmailSettings.action">$i18n.getString( "email" )&nbsp;</a></li>
 </ul>

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.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/systemAppearanceSettings.vm	2011-10-06 07:05:49 +0000
@@ -0,0 +1,57 @@
+<script>
+	jQuery(document).ready(function() {
+		jQuery("input[type=button]").click(function() {
+			jQuery.postUTF8( 'setSystemAppearanceSettings.action', {
+				applicationTitle: getFieldValue( 'applicationTitle' ),
+				currentStyle: getFieldValue( 'currentStyle' ),
+				flag: getFieldValue( 'flag' ),
+				startModule: getFieldValue( 'startModule' )
+			}, function( json ) {
+				if ( json.response == "success" )
+					setHeaderDelayMessage( json.message );
+			});
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "appearance_settings" )</h3>
+
+<!-- application_title -->
+<h4>$i18n.getString( "application_title" )</h4>
+
+<p><input type="text" id="applicationTitle" name="applicationTitle" style="width:30em" maxlength="40" value="$!applicationTitle"/></p>
+
+<!-- style -->
+<h4>$i18n.getString( "style" )</h4>
+
+<select id='currentStyle' name='currentStyle' style="width:30em">
+	#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 id="flag" 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 id="startModule" 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="button" value="$i18n.getString( 'save' )" style="width:10em"/></p>
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemEmailSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemEmailSettings.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/systemEmailSettings.vm	2011-10-06 07:05:49 +0000
@@ -0,0 +1,37 @@
+<script>
+	jQuery(document).ready(function() {
+		validation2( 'emailSettingForm', function( form ) {
+			jQuery.postUTF8( 'setSystemEmailSettings.action', {
+				smtpHostName: getFieldValue( 'smtpHostName' ),
+				smtpUsername: getFieldValue( 'smtpUsername' ),
+				smtpPassword: getFieldValue( 'smtpPassword' )
+			}, function( json ) {
+				if ( json.response == "success" )
+					setHeaderDelayMessage( json.message );
+			});
+		}, {
+			"rules" : getValidationRules( "emailSettings" )
+		});
+	});
+</script>
+
+
+<h3>$i18n.getString( "smtp_settings" )</h3>
+
+<form id="emailSettingForm">
+
+<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/systemGeneralSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.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/systemGeneralSettings.vm	2011-10-06 07:05:49 +0000
@@ -0,0 +1,94 @@
+<script>
+	jQuery(document).ready(function() {
+		jQuery("input[type=button]").click(function() {
+			jQuery.postUTF8( 'setSystemGeneralSettings.action', {
+				aggregationStrategy: getFieldValue( 'aggregationStrategy' ),
+				infrastructuralDataElements: getFieldValue( 'infrastructuralDataElements' ),
+				infrastructuralPeriodType: getFieldValue( 'infrastructuralPeriodType' ),
+				feedbackRecipients: getFieldValue( 'feedbackRecipients' ),
+				omitIndicatorsZeroNumeratorDataMart: getFieldValue( 'omitIndicatorsZeroNumeratorDataMart' ),
+				disableDataEntryWhenCompleted: getFieldValue( 'disableDataEntryWhenCompleted' ),
+				factorDeviation: getFieldValue( 'factorDeviation' ),
+				completenessOffset: getFieldValue( 'completenessOffset' )
+			}, function( json ) {
+				if ( json.response == "success" )
+					setHeaderDelayMessage( json.message );
+			});
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "general_settings" )</h3>
+
+<!-- aggregation_strategy -->
+<h4>$i18n.getString( "aggregation_strategy" )</h4>
+
+<p><select id="aggregationStrategy" 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 id="infrastructuralDataElements" 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 id="infrastructuralPeriodType" 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 id="feedbackRecipients" 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="button" value="$i18n.getString( 'save' )" style="width:10em"/></p>
\ No newline at end of file