← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8787: Fixed bug, org unit code validation missing

 

------------------------------------------------------------
revno: 8787
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-31 11:31:37 +0300
message:
  Fixed bug, org unit code validation missing
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2012-10-24 13:47:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2012-10-31 08:31:37 +0000
@@ -23,7 +23,8 @@
 an_organisation_unit_cannot_be_moved_to_itself=An organisation unit cannot be moved to itself. Please select a new parent organisation unit
 an_org_unit_cannot_be_moved_to_be_its_own_child=An organisation unit cannot be moved to be its own child. Please select a new parent organisation unit
 the_new_parent_org_unit_is_approved=The new parent organisation unit is approved
-name_is_already_in_use=The name is already in use. Please choose a different name
+name_in_use=The name is already in use. Please choose a different name.
+code_in_use=The code is already in use. Please choose a different code.
 this_org_unit_cannot_moved=This organisation unit cannot be moved. Please select a new organisation unit to move
 the_org_unit_to_move_is_approved=The organisation unit to move is approved
 not_selected_moved_to_root_position=Not selected, moved to root position

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2012-10-17 18:53:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2012-10-31 08:31:37 +0000
@@ -11,10 +11,11 @@
 			'rules' : getValidationRules("organisationUnit")
 		});
 	
-		checkValueIsExist("name", "validateOrganisationUnit.action");
-		datePickerValid('openingDate', false);
+        checkValueIsExist("name", "validateOrganisationUnit.action");
+        checkValueIsExist("code", "validateOrganisationUnit.action");
+        datePickerValid('openingDate', false);
 
-		jQuery("#name").focus();
+        jQuery("#name").focus();
 	});
 
 	var previousName = '';

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2012-10-17 18:53:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2012-10-31 08:31:37 +0000
@@ -12,9 +12,8 @@
 			'rules' : getValidationRules("organisationUnit")
 		});
 
-		checkValueIsExist( "name", "validateOrganisationUnit.action", {
-			id : $organisationUnit.id
-		} );
+		checkValueIsExist( "name", "validateOrganisationUnit.action", { id : $organisationUnit.id } );
+        checkValueIsExist( "code", "validateOrganisationUnit.action", { id : $organisationUnit.id } );
 
 		#if ( $numberOfChildren == 0 )
 		datePickerInRange( 'openingDate', 'closedDate', false, false );