← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1849: update validateMessage form for patient module

 

------------------------------------------------------------
revno: 1849
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Wed 2010-07-14 10:04:25 +0700
message:
  update validateMessage form for patient module
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.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-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-07-03 17:20:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-07-14 03:04:25 +0000
@@ -765,9 +765,30 @@
 		dayNamesMin: dayNamesMin,
 		showOn: 'both',
 		buttonImage: '../images/calendar.png',
-		buttonImageOnly: true
-	});
-}
+		buttonImageOnly: true		
+	});
+}
+
+/**
+ * Create jQuery datepicker for input text with id * * 
+ * @param id the id of input filed which you want enter date *
+ */
+function datePickerValid( id )
+{
+	$("#" + id).datepicker(
+	{
+		dateFormat:dateFormat,
+		changeMonth: true,
+		changeYear: true,			
+		monthNamesShort: monthNames,
+		dayNamesMin: dayNamesMin,
+		showOn: 'both',
+		buttonImage: '../images/calendar.png',
+		buttonImageOnly: true,
+		maxDate: '+0d +0w'
+	});
+}
+
 
 /**
  * Create jQuery datepicker for start date and end ate text with id * * 

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/manager/DefaultOrganisationUnitSelectionManager.java	2010-07-14 03:04:25 +0000
@@ -40,7 +40,8 @@
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: DefaultOrganisationUnitSelectionManager.java 5652 2008-09-06 13:24:34Z larshelg $
+ * @version $Id: DefaultOrganisationUnitSelectionManager.java 5652 2008-09-06
+ *          13:24:34Z larshelg $
  */
 public class DefaultOrganisationUnitSelectionManager
     implements OrganisationUnitSelectionManager
@@ -117,7 +118,7 @@
         OrganisationUnit randomRootUnit = rootUnits.iterator().next();
 
         OrganisationUnit reloadedRootUnit = reloadOrganisationUnit( randomRootUnit );
-
+       
         return reloadedRootUnit.getParent();
     }
 
@@ -252,30 +253,31 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
-    private Collection<OrganisationUnit> getUnitsInTree( Collection<OrganisationUnit> rootUnits, Collection<OrganisationUnit> selectedUnits )
+    private Collection<OrganisationUnit> getUnitsInTree( Collection<OrganisationUnit> rootUnits,
+        Collection<OrganisationUnit> selectedUnits )
     {
         Collection<OrganisationUnit> unitsInTree = new ArrayList<OrganisationUnit>();
-        
+
         for ( OrganisationUnit selectedUnit : selectedUnits )
         {
-            if  ( rootUnits.contains( selectedUnit ) )
+            if ( rootUnits.contains( selectedUnit ) )
             {
                 unitsInTree.add( selectedUnit );
             }
-                        
+
             OrganisationUnit parent = selectedUnit.getParent();
-            
+
             while ( parent != null )
             {
                 if ( rootUnits.contains( parent ) )
                 {
                     unitsInTree.add( selectedUnit );
                 }
-                
+
                 parent = parent.getParent();
             }
         }
-        
+
         return unitsInTree;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2010-07-02 10:12:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2010-07-14 03:04:25 +0000
@@ -50,7 +50,10 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/addRelationshipTypeForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/relationship.js</param>
+			<param name="javascripts">
+				javascript/relationship.js
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_RELATIONSHIPTYPE_ADD</param>
 		</action>
 
@@ -59,7 +62,10 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/relationship.js</param>
+			<param name="javascripts">
+				javascript/relationship.js
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
 		</action>
 
@@ -121,7 +127,11 @@
 			<param name="page">/dhis-web-maintenance-patient/addRelationshipForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
 			<param name="menuTreeHeight">321</param>
-			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/relationship.js</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js,javascript/relationship.js
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
+			</param>
 			<param name="requiredAuthorities">F_RELATIONSHIP_ADD</param>
 		</action>
 
@@ -186,15 +196,12 @@
 			<param name="javascripts">
 				../dhis-web-commons/ouwt/ouwt.js
 				,../dhis-web-commons/util/date.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/validate/messages_locale.js
-				,../dhis-web-commons/util/jquery.metadata.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,javascript/jquery/thickbox/thickbox-compressed.js
-				,javascript/relationshipPatient.js</param>
+				,javascript/relationshipPatient.js
+				,../dhis-web-commons/validationMessages.action			
+			</param>
 			<param name="stylesheets">javascript/jquery/thickbox/thickbox.css</param>
 			<param name="requiredAuthorities">F_PATIENT_ADD</param>
 		</action>
@@ -254,8 +261,9 @@
 				/dhis-web-maintenance-patient/addPatientAttributeForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
 			<param name="javascripts">javascript/patientAttribute.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/validationMessages.action</param>
+				,../dhis-web-commons/util/validate/jquery.validate.js
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_ADD</param>
 		</action>
 
@@ -266,8 +274,9 @@
 				/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
 			<param name="javascripts">javascript/patientAttribute.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/validationMessages.action
+				,../dhis-web-commons/util/validate/jquery.validate.js
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
 				,javascript/jquery/cluetip/jquery.cluetip.min.js</param>
 			<param name="stylesheets">javascript/jquery/cluetip/jquery.cluetip.css</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
@@ -309,7 +318,7 @@
 			<param name="page">/dhis-web-maintenance-patient/updatePatientAttributeValueForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
 			<param name="menuTreeHeight">321</param>
-			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/patientAttributeValue.js,../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/patientAttributeValue.js,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTEVALUE_UPDATE</param>
 		</action>
 
@@ -418,16 +427,13 @@
 			<param name="menuTreeHeight">285</param>
 			<param name="javascripts">
 				../dhis-web-commons/ouwt/ouwt.js
-				,../dhis-web-commons/util/date.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/validationMessages.action
-				,../dhis-web-commons/util/jquery.metadata.js
+				,../dhis-web-commons/util/date.js				
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,javascript/jquery/thickbox/thickbox-compressed.js
-				,javascript/patient.js</param>
+				,javascript/patient.js
+				,../dhis-web-commons/validationMessages.action			
+			</param>
 			<param name="stylesheets">javascript/jquery/thickbox/thickbox.css</param>
 			<param name="requiredAuthorities">F_PATIENT_ADD</param>
 		</action>
@@ -442,17 +448,14 @@
 			<param name="menuTreeHeight">285</param>
 			<param name="javascripts">
 				../dhis-web-commons/ouwt/ouwt.js
-				,../dhis-web-commons/util/date.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/validationMessages.action
-				,../dhis-web-commons/util/jquery.metadata.js
+				,../dhis-web-commons/util/date.js				
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,javascript/jquery/thickbox/thickbox-compressed.js
 				,javascript/jquery/cluetip/jquery.cluetip.min.js
-				,javascript/patient.js</param>
+				,javascript/patient.js
+				,../dhis-web-commons/validationMessages.action				
+			</param>
 			<param name="stylesheets">javascript/jquery/thickbox/thickbox.css,javascript/jquery/cluetip/jquery.cluetip.css</param>
 			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
 		</action>
@@ -480,12 +483,8 @@
 			<result name="success" type="velocity">/popup.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/underAgeForm.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/util/jquery-ui.js
-				,../dhis-web-commons/util/jquery.metadata.js
-				,../dhis-web-commons/util/date.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/jquery-ui.js				
+				,../dhis-web-commons/util/date.js			
 				,../dhis-web-commons/util/validate/jquery.validate.js
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,../dhis-web-commons/validationMessages.action
@@ -516,12 +515,8 @@
 			<param name="menuTreeHeight">321</param>
 			<param name="page">/dhis-web-maintenance-patient/programEnrollmentSelectForm.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.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/ouwt/ouwt.js			
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,../dhis-web-commons/validationMessages.action
 				,javascript/patient.js</param>
@@ -535,7 +530,10 @@
 			<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
 			<param name="menuTreeHeight">321</param>
 			<param name="page">/dhis-web-maintenance-patient/programEnrollmentForm.vm</param>
-			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,javascript/patient.js</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js
+				javascript/patient.js
+			</param>
 			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
 		</action>
 
@@ -557,7 +555,7 @@
 			<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
 			<param name="menuTreeHeight">321</param>
 			<param name="page">/dhis-web-maintenance-patient/programEnrollmentForm.vm</param>
-			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,javascript/patient.js</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/patient.js</param>
 		</action>
 
 		<action name="removeEnrollment"
@@ -609,9 +607,11 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/addProgramForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/program.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/validationMessages.action</param>
+			<param name="javascripts">
+				javascript/program.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_PROGRAM_ADD</param>
 		</action>
 
@@ -620,9 +620,12 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/updateProgramForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/program.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/validationMessages.action</param>
+			<param name="javascripts">
+				javascript/program.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
+			</param>
 			<param name="requiredAuthorities">F_PROGRAM_UPDATE</param>
 		</action>
 
@@ -711,7 +714,8 @@
 			<param name="javascripts">
 				../dhis-web-commons/oust/oust.js
 				,javascript/associations.js
-				,javascript/program.js</param>
+				,javascript/program.js
+			</param>
 			<param name="requiredAuthorities">F_PROGRAM_UPDATE</param>
 		</action>
 		
@@ -732,7 +736,8 @@
 				../dhis-web-commons/oust/oust.js
 				,javascript/associations.js
 				,javascript/program.js
-				,javascript/programStageDEValidation.js</param>
+				,javascript/programStageDEValidation.js
+			</param>
 			<param name="requiredAuthorities">F_PROGRAM_UPDATE</param>
 		</action>
 		
@@ -835,8 +840,12 @@
 			class="org.hisp.dhis.patient.action.dataentryform.ViewDataEntryFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/viewDataEntryForm.vm</param>
-			<param name="javascripts">../dhis-web-commons/util/jquery-ui.js,javascript/dataEntryForm.js,javascript/FCK/fckeditor.js,javascript/hashtable.js</param>
-			<param name="stylesheets"></param>
+			<param name="javascripts">
+				../dhis-web-commons/util/jquery-ui.js
+				,javascript/dataEntryForm.js
+				,javascript/FCK/fckeditor.js
+				,javascript/hashtable.js
+			</param>			
 		</action>
 
 		<action name="saveDataEntryForm"
@@ -946,10 +955,9 @@
 			<param name="page">/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
 			<param name="javascripts">javascript/patientAttributeGroup.js
-				,../dhis-web-commons/util/validate/jquery.validate.js
-				,../dhis-web-commons/validationMessages.action
-				,../dhis-web-commons/util/jquery.metadata.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action				
 			</param>
 			<param name="stylesheets">style/basic.css</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_ADD</param>
@@ -960,7 +968,12 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/patientAttributeGroup.js</param>
+			<param name="javascripts">
+				javascript/patientAttributeGroup.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
+			</param>
 			<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
 		</action>
 
@@ -988,9 +1001,12 @@
 			<param name="page">
 				/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/patientIdentifierType.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/validationMessages.action</param>
+			<param name="javascripts">
+				javascript/patientIdentifierType.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
+			</param>
 			<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_ADD</param>
 		</action>
 		
@@ -1011,9 +1027,12 @@
 			<param name="page">
 				/dhis-web-maintenance-patient/updatePatientIdentifierType.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/patientIdentifierType.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/validationMessages.action</param>
+			<param name="javascripts">
+				javascript/patientIdentifierType.js
+				,../dhis-web-commons/util/validate/jquery.validate.js				
+				,../dhis-web-commons/util/validate/additional-methods.js
+				,../dhis-web-commons/validationMessages.action
+			</param>
 			<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_UPDATE</param>
 		</action>
 	
@@ -1061,7 +1080,7 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-maintenance-patient/caseAggMapping.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
-			<param name="javascripts">javascript/caseaggregation.js,../dhis-web-commons/util/jquery.metadata.js</param>
+			<param name="javascripts">javascript/caseaggregation.js</param>
 		</action>
 
 		<action name="getAggDataElements"
@@ -1109,12 +1128,8 @@
 			<param name="page">/dhis-web-maintenance-patient/addValidationCriteria.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
 			<param name="javascripts">
-				javascript/validationcriteria.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
+				javascript/validationcriteria.js	
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,../dhis-web-commons/validationMessages.action</param>
 			<param name="requiredAuthorities">F_VALIDATIONCRITERIA_ADD</param>
@@ -1132,12 +1147,8 @@
 			<param name="page">/dhis-web-maintenance-patient/updateValidationCriteria.vm</param>
 			<param name="menu">/dhis-web-maintenance-patient/menu.vm</param>
 			<param name="javascripts">
-				javascript/validationcriteria.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
+				javascript/validationcriteria.js			
+				,../dhis-web-commons/util/validate/jquery.validate.js				
 				,../dhis-web-commons/util/validate/additional-methods.js
 				,../dhis-web-commons/validationMessages.action
 			</param>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2010-06-23 19:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2010-07-14 03:04:25 +0000
@@ -14,7 +14,7 @@
 										     validateAddPatientAttribute();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 				jQuery("#attributeComboRow").hide();
 			}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm	2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 										validateAddPatientAttributeGroup();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 			}
 	);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2010-06-29 13:33:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2010-07-14 03:04:25 +0000
@@ -29,14 +29,13 @@
 									validateAddPatient();
 								}
 			});
-			jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+			jQuery.validator.setMessages( validationMessage );
 			jQuery("#firstName").focus();
-			var dateFormat = '$encoder.jsEscape( $i18n.getString( "format.date.label" ) , "'")'; 
-			jQuery("#birthDate").rules("add",{required:true,dateISO:true,datelessthanequaltoday:true});
+			
+			datePickerValid( 'birthDate' );
 		});
 </script>
-<h3>$i18n.getString( "add_new_patient" )</h3>
-<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>	
+<h3>$i18n.getString( "add_new_patient" )</h3>	
 																			
 <form id="addPatientForm" action="addPatient.action" method="post">
 <input type="hidden" id="representativeId" name="representativeId"/> 
@@ -78,8 +77,7 @@
 	</tr>
 	<tr>
 		<td><label for="birthDate">$i18n.getString( "date_of_birth" )<em title="$i18n.getString( "required" )" class="required">*</em> </label></td>
-		<td>
-			<img src="../images/calendar_icon.gif" width="16" height="16" id="getBirthDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "date_of_birth" )">
+		<td>			
 			<input type="text" id="birthDate" name="birthDate" style="width:10em"  onchange="bdOnchange()" >
 			&nbsp;
 			<label for="age">$i18n.getString( "or" )  $i18n.getString( "age" ) </label>
@@ -239,16 +237,7 @@
 
 <span id="message"></span>
 
-<script type="text/javascript">
-    Calendar.setup({
-        inputField     :    "birthDate"      // id of the input field
-        ,ifFormat      :    "$i18n.getString("format.date.label")"       // format of the input field
-        ,button        :    "getBirthDate"   // trigger for the calendar (button ID)
-        ,onUpdate 	   :  function(){jQuery("#birthDate").focus();}
-    });
 
-</script>	
-	
 <div id="hiddenModalContent" style="display:none">
 <style> 
 div#hiddenModalContent label { font-weight: bold;}  

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2010-03-03 11:02:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 										validateAddPatientIdentifierType();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 			}
 	);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2010-03-03 11:02:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 										validateAddProgram();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 			}
 	);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm	2010-06-23 19:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm	2010-07-14 03:04:25 +0000
@@ -24,13 +24,13 @@
 									validateAddRelationshipPatient();
 								}
 			});
-			jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+			jQuery.validator.setMessages( validationMessage );
 			jQuery("#firstName").focus();
 			jQuery("#birthDate").rules("add",{required:true,dateISO:true,datelessthanequaltoday:true});
 		});
 </script>
 <h3>$i18n.getString("add_new_relationship_for"):  $patient.getFullName()</h3>
-<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>	
+
 																			
 <form  id="addRelationshipPatientForm" action="addRelationshipPatient.action" method="post">
 <input type="hidden" id="relationshipId"  name="relationshipId" value="$patient.id"/> 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm	2010-06-19 15:32:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm	2010-07-14 03:04:25 +0000
@@ -13,12 +13,11 @@
 										validateCriteria();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#name").focus();
 			}
 	);
-</script>
-<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>																		
+</script>																	
 
 <h3>$i18n.getString( "add_validation_criteria" )</h3>
 <form id="validationCriteriaForm" action="addValidationCriteria.action" method="post" >
@@ -77,11 +76,7 @@
 			<input type="text" id="birthDateValue" name="birthDateValue" onChange="fillValue(this.value);"style="width: 6em">
 			<img src="../images/calendar_icon.gif" width="16" height="16" id="birthDateValueButton" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "date" )">
 			<script type="text/javascript">
-				  Calendar.setup({
-				  inputField     :    "birthDateValue",      // id of the input field
-				  ifFormat       :    "$i18n.getString('format.date.label')",       // format of the input field
-				  button         :    "birthDateValueButton"   // trigger for the calendar (button ID)
-				 });
+				datePickerValid( 'birthDateValue' );
 			</script> 
 		</div>
 		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2010-06-23 19:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2010-07-14 03:04:25 +0000
@@ -14,7 +14,7 @@
 					 					    validateUpdatePatientAttribute();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 				
 				#if( $patientAttribute.attributeOptions.size() == 0 ) 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm	2010-06-23 19:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm	2010-07-14 03:04:25 +0000
@@ -20,7 +20,7 @@
 								validateUpdatePatient();
 							}
 		});
-		jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+		jQuery.validator.setMessages( validationMessage );
 		jQuery("#birthDate").rules("add",{required:true,dateISO:true,datelessthanequaltoday:true});
 		jQuery("#firstName").focus();
 		jQuery("#btnRepresentativeInfo").cluetip({local:"#representativeInfo"});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2010-03-03 11:02:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 										validateUpdatePatientIdentifierType();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 			}
 	);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2010-03-05 06:24:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 											validateUpdateProgram();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#nameField").focus();
 			}
 	);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm	2010-05-18 03:42:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm	2010-07-14 03:04:25 +0000
@@ -13,7 +13,7 @@
 										validateCriteria();
 									}
 				});
-				jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+				jQuery.validator.setMessages( validationMessage );
 				jQuery("#name").focus();
 			}
 	);
@@ -72,11 +72,7 @@
 			<input type="text" id="birthDateValue" name="birthDateValue" onChange="fillValue(this.value);"style="width: 6em">
 			<img src="../images/calendar_icon.gif" width="16" height="16" id="birthDateValueButton" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "date" )">
 			<script type="text/javascript">
-				  Calendar.setup({
-				  inputField     :    "birthDateValue",      // id of the input field
-				  ifFormat       :    "$i18n.getString('format.date.label')",       // format of the input field
-				  button         :    "birthDateValueButton"   // trigger for the calendar (button ID)
-				 });
+				datePickerValid( 'birthDateValue' );
 			</script> 
 		</div>