← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1652: Date text field needs validation rule in data entry screen.

 

------------------------------------------------------------
revno: 1652
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-03-16 10:34:03 +0700
message:
  Date text field needs validation rule in data entry screen.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/date.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js


--
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-commons-resources/src/main/webapp/dhis-web-commons/util/date.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/date.js	2010-03-11 10:42:29 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/date.js	2010-03-16 03:34:03 +0000
@@ -193,7 +193,6 @@
 	var year=now.getYear();
 	var month=now.getMonth()+1;
 	var date=1;
-	
 	while (i_format < format.length) {
 		// Get next token from format string
 		c=format.charAt(i_format);
@@ -228,6 +227,7 @@
 					}
 				}
 			if ((month < 1)||(month>12)){return 0;}
+
 			}
 		else if (token=="EE"||token=="E"){
 			for (var i=0; i<DAY_NAMES.length; i++) {
@@ -238,7 +238,7 @@
 					}
 				}
 			}
-		else if (token=="MM"||token=="M") {
+		else if (token=="MM"||token=="M" || token=="mm") {
 			month=_getInt(val,i_val,token.length,2);
 			if(month==null||(month<1)||(month>12)){return 0;}
 			i_val+=month.length;}
@@ -266,6 +266,7 @@
 		}
 	// Correct hours value
 	var newdate=new Date(year,month-1,date);
+	
 	return newdate.getTime();
 	}
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js	2010-02-11 12:55:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/jquery.validate.js	2010-03-16 03:34:03 +0000
@@ -1002,7 +1002,8 @@
 	
 		// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
 		dateISO: function(value, element) {
-			return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
+			//return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
+			return this.optional(element) || isDate(value, 'yyyy-MM-dd');
 		},
 	
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java	2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java	2010-03-16 03:34:03 +0000
@@ -34,6 +34,7 @@
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 import org.hisp.dhis.dataset.CompleteDataSetRegistrationService;
 import org.hisp.dhis.de.state.SelectedStateManager;
+import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
 
 import com.opensymphony.xwork2.Action;
@@ -46,7 +47,7 @@
     implements Action
 {
     private static final Log log = LogFactory.getLog( RegisterCompleteDataSetAction.class );
-    
+
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -57,14 +58,14 @@
     {
         this.registrationService = registrationService;
     }
-    
+
     private SelectedStateManager selectedStateManager;
 
     public void setSelectedStateManager( SelectedStateManager selectedStateManager )
     {
         this.selectedStateManager = selectedStateManager;
     }
-    
+
     private I18nFormat format;
 
     public void setFormat( I18nFormat format )
@@ -82,24 +83,58 @@
     {
         this.date = date;
     }
-    
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
     public String execute()
     {
+        Date oDate;
+
+        if ( date == null || date.trim().length() == 0 )
+        {
+            message = i18n.getString( "enter_a_valid_inputting_date" );
+
+            return INPUT;
+        }
+        else
+        {
+            oDate = format.parseDate( date.trim() );
+
+            if ( oDate == null )
+            {
+                message = i18n.getString( "specify_an_inputing_date" );
+
+                return INPUT;
+            }
+        }
+
         CompleteDataSetRegistration registration = new CompleteDataSetRegistration();
-        
+
         registration.setDataSet( selectedStateManager.getSelectedDataSet() );
         registration.setPeriod( selectedStateManager.getSelectedPeriod() );
         registration.setSource( selectedStateManager.getSelectedOrganisationUnit() );
-        registration.setDate( ( date != null && date.trim().length() > 0 ) ? format.parseDate( date ) : new Date() );
-                
+        registration.setDate( oDate );
+
         registrationService.saveCompleteDataSetRegistration( registration );
-        
+
         log.info( "DataSet registered as complete: " + registration );
-        
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2010-03-15 18:41:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2010-03-16 03:34:03 +0000
@@ -116,4 +116,8 @@
 followup							= Follow-up
 interpolation						= Interpolation
 validation_rule						= Validation rule
+the_following_values_are_outliers   = The following values are considered as outliers (min-max or std dev).
+no_outlier_values_found				= No outlier values found.
+specify_an_inputing_date			= Please specify an inputing date
+enter_a_valid_inputting_date		= Please enter a valid inputing date
 no_outlier_values_found				= No outlier values found.
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2010-03-11 10:42:29 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2010-03-16 03:34:03 +0000
@@ -4,208 +4,235 @@
 "http://struts.apache.org/dtds/struts-2.0.dtd";>
 <struts>
 
-  <include file="dhis-web-commons.xml"/>
-  
-  <package name="dhis-web-dataentry" extends="dhis-web-commons"
-    namespace="/dhis-web-dataentry">
-    
-    <action name="index" class="org.hisp.dhis.de.action.EmptyAction">
-      <result name="success" type="redirect">select.action</result>
-    </action>
-    
-    <action name="select" class="org.hisp.dhis.de.action.SelectAction">
-      <interceptor-ref name="organisationUnitTreeStack"/>
-      <result name="defaultform" type="chain">defaultform</result>
-      <result name="sectionform" type="chain">sectionform</result>
-      <result name="multidimensionalform" type="chain">multidimensionalform</result>
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-dataentry/select.vm</param>
-      <param name="menu">/dhis-web-dataentry/menu.vm</param>
-      <param name="menuTreeHeight">420</param>
-      <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js</param>
-      <param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
-    </action>
-	  	  
-	<action name="nextPeriods" class="org.hisp.dhis.de.action.NextPeriodsAction">
-      <result name="success" type="redirect">select.action</result>
-    </action>
-    
-    <action name="previousPeriods" class="org.hisp.dhis.de.action.PreviousPeriodsAction">
-      <result name="success" type="redirect">select.action</result>
-    </action>
-    
-    <action name="defaultform" class="org.hisp.dhis.de.action.FormAction">
-      <interceptor-ref name="organisationUnitTreeStack"/>
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-dataentry/form.vm</param>
-      <param name="menu">/dhis-web-dataentry/menu.vm</param>
-      <param name="menuTreeHeight">420</param>
-      <param name="javascripts">
-        ../dhis-web-commons/ouwt/ouwt.js,
-        javascript/general.js,javascript/form.js,
-        javascript/form.js,../dhis-web-commons/calendar/calendar.js,
-        ../dhis-web-commons/calendar/calendar-lang.js,
-        ../dhis-web-commons/calendar/calendar-setup.js
-      </param>
-      <param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
-    </action>
-    
-    <action name="sectionform" class="org.hisp.dhis.de.action.SectionFormAction">
-      <interceptor-ref name="organisationUnitTreeStack"/>
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-dataentry/section/form.vm</param>
-      <param name="menu">/dhis-web-dataentry/menu.vm</param>
-      <param name="menuTreeHeight">420</param>
-      <param name="javascripts">
-        ../dhis-web-commons/ouwt/ouwt.js,
-        javascript/general.js,javascript/form.js,
-        ../dhis-web-commons/calendar/calendar.js,
-        ../dhis-web-commons/calendar/calendar-lang.js,
-        ../dhis-web-commons/calendar/calendar-setup.js
-      </param>
-      <param name="stylesheets">style/dhis-web-dataentry.css</param>
-    </action>
-    
-    <action name="multidimensionalform" class="org.hisp.dhis.de.action.multidimensional.FormAction">
-      <interceptor-ref name="organisationUnitTreeStack"/>
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-dataentry/multidimensional/form.vm</param>
-      <param name="menu">/dhis-web-dataentry/menu.vm</param>
-      <param name="menuTreeHeight">420</param>
-      <param name="javascripts">
-        ../dhis-web-commons/ouwt/ouwt.js,
-        javascript/general.js,javascript/form.js,javascript/multidimensional.js,
-        ../dhis-web-commons/calendar/calendar.js,
-        ../dhis-web-commons/calendar/calendar-lang.js,
-        ../dhis-web-commons/calendar/calendar-setup.js
-      </param>
-      <param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
-    </action>    
-    
-    <action name="saveMultiDimensionalValue" class="org.hisp.dhis.de.action.multidimensional.SaveValueAction">
-      <result name="success" type="velocity">status.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
-    </action>
-    
-    <action name="saveValue" class="org.hisp.dhis.de.action.SaveValueAction">
-      <result name="success" type="velocity">status.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
-    </action>    
-    
-    <action name="saveComment" class="org.hisp.dhis.de.action.SaveCommentAction">
-      <result name="success" type="velocity">status.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
-    </action>
-    
-    <action name="saveMinMaxLimits"
-      class="org.hisp.dhis.de.action.SaveMinMaxLimitsAction">
-      <result name="success" type="httpheader">
-        <param name="status">204</param>
-      </result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAELEMENT_MINMAX_ADD,F_DATAELEMENT_MINMAX_UPDATE</param>
-    </action>
-    
-    <action name="removeMinMaxLimits"
-      class="org.hisp.dhis.de.action.RemoveMinMaxLimitsAction">
-      <result name="success" type="httpheader">
-        <param name="status">204</param>
-      </result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAELEMENT_MINMAX_DELETE</param>
-    </action>
-    
-    <action name="calculateCDEs"
-      class="org.hisp.dhis.de.action.CalculateCDEsAction">
-      <result name="success" type="velocity-xml">responseCalculateCDEs.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
-    </action>
-    
-    <action name="getDataElementOrder"
-      class="org.hisp.dhis.de.action.order.GetDataElementOrderAction">
-      <result name="success" type="velocity">/popup.vm</result>
-      <param name="page">/dhis-web-dataentry/order.vm</param>
-      <param name="javascripts">javascript/order.js</param>
-    </action>
-    
-    <action name="moveDataElementUp"
-      class="org.hisp.dhis.de.action.order.MoveDataElementUpAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="moveDataElementDown"
-      class="org.hisp.dhis.de.action.order.MoveDataElementDownAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="orderDataElementsByCode"
-      class="org.hisp.dhis.de.action.order.OrderDataElementsByCodeAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="orderDataElementsByEntry"
-      class="org.hisp.dhis.de.action.order.OrderDataElementsByEntryAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="orderDataElementsByName"
-      class="org.hisp.dhis.de.action.order.OrderDataElementsByNameAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="resetDataElementOrder"
-      class="org.hisp.dhis.de.action.order.ResetDataElementOrderAction">
-      <result name="success" type="chain">getDataElementOrder</result>
-      <param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
-    </action>
-    
-    <action name="viewHistory" class="org.hisp.dhis.de.action.HistoryAction">
-      <result name="success" type="velocity">/popup.vm</result>
-      <param name="page">/dhis-web-dataentry/history.vm</param>
-      <param name="javascripts">javascript/history.js</param>
-    </action>
-    
-    <action name="minMaxGeneration" class="org.hisp.dhis.de.action.MinMaxGeneratingAction">
-      <result name="success" type="velocity-xml">responseMinMaxGeneration.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAELEMENT_MINMAX_ADD,F_DATAELEMENT_MINMAX_UPDATE</param>
-    </action>
-    
-    <action name="registerCompleteDataSet" class="org.hisp.dhis.de.action.RegisterCompleteDataSetAction">
-      <result name="success" type="velocity">/dhis-web-dataentry/responseVoid.vm</result>
-    </action>
-    
-    <action name="undoCompleteDataSet" class="org.hisp.dhis.de.action.UndoCompleteDataSetAction">
-      <result name="success" type="velocity">/dhis-web-dataentry/responseVoid.vm</result>
-    </action>
-    
-    <action name="validate" class="org.hisp.dhis.de.action.ValidationAction">
-      <result name="success" type="velocity">/popup.vm</result>
-      <result name="none" type="velocity">/popup.vm</result>
-      <param name="page">/dhis-web-dataentry/validationResult.vm</param>
-    </action>
-    
-    <action name="getValidationViolations" class="org.hisp.dhis.de.action.ValidationAction">
-      <result name="success" type="velocity-xml">/dhis-web-dataentry/responseSuccess.vm</result>
-      <result name="none" type="velocity-xml">/dhis-web-dataentry/responseNone.vm</result>
-    </action>
-	
-	<action name="markValueForFollowup" class="org.hisp.dhis.de.action.MarkForFollowupAction">
-	  <result name="success" type="velocity-xml">/dhis-web-dataentry/responseSuccess.vm</result>
-	</action>
-	
-	<action name="getHistoryChart" class="org.hisp.dhis.de.action.GetHistoryChartAction">
-		<result name="success" type="chart"></result>
-    </action>
-	
-  </package>
+	<include file="dhis-web-commons.xml" />
+
+	<package name="dhis-web-dataentry" extends="dhis-web-commons"
+		namespace="/dhis-web-dataentry">
+
+		<action name="index" class="org.hisp.dhis.de.action.EmptyAction">
+			<result name="success" type="redirect">select.action
+			</result>
+		</action>
+
+		<action name="select" class="org.hisp.dhis.de.action.SelectAction">
+			<interceptor-ref name="organisationUnitTreeStack" />
+			<result name="defaultform" type="chain">defaultform
+			</result>
+			<result name="sectionform" type="chain">sectionform
+			</result>
+			<result name="multidimensionalform" type="chain">multidimensionalform
+			</result>
+			<result name="success" type="velocity">/main.vm</result>
+			<param name="page">/dhis-web-dataentry/select.vm</param>
+			<param name="menu">/dhis-web-dataentry/menu.vm</param>
+			<param name="menuTreeHeight">420</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js,
+				../dhis-web-commons/util/date.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
+      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+			<param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
+		</action>
+
+		<action name="nextPeriods" class="org.hisp.dhis.de.action.NextPeriodsAction">
+			<result name="success" type="redirect">select.action
+			</result>
+		</action>
+
+		<action name="previousPeriods" class="org.hisp.dhis.de.action.PreviousPeriodsAction">
+			<result name="success" type="redirect">select.action
+			</result>
+		</action>
+
+		<action name="defaultform" class="org.hisp.dhis.de.action.FormAction">
+			<interceptor-ref name="organisationUnitTreeStack" />
+			<result name="success" type="velocity">/main.vm</result>
+			<param name="page">/dhis-web-dataentry/form.vm</param>
+			<param name="menu">/dhis-web-dataentry/menu.vm</param>
+			<param name="menuTreeHeight">420</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js,
+				javascript/general.js,javascript/form.js,
+				../dhis-web-commons/calendar/calendar.js,
+				../dhis-web-commons/calendar/calendar-lang.js,
+				../dhis-web-commons/calendar/calendar-setup.js,
+				../dhis-web-commons/util/date.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
+      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js
+      </param>
+			<param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
+		</action>
+
+		<action name="sectionform" class="org.hisp.dhis.de.action.SectionFormAction">
+			<interceptor-ref name="organisationUnitTreeStack" />
+			<result name="success" type="velocity">/main.vm</result>
+			<param name="page">/dhis-web-dataentry/section/form.vm</param>
+			<param name="menu">/dhis-web-dataentry/menu.vm</param>
+			<param name="menuTreeHeight">420</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js,
+				javascript/general.js,javascript/form.js,
+				../dhis-web-commons/calendar/calendar.js,
+				../dhis-web-commons/calendar/calendar-lang.js,
+				../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
+      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js
+      </param>
+			<param name="stylesheets">style/dhis-web-dataentry.css</param>
+		</action>
+
+		<action name="multidimensionalform"
+			class="org.hisp.dhis.de.action.multidimensional.FormAction">
+			<interceptor-ref name="organisationUnitTreeStack" />
+			<result name="success" type="velocity">/main.vm</result>
+			<param name="page">/dhis-web-dataentry/multidimensional/form.vm</param>
+			<param name="menu">/dhis-web-dataentry/menu.vm</param>
+			<param name="menuTreeHeight">420</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js,
+				javascript/general.js,javascript/form.js,javascript/multidimensional.js,
+				../dhis-web-commons/calendar/calendar.js,
+				../dhis-web-commons/calendar/calendar-lang.js,
+				../dhis-web-commons/calendar/calendar-setup.js
+      </param>
+			<param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
+		</action>
+
+		<action name="saveMultiDimensionalValue"
+			class="org.hisp.dhis.de.action.multidimensional.SaveValueAction">
+			<result name="success" type="velocity">status.vm</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
+		</action>
+
+		<action name="saveValue" class="org.hisp.dhis.de.action.SaveValueAction">
+			<result name="success" type="velocity">status.vm</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
+		</action>
+
+		<action name="saveComment" class="org.hisp.dhis.de.action.SaveCommentAction">
+			<result name="success" type="velocity">status.vm</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
+		</action>
+
+		<action name="saveMinMaxLimits" class="org.hisp.dhis.de.action.SaveMinMaxLimitsAction">
+			<result name="success" type="httpheader">
+				<param name="status">204</param>
+			</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAELEMENT_MINMAX_ADD,F_DATAELEMENT_MINMAX_UPDATE</param>
+		</action>
+
+		<action name="removeMinMaxLimits" class="org.hisp.dhis.de.action.RemoveMinMaxLimitsAction">
+			<result name="success" type="httpheader">
+				<param name="status">204</param>
+			</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAELEMENT_MINMAX_DELETE</param>
+		</action>
+
+		<action name="calculateCDEs" class="org.hisp.dhis.de.action.CalculateCDEsAction">
+			<result name="success" type="velocity-xml">responseCalculateCDEs.vm
+			</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
+		</action>
+
+		<action name="getDataElementOrder"
+			class="org.hisp.dhis.de.action.order.GetDataElementOrderAction">
+			<result name="success" type="velocity">/popup.vm</result>
+			<param name="page">/dhis-web-dataentry/order.vm</param>
+			<param name="javascripts">javascript/order.js</param>
+		</action>
+
+		<action name="moveDataElementUp"
+			class="org.hisp.dhis.de.action.order.MoveDataElementUpAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="moveDataElementDown"
+			class="org.hisp.dhis.de.action.order.MoveDataElementDownAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="orderDataElementsByCode"
+			class="org.hisp.dhis.de.action.order.OrderDataElementsByCodeAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="orderDataElementsByEntry"
+			class="org.hisp.dhis.de.action.order.OrderDataElementsByEntryAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="orderDataElementsByName"
+			class="org.hisp.dhis.de.action.order.OrderDataElementsByNameAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="resetDataElementOrder"
+			class="org.hisp.dhis.de.action.order.ResetDataElementOrderAction">
+			<result name="success" type="chain">getDataElementOrder
+			</result>
+			<param name="requiredAuthorities">F_DATASET_ORDER_CHANGE</param>
+		</action>
+
+		<action name="viewHistory" class="org.hisp.dhis.de.action.HistoryAction">
+			<result name="success" type="velocity">/popup.vm</result>
+			<param name="page">/dhis-web-dataentry/history.vm</param>
+			<param name="javascripts">javascript/history.js</param>
+		</action>
+
+		<action name="minMaxGeneration" class="org.hisp.dhis.de.action.MinMaxGeneratingAction">
+			<result name="success" type="velocity-xml">responseMinMaxGeneration.vm
+			</result>
+			<param name="onExceptionReturn">plainTextError</param>
+			<param name="requiredAuthorities">F_DATAELEMENT_MINMAX_ADD,F_DATAELEMENT_MINMAX_UPDATE</param>
+		</action>
+
+		<action name="registerCompleteDataSet"
+			class="org.hisp.dhis.de.action.RegisterCompleteDataSetAction">
+			<result name="success" type="velocity">
+				/dhis-web-dataentry/responseVoid.vm</result>
+			<result name="input" type="velocity-xml">
+				/dhis-web-dataentry/responseInput.vm</result>
+		</action>
+
+		<action name="undoCompleteDataSet"
+			class="org.hisp.dhis.de.action.UndoCompleteDataSetAction">
+			<result name="success" type="velocity">
+				/dhis-web-dataentry/responseVoid.vm</result>
+		</action>
+
+		<action name="validate" class="org.hisp.dhis.de.action.ValidationAction">
+			<result name="success" type="velocity">/popup.vm</result>
+			<result name="none" type="velocity">/popup.vm</result>
+			<param name="page">/dhis-web-dataentry/validationResult.vm</param>
+		</action>
+
+		<action name="getValidationViolations" class="org.hisp.dhis.de.action.ValidationAction">
+			<result name="success" type="velocity-xml">
+				/dhis-web-dataentry/responseSuccess.vm</result>
+			<result name="none" type="velocity-xml">/dhis-web-dataentry/responseNone.vm
+			</result>
+		</action>
+
+		<action name="markValueForFollowup" class="org.hisp.dhis.de.action.MarkForFollowupAction">
+			<result name="success" type="velocity-xml">
+				/dhis-web-dataentry/responseSuccess.vm</result>
+		</action>
+
+		<action name="getHistoryChart" class="org.hisp.dhis.de.action.GetHistoryChartAction">
+			<result name="success" type="chart"></result>
+		</action>
+
+	</package>
 </struts>

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm	2010-03-11 10:42:29 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm	2010-03-16 03:34:03 +0000
@@ -1,20 +1,36 @@
+<script>
+	jQuery(document).ready(function(){
+		jQuery("#completeForm").validate({
+		meta:"validate"
+		,errorElement:"td"
+		,submitHandler: function(form)
+		{
+			//validateCompleteDataSet();
+		}
+		});
+	jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+});
+</script>
+<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>
 
+<form id="completeForm">
 <hr style="clear:both">
 
 <table>
 	<tr>
 	    <td style="min-width:95px"><label for="completeButton">$i18n.getString( "complete" )</label></td>
 	    <td>
-	        <input type="button" id="completeButton" name="completeButton" value="$i18n.getString( 'complete' )" onclick="validateCompleteDataSet()"#if( $registration || $periods.size() == 0 ) disabled="disabled"#end>
-	        <input type="button" id="undoButton" name="undoButton" value="$i18n.getString( 'undo' )" onclick="undoCompleteDataSet()"#if( !$registration || $periods.size() == 0 ) disabled="disabled"#end>
-	        <input type="text" id="dateField" name="dateField" value="$!format.formatDate( $registrationDate )" style="width:160px"#if( $registration || $periods.size() == 0 ) disabled="disabled"#end>
-	        <div id="dateDiv" name="dateDiv" #if( $registration || $periods.size() == 0 ) style="display:none"#else style="display:inline"#end>
-	        <img src="../images/calendar_icon.gif" width="16" height="16" id="getDateField" cursor: pointer;" title="$i18n.getString( "date_selector" )" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''">
-	        </div>
+	    </td><td>    <input type="button" id="completeButton" name="completeButton" value="$i18n.getString( 'complete' )" onclick="validateCompleteDataSet()"#if( $registration || $periods.size() == 0 ) disabled="disabled"#end>
+	    </td><td>    <input type="button" id="undoButton" name="undoButton" value="$i18n.getString( 'undo' )" onclick="undoCompleteDataSet()"#if( !$registration || $periods.size() == 0 ) disabled="disabled"#end>
+	    </td><td>    <input type="text" id="dateField" name="dateField" value="$!format.formatDate( $registrationDate )" style="width:160px"#if( $registration || $periods.size() == 0 ) disabled="disabled"#end class="{validate:{required:true,dateISO:true}}">
+	     </td><td>   <div id="dateDiv" name="dateDiv" #if( $registration || $periods.size() == 0 ) style="display:none"#else style="display:inline"#end>
+	     </td><td>   <img src="../images/calendar_icon.gif" width="16" height="16" id="getDateField" cursor: pointer;" title="$i18n.getString( "date_selector" )" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''">
+	        </div></td><td>
 	    </td>
 	</tr>
 </table>
-
+<span id="message"></span>
+</form>
 <script type="text/javascript">
     Calendar.setup({
         inputField     :    "dateField",      // id of the input field

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2010-03-15 18:41:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2010-03-16 03:34:03 +0000
@@ -276,18 +276,20 @@
 {
     var type = messageElement.getAttribute( 'type' );
     
-    if ( type != "none" )
-    {
-    	window.open( 'validate.action', '_blank', 'width=800, height=400, scrollbars=yes, resizable=yes' );
-    }
-    
-    var date = document.getElementById( "dateField" ).value;
-
-    var url = "registerCompleteDataSet.action?date=" + date;
-
-    var request = new Request();
-    request.setCallbackSuccess( registerReceived );
-    request.send( url );
+    if ( type == "none" )
+    {
+        var date = document.getElementById( "dateField" ).value;
+    
+        var url = "registerCompleteDataSet.action?date=" + date;
+    
+        var request = new Request();
+        request.setCallbackSuccess( registerReceived );
+        request.send( url );
+    }
+    else
+    {
+        window.open( 'validate.action', '_blank', 'width=800, height=400, scrollbars=yes, resizable=yes' );
+    }
 }
 
 function registerReceived( messageElement )