=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-11-24 20:34:35 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-11-29 14:40:20 +0000 @@ -754,7 +754,7 @@ /** * Create jQuery datepicker for input text with id * * - * @param id the id of input filed which you want enter date * + * @param id the id of input field which you want enter date * */ function datePicker( id ) { @@ -794,7 +794,7 @@ /** * Create jQuery datepicker for input text with id * * - * @param id the id of input filed which you want enter date * + * @param id the id of input field which you want enter date * */ function datePickerValid( id, today ) { @@ -822,8 +822,8 @@ /** * Create jQuery datepicker for start date and end ate text with id * * - * @param startdate the id of input filed which you want enter start date * - * @param enddate the id of input filed which you want enter end date * + * @param startdate the id of input field which you want enter start date * + * @param enddate the id of input field which you want enter end date * */ function datePickerInRange ( startdate, enddate, setCurrentStartDate, setCurrentEndDate ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2010-11-29 14:40:20 +0000 @@ -82,7 +82,7 @@ public String execute() throws Exception { - organisationUnit = organisationUnitService.getOrganisationUnit( id.intValue() ); + organisationUnit = organisationUnitService.getOrganisationUnit( id ); numberOfChildren = organisationUnit.getChildren().size(); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java 2010-05-26 04:01:21 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java 2010-11-29 14:40:20 +0000 @@ -53,9 +53,9 @@ public String execute() { Calendar cal = Calendar.getInstance(); - //cal.set( Calendar.YEAR, 1990 ); - //cal.set( Calendar.MONTH, 0 ); - //cal.set( Calendar.DATE, 1 ); + cal.set( Calendar.YEAR, 1990 ); + cal.set( Calendar.MONTH, 0 ); + cal.set( Calendar.DATE, 1 ); this.defaultDate = cal.getTime(); return SUCCESS; === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java 2010-10-04 10:59:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/ValidateOrganisationUnitAction.java 2010-11-29 14:40:20 +0000 @@ -76,8 +76,7 @@ { this.code = code; } - - + // ------------------------------------------------------------------------- // Output // ------------------------------------------------------------------------- @@ -108,7 +107,6 @@ if ( name != null ) { - OrganisationUnit match = organisationUnitService.getOrganisationUnitByName( name ); if ( match != null && (id == null || match.getId() != id) ) @@ -117,12 +115,10 @@ return ERROR; } - } - + } if ( code != null ) { - OrganisationUnit match = organisationUnitService.getOrganisationUnitByCode( code ); if ( match != null && (id == null || match.getId() != id) ) === 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 2010-10-15 13:15:20 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2010-11-29 14:40:20 +0000 @@ -5,8 +5,7 @@ checkValueIsExist( "name", "validateOrganisationUnit.action"); checkValueIsExist( "code", "validateOrganisationUnit.action"); - datePickerValid( 'openingDate', false ); - + datePickerValid( 'openingDate', false ); }); === 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 2010-10-15 13:15:20 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2010-11-29 14:40:20 +0000 @@ -10,10 +10,11 @@ id: $organisationUnit.id }); - datePickerInRange( 'openingDate', 'closedDate', false, false ); - - - + #if ( $numberOfChildren == 0 ) + datePickerInRange( 'openingDate', 'closedDate', false, false ); + #else + datePickerValid( 'openingDate', false ); + #end }); @@ -46,12 +47,13 @@ - - - + + #if( $numberOfChildren == 0 ) + + #end @@ -82,7 +84,6 @@