← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3121: renamed length property of validationRules to range, to avoid confusion with the length property ...

 

------------------------------------------------------------
revno: 3121
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-03-22 11:50:42 +0100
message:
  renamed length property of validationRules to range, to avoid confusion with the length property on arrays
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addDataSet.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addSection.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editDataSet.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editSection.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addRoleForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateRoleForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserGroupForm.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/javascripts/useraccount/updateUserAccountForm.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js	2011-03-22 10:50:42 +0000
@@ -10,7 +10,7 @@
 		rawPassword : {
 			required : false,
 			password : true,
-			rangelength : r.user.password.length,
+			range : r.user.password.range,
 			notequalto : '#username'
 		},
 		retypePassword : {
@@ -19,18 +19,18 @@
 		},
 		surname : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		firstName : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		email : {
 			email : true,
-			rangelength : r.user.email.length
+			range : r.user.email.range
 		},
 		phoneNumber : {
-			rangelength : r.user.phone.length
+			range : r.user.phone.range
 		}
 	}
 
@@ -38,12 +38,12 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#surname" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#firstName" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#email" ).attr( "maxlength", r.user.email.length[1] );
-	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.length[1] );
+	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#surname" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#firstName" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#email" ).attr( "maxlength", r.user.email.range[1] );
+	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.range[1] );
 	/* end validation */
 
 	var oldPassword = byId( 'oldPassword' );

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-03-17 12:08:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-03-22 10:50:42 +0000
@@ -2,34 +2,34 @@
 	/* dhis-web-maintenance-user */
 	"user" : {
 		"name" : {
-			"length" : [ 2, 140 ]
+			"range" : [ 2, 140 ]
 		},
 		"username" : {
-			"length" : [ 2, 140 ],
+			"range" : [ 2, 140 ],
 			"firstletteralphabet" : true,
 			"alphanumeric" : true
 		},
 		"password" : {
-			"length" : [ 8, 35 ]
+			"range" : [ 8, 35 ]
 		},
 		"email" : {
-			"length" : [ 0, 160 ]
+			"range" : [ 0, 160 ]
 		},
 		"phone" : {
-			"length" : [ 0, 80 ]
+			"range" : [ 0, 80 ]
 		}
 	},
 	"role" : {
 		"name" : {
-			"length" : [ 2, 140 ]
+			"range" : [ 2, 140 ]
 		},
 		"description" : {
-			"length" : [ 2, 210 ]
+			"range" : [ 2, 210 ]
 		}
 	},
 	"userGroup" : {
 		"name" : {
-			"length" : [ 2, 210 ],
+			"range" : [ 2, 210 ],
 			"alphanumericwithbasicpuncspaces" : true,
 			"firstletteralphabet" : true
 		}
@@ -38,53 +38,53 @@
 	/* dhis-web-maintenance-organisationunit */
 	"organisationUnit": {
 		"name": {
-			"length": [2, 160]
+			"range": [2, 160]
 		},
 		"shortName": {
-			"length": [2, 25]
+			"range": [2, 25]
 		},
 		"code": {
-			"length": [0, 25]
+			"range": [0, 25]
 		},
 		"url": {
-			"length": [0, 255]			
+			"range": [0, 255]			
 		},
 		"contactPerson": {
-			"length": [0, 255]
+			"range": [0, 255]
 		},
 		"address": {
-			"length": [0, 255]
+			"range": [0, 255]
 		},
 		"email": {
-			"length": [0, 250]
+			"range": [0, 250]
 		},
 		"phoneNumber": {
-			"length": [0, 255]
+			"range": [0, 255]
 		}
 	},
 	"organisationUnitGroup": {
 		"name": {
-			"length": [2, 160]
+			"range": [2, 160]
 		}
 	},
 	"organisationUnitGroupSet": {
 		"name": {
-			"length": [2, 230]
+			"range": [2, 230]
 		},
 		"description": {
-			"length": [2, 255]
+			"range": [2, 255]
 		}
 	},
 	
 	/* dhis-web-maintenance-dataset */
 	"dataEntry": {
 		"name": {
-			"length": [4, 100]
+			"range": [4, 100]
 		}
 	},
 	"section": {
 		"name": {
-			"length": [2, 160]
+			"range": [2, 160]
 		},
 		"selectedList": {
 			
@@ -94,17 +94,17 @@
 		"name": {
 			"alphanumericwithbasicpuncspaces": true,
 			"firstletteralphabet": false,
-			"length": [4, 150]
+			"range": [4, 150]
 		},
 		"shortName": {
 			"alphanumericwithbasicpuncspaces": true,
 			"firstletteralphabet": false,
-			"length": [2, 20]
+			"range": [2, 20]
 		},
 		"code": {
 			"alphanumericwithbasicpuncspaces": true,
 			"notOnlyDigits": false,
-			"length": [4, 40]
+			"range": [4, 40]
 		}
 	}
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addDataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addDataSet.js	2011-03-17 12:08:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addDataSet.js	2011-03-22 10:50:42 +0000
@@ -7,18 +7,18 @@
 			required : true,
 			alphanumericwithbasicpuncspaces : r.dataSet.name.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.dataSet.name.firstletteralphabet,
-			rangelength : r.dataSet.name.length
+			range : r.dataSet.name.range
 		},
 		shortName : {
 			required : true,
 			alphanumericwithbasicpuncspaces : r.dataSet.shortName.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.dataSet.shortName.firstletteralphabet,
-			rangelength : r.dataSet.shortName.length
+			range : r.dataSet.shortName.range
 		},
 		code : {
 			alphanumericwithbasicpuncspaces : r.dataSet.code.alphanumericwithbasicpuncspaces,
 			notOnlyDigits : r.dataSet.code.notOnlyDigits,
-			rangelength : r.dataSet.code.length
+			range : r.dataSet.code.range
 		},
 		frequencySelect : {
 			required : true
@@ -36,9 +36,9 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.dataSet.name.length[1] );
-	jQuery( "#shortName" ).attr( "maxlength", r.dataSet.shortName.length[1] );
-	jQuery( "#code" ).attr( "maxlength", r.dataSet.code.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.dataSet.name.range[1] );
+	jQuery( "#shortName" ).attr( "maxlength", r.dataSet.shortName.range[1] );
+	jQuery( "#code" ).attr( "maxlength", r.dataSet.code.range[1] );
 
 	checkValueIsExist( "name", "validateDataSet.action" );
 	checkValueIsExist( "shortName", "validateDataSet.action" );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addSection.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addSection.js	2011-03-18 12:12:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/addSection.js	2011-03-22 10:50:42 +0000
@@ -5,7 +5,7 @@
 	var rules = {
 		sectionName : {
 			required : true,
-			rangelength : r.section.name.length
+			range : r.section.name.range
 		},
 		selectedList : {
 			required : true
@@ -23,7 +23,7 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#sectionName" ).attr( "maxlength", r.section.name.length[1] );
+	jQuery( "#sectionName" ).attr( "maxlength", r.section.name.range[1] );
 
 	checkValueIsExist( "sectionName", "validateSection.action", {
 		dataSetId : function()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editDataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editDataSet.js	2011-03-18 12:12:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editDataSet.js	2011-03-22 10:50:42 +0000
@@ -7,18 +7,18 @@
 			required : true,
 			alphanumericwithbasicpuncspaces : r.dataSet.name.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.dataSet.name.firstletteralphabet,
-			rangelength : r.dataSet.name.length
+			range : r.dataSet.name.range
 		},
 		shortName : {
 			required : true,
 			alphanumericwithbasicpuncspaces : r.dataSet.shortName.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.dataSet.shortName.firstletteralphabet,
-			rangelength : r.dataSet.shortName.length
+			range : r.dataSet.shortName.range
 		},
 		code : {
 			alphanumericwithbasicpuncspaces : r.dataSet.code.alphanumericwithbasicpuncspaces,
 			notOnlyDigits : r.dataSet.code.notOnlyDigits,
-			rangelength : r.dataSet.code.length
+			range : r.dataSet.code.range
 		},
 		frequencySelect : {
 			required : true
@@ -36,9 +36,9 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.dataSet.name.length[1] );
-	jQuery( "#shortName" ).attr( "maxlength", r.dataSet.shortName.length[1] );
-	jQuery( "#code" ).attr( "maxlength", r.dataSet.code.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.dataSet.name.range[1] );
+	jQuery( "#shortName" ).attr( "maxlength", r.dataSet.shortName.range[1] );
+	jQuery( "#code" ).attr( "maxlength", r.dataSet.code.range[1] );
 
 	checkValueIsExist( "name", "validateDataSet.action", {
 		dataSetId : function()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editSection.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editSection.js	2011-03-18 12:12:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editSection.js	2011-03-22 10:50:42 +0000
@@ -5,7 +5,7 @@
 	var rules = {
 		sectionName : {
 			required : true,
-			rangelength : r.section.name.length
+			range : r.section.name.range
 		}
 	};
 
@@ -20,7 +20,7 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#sectionName" ).attr( "maxlength", r.section.name.length[1] );
+	jQuery( "#sectionName" ).attr( "maxlength", r.section.name.range[1] );
 
 	checkValueIsExist( "sectionName", "validateSection.action", {
 		dataSetId : function()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-03-17 12:08:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-03-22 10:50:42 +0000
@@ -5,7 +5,7 @@
 	var rules = {
 		nameField : {
 			required : true,
-			rangelength : r.dataEntry.name.length
+			range : r.dataEntry.name.range
 		}
 	};
 
@@ -17,7 +17,7 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#nameField" ).attr( "maxlength", r.dataEntry.name.length[1] );
+	jQuery( "#nameField" ).attr( "maxlength", r.dataEntry.name.range[1] );
 
 	jQuery( "#dataElementSelection" ).resizable( {
 		minHeight : 210,

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitForm.js	2011-03-22 10:50:42 +0000
@@ -5,15 +5,15 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.organisationUnit.name.length
+			range : r.organisationUnit.name.range
 		},
 		shortName : {
 			required : true,
-			rangelength : r.organisationUnit.shortName.length
+			range : r.organisationUnit.shortName.range
 		},
 		code : {
 			required : true,
-			rangelength : r.organisationUnit.code.length
+			range : r.organisationUnit.code.range
 		},
 		openingDate : {
 			required : true
@@ -29,20 +29,20 @@
 		},
 		url : {
 			url : true,
-			rangelength : r.organisationUnit.url.length
+			range : r.organisationUnit.url.range
 		},
 		contactPerson : {
-			rangelength : r.organisationUnit.contactPerson.length
+			range : r.organisationUnit.contactPerson.range
 		},
 		address : {
-			rangelength : r.organisationUnit.address.length
+			range : r.organisationUnit.address.range
 		},
 		email : {
 			email : true,
-			rangelength : r.organisationUnit.email.length
+			range : r.organisationUnit.email.range
 		},
 		phoneNumber : {
-			rangelength : r.organisationUnit.phoneNumber.length
+			range : r.organisationUnit.phoneNumber.range
 		}
 	};
 
@@ -56,14 +56,14 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnit.name.length[1] );
-	jQuery( "#shortName" ).attr( "maxlength", r.organisationUnit.shortName.length[1] );
-	jQuery( "#code" ).attr( "maxlength", r.organisationUnit.code.length[1] );
-	jQuery( "#url" ).attr( "maxlength", r.organisationUnit.url.length[1] );
-	jQuery( "#contactPerson" ).attr( "maxlength", r.organisationUnit.contactPerson.length[1] );
-	jQuery( "#address" ).attr( "maxlength", r.organisationUnit.address.length[1] );
-	jQuery( "#email" ).attr( "maxlength", r.organisationUnit.email.length[1] );
-	jQuery( "#phoneNumber" ).attr( "maxlength", r.organisationUnit.phoneNumber.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.organisationUnit.name.range[1] );
+	jQuery( "#shortName" ).attr( "maxlength", r.organisationUnit.shortName.range[1] );
+	jQuery( "#code" ).attr( "maxlength", r.organisationUnit.code.range[1] );
+	jQuery( "#url" ).attr( "maxlength", r.organisationUnit.url.range[1] );
+	jQuery( "#contactPerson" ).attr( "maxlength", r.organisationUnit.contactPerson.range[1] );
+	jQuery( "#address" ).attr( "maxlength", r.organisationUnit.address.range[1] );
+	jQuery( "#email" ).attr( "maxlength", r.organisationUnit.email.range[1] );
+	jQuery( "#phoneNumber" ).attr( "maxlength", r.organisationUnit.phoneNumber.range[1] );
 
 	checkValueIsExist( "name", "validateOrganisationUnit.action" );
 	datePickerValid( 'openingDate', false );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupForm.js	2011-03-22 10:50:42 +0000
@@ -5,7 +5,7 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.organisationUnitGroup.name.length
+			range : r.organisationUnitGroup.name.range
 		}
 	};
 
@@ -16,7 +16,7 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroup.name.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroup.name.range[1] );
 
 	checkValueIsExist( "name", "validateOrganisationUnitGroup.action" );
 } );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/addOrganisationUnitGroupSetForm.js	2011-03-22 10:50:42 +0000
@@ -5,11 +5,11 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.organisationUnitGroupSet.name.length
+			range : r.organisationUnitGroupSet.name.range
 		},
 		description : {
 			required : true,
-			rangelength : r.organisationUnitGroupSet.description.length
+			range : r.organisationUnitGroupSet.description.range
 		}
 	};
 
@@ -24,8 +24,8 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroupSet.name.length[1] );
-	jQuery( "#description" ).attr( "maxlength", r.organisationUnitGroupSet.description.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroupSet.name.range[1] );
+	jQuery( "#description" ).attr( "maxlength", r.organisationUnitGroupSet.description.range[1] );
 
 	checkValueIsExist( "name", "validateOrganisationUnitGroupSet.action" );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitForm.js	2011-03-22 10:50:42 +0000
@@ -5,15 +5,15 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.organisationUnit.name.length
+			range : r.organisationUnit.name.range
 		},
 		shortName : {
 			required : true,
-			rangelength : r.organisationUnit.shortName.length
+			range : r.organisationUnit.shortName.range
 		},
 		code : {
 			required : true,
-			rangelength : r.organisationUnit.code.length
+			range : r.organisationUnit.code.range
 		},
 		openingDate : {
 			required : true
@@ -29,20 +29,20 @@
 		},
 		url : {
 			url : true,
-			rangelength : r.organisationUnit.url.length
+			range : r.organisationUnit.url.range
 		},
 		contactPerson : {
-			rangelength : r.organisationUnit.contactPerson.length
+			range : r.organisationUnit.contactPerson.range
 		},
 		address : {
-			rangelength : r.organisationUnit.address.length
+			range : r.organisationUnit.address.range
 		},
 		email : {
 			email : true,
-			rangelength : r.organisationUnit.email.length
+			range : r.organisationUnit.email.range
 		},
 		phoneNumber : {
-			rangelength : r.organisationUnit.phoneNumber.length
+			range : r.organisationUnit.phoneNumber.range
 		}
 	};
 
@@ -55,12 +55,12 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnit.name.length[1] );
-	jQuery( "#shortName" ).attr( "maxlength", r.organisationUnit.shortName.length[1] );
-	jQuery( "#code" ).attr( "maxlength", r.organisationUnit.code.length[1] );
-	jQuery( "#url" ).attr( "maxlength", r.organisationUnit.url.length[1] );
-	jQuery( "#contactPerson" ).attr( "maxlength", r.organisationUnit.contactPerson.length[1] );
-	jQuery( "#address" ).attr( "maxlength", r.organisationUnit.address.length[1] );
-	jQuery( "#email" ).attr( "maxlength", r.organisationUnit.email.length[1] );
-	jQuery( "#phoneNumber" ).attr( "maxlength", r.organisationUnit.phoneNumber.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.organisationUnit.name.range[1] );
+	jQuery( "#shortName" ).attr( "maxlength", r.organisationUnit.shortName.range[1] );
+	jQuery( "#code" ).attr( "maxlength", r.organisationUnit.code.range[1] );
+	jQuery( "#url" ).attr( "maxlength", r.organisationUnit.url.range[1] );
+	jQuery( "#contactPerson" ).attr( "maxlength", r.organisationUnit.contactPerson.range[1] );
+	jQuery( "#address" ).attr( "maxlength", r.organisationUnit.address.range[1] );
+	jQuery( "#email" ).attr( "maxlength", r.organisationUnit.email.range[1] );
+	jQuery( "#phoneNumber" ).attr( "maxlength", r.organisationUnit.phoneNumber.range[1] );
 } );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupForm.js	2011-03-22 10:50:42 +0000
@@ -1,17 +1,20 @@
-jQuery(document).ready(	function(){
+jQuery(document).ready(function()
+{
 	var r = getValidationRules();
-	
+
 	var rules = {
-		name: {
-			required:true,
-			rangelength : r.organisationUnitGroup.name.length
+		name : {
+			required : true,
+			range : r.organisationUnitGroup.name.range
 		}
 	};
 
-	validation2( 'updateOrganisationUnitGroupForm', function( form ) { form.submit() },
+	validation2('updateOrganisationUnitGroupForm', function( form )
 	{
-		'rules': rules
-	});	
+		form.submit()
+	}, {
+		'rules' : rules
+	});
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroup.name.length[1] );
-});	
+	jQuery("#name").attr("maxlength", r.organisationUnitGroup.name.range[1]);
+});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/updateOrganisationUnitGroupSetForm.js	2011-03-22 10:50:42 +0000
@@ -5,11 +5,11 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.organisationUnitGroupSet.name.length
+			range : r.organisationUnitGroupSet.name.range
 		},
 		description : {
 			required : true,
-			rangelength : r.organisationUnitGroupSet.description.length
+			range : r.organisationUnitGroupSet.description.range
 		}
 	};
 
@@ -24,8 +24,8 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroupSet.name.length[1] );
-	jQuery( "#description" ).attr( "maxlength", r.organisationUnitGroupSet.description.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.organisationUnitGroupSet.name.range[1] );
+	jQuery( "#description" ).attr( "maxlength", r.organisationUnitGroupSet.description.range[1] );
 
 	checkValueIsExist( "name", "validateOrganisationUnitGroupSet.action", {
 		id : $organisationUnitGroupSet.id

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addRoleForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addRoleForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addRoleForm.js	2011-03-22 10:50:42 +0000
@@ -7,11 +7,11 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.role.name.length
+			range : r.role.name.range
 		},
 		description : {
 			required : true,
-			rangelength : r.role.description.length
+			range : r.role.description.range
 		}
 	}
 
@@ -24,8 +24,8 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.role.name.length[1] );
-	jQuery( "#description" ).attr( "maxlength", r.role.description.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.role.name.range[1] );
+	jQuery( "#description" ).attr( "maxlength", r.role.description.range[1] );
 
 	/* remote validation */
 	checkValueIsExist( "name", "validateRole.action" );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserForm.js	2011-03-22 10:50:42 +0000
@@ -7,13 +7,13 @@
 			required : true,
 			firstletteralphabet : r.user.username.firstletteralphabet,
 			alphanumeric : r.user.username.alphanumeric,
-			rangelength : r.user.username.length
+			range : r.user.username.range
 		},
 		rawPassword : {
 			required : true,
 			password : true,
 			notequalto : '#username',
-			rangelength : r.user.password.length
+			range : r.user.password.range
 		},
 		retypePassword : {
 			required : true,
@@ -21,18 +21,18 @@
 		},
 		surname : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		firstName : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		email : {
 			email : true,
-			rangelength : r.user.email.length
+			range : r.user.email.range
 		},
 		phoneNumber : {
-			rangelength : r.user.phone.length
+			range : r.user.phone.range
 		},
 		roleValidator : {
 			required : true
@@ -50,13 +50,13 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#username" ).attr( "maxlength", r.user.username.length[1] );
-	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#surname" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#firstName" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#email" ).attr( "maxlength", r.user.email.length[1] );
-	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.length[1] );
+	jQuery( "#username" ).attr( "maxlength", r.user.username.range[1] );
+	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#surname" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#firstName" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#email" ).attr( "maxlength", r.user.email.range[1] );
+	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.range[1] );
 
 	/* remote validation */
 	checkValueIsExist( "username", "validateUser.action" );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserGroupForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/addUserGroupForm.js	2011-03-22 10:50:42 +0000
@@ -7,7 +7,7 @@
 			required : true,
 			alphanumericwithbasicpuncspaces : r.userGroup.name.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.userGroup.name.firstletteralphabet,
-			rangelength : r.userGroup.name.length
+			range : r.userGroup.name.range
 		},
 		memberValidator : {
 			required : true
@@ -25,7 +25,7 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.userGroup.name.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.userGroup.name.range[1] );
 
 	/* remote validation */
 	checkValueIsExist( "name", "validateUserGroup.action" );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateRoleForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateRoleForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateRoleForm.js	2011-03-22 10:50:42 +0000
@@ -7,11 +7,11 @@
 	var rules = {
 		name : {
 			required : true,
-			rangelength : r.role.name.length
+			range : r.role.name.range
 		},
 		description : {
 			required : true,
-			rangelength : r.role.description.length
+			range : r.role.description.range
 		}
 	};
 
@@ -24,8 +24,8 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.role.name.length[1] );
-	jQuery( "#description" ).attr( "maxlength", r.role.description.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.role.name.range[1] );
+	jQuery( "#description" ).attr( "maxlength", r.role.description.range[1] );
 
 	/* remote validation */
 	checkValueIsExist( "name", "validateRole.action", {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserForm.js	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserForm.js	2011-03-22 10:50:42 +0000
@@ -6,27 +6,27 @@
 		rawPassword : {
 			password : true,
 			notequalto : '#username',
-			rangelength : r.user.password.length
+			range : r.user.password.range
 		},
 		retypePassword : {
 			required : false,
 			equalTo : '#rawPassword',
-			rangelength : r.user.password.length
+			range : r.user.password.range
 		},
 		surname : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		firstName : {
 			required : true,
-			rangelength : r.user.name.length
+			range : r.user.name.range
 		},
 		email : {
 			email : true,
-			rangelength : r.user.email.length
+			range : r.user.email.range
 		},
 		phoneNumber : {
-			rangelength : r.user.phone.length
+			range : r.user.phone.range
 		},
 		roleValidator : {
 			required : true
@@ -44,11 +44,11 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.length[1] );
-	jQuery( "#surname" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#firstName" ).attr( "maxlength", r.user.name.length[1] );
-	jQuery( "#email" ).attr( "maxlength", r.user.email.length[1] );
-	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.length[1] );
+	jQuery( "#rawPassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#retypePassword" ).attr( "maxlength", r.user.password.range[1] );
+	jQuery( "#surname" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#firstName" ).attr( "maxlength", r.user.name.range[1] );
+	jQuery( "#email" ).attr( "maxlength", r.user.email.range[1] );
+	jQuery( "#phoneNumber" ).attr( "maxlength", r.user.phone.range[1] );
 
 } );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserGroupForm.js	2011-03-15 14:49:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/updateUserGroupForm.js	2011-03-22 10:50:42 +0000
@@ -7,7 +7,7 @@
 			required : true,
 			alphanumericwithbasicpuncspaces : r.userGroup.name.alphanumericwithbasicpuncspaces,
 			firstletteralphabet : r.userGroup.name.firstletteralphabet,
-			rangelength : r.userGroup.name.length
+			range : r.userGroup.name.range
 		},
 		memberValidator : {
 			required : true
@@ -25,5 +25,5 @@
 		'rules' : rules
 	} );
 
-	jQuery( "#name" ).attr( "maxlength", r.userGroup.name.length[1] );
+	jQuery( "#name" ).attr( "maxlength", r.userGroup.name.range[1] );
 } );