=== 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-07-21 06:51:02 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-08-15 08:17:24 +0000 @@ -70,8 +70,9 @@ "rangelength" : [ 2, 25 ] }, "code" : { - "required" : true, - "rangelength" : [ 0, 25 ] + "rangelength" : [ 0, 25 ], + "alphanumericwithbasicpuncspaces" : true, + "notOnlyDigits" : false }, "openingDate" : { "required" : true === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java 2011-05-30 14:56:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java 2011-08-15 08:17:24 +0000 @@ -256,13 +256,18 @@ parent.getChildren().add( organisationUnit ); } + // --------------------------------------------------------------------- + // Must persist org unit before adding data sets because association are + // updated on both sides (and this side is inverse) + // --------------------------------------------------------------------- + + organisationUnitId = organisationUnitService.addOrganisationUnit( organisationUnit ); + for ( String id : dataSets ) { organisationUnit.addDataSet( dataSetService.getDataSet( Integer.parseInt( id ) ) ); } - organisationUnitId = organisationUnitService.addOrganisationUnit( organisationUnit ); - for ( String id : selectedGroups ) { OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( id ) ); @@ -274,6 +279,8 @@ } } + organisationUnitService.updateOrganisationUnit( organisationUnit ); + return SUCCESS; } } === 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 2011-06-23 12:53:05 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2011-08-15 08:17:24 +0000 @@ -21,7 +21,7 @@ - + === 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 2011-06-23 12:53:05 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2011-08-15 08:17:24 +0000 @@ -38,7 +38,7 @@ - + @@ -109,7 +109,7 @@ - $i18n.getString( "assign_to_data_set" ) + $i18n.getString( "data_sets" )