=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java 2013-03-14 10:33:20 +0000 @@ -105,32 +105,6 @@ public String execute() { - if ( name != null ) - { - // TODO compile fix, this should be removed - Indicator match = indicatorService.getIndicatorByName( name ).get( 0 ); - - if ( match != null && (id == null || match.getId() != id) ) - { - message = i18n.getString( "name_in_use" ); - - return ERROR; - } - } - - if ( shortName != null ) - { - // TODO compile fix, this should be removed - Indicator match = indicatorService.getIndicatorByShortName( shortName ).get( 0 ); - - if ( match != null && (id == null || match.getId() != id) ) - { - message = i18n.getString( "short_name_in_use" ); - - return ERROR; - } - } - if ( code != null && !code.trim().isEmpty() ) { Indicator match = indicatorService.getIndicatorByCode( code ); @@ -143,7 +117,7 @@ } } - message = i18n.getString( "everything_is_ok" ); + message = i18n.getString( "ok" ); return SUCCESS; } === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ValidateIndicatorGroupAction.java 1970-01-01 00:00:00 +0000 @@ -1,113 +0,0 @@ -package org.hisp.dhis.dd.action.indicatorgroup; - -/* - * Copyright (c) 2004-2012, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import com.opensymphony.xwork2.Action; -import org.hisp.dhis.i18n.I18n; -import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorService; - -/** - * @author Torgeir Lorange Ostby - * @version $Id: ValidateIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z - * larshelg $ - */ -public class ValidateIndicatorGroupAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - private I18n i18n; - - public void setI18n( I18n i18n ) - { - this.i18n = i18n; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private String message; - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - if ( name != null ) - { - // TODO compile fix, this should be removed - IndicatorGroup match = indicatorService.getIndicatorGroupByName( name ).get( 0 ); - - if ( match != null && (id == null || match.getId() != id) ) - { - message = i18n.getString( "name_in_use" ); - - return ERROR; - } - } - - message = i18n.getString( "everything_is_ok" ); - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ValidateIndicatorGroupSetAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ValidateIndicatorGroupSetAction.java 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ValidateIndicatorGroupSetAction.java 1970-01-01 00:00:00 +0000 @@ -1,107 +0,0 @@ -package org.hisp.dhis.dd.action.indicatorgroupset; - -/* - * Copyright (c) 2004-2012, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import com.opensymphony.xwork2.Action; -import org.hisp.dhis.i18n.I18n; -import org.hisp.dhis.indicator.IndicatorGroupSet; -import org.hisp.dhis.indicator.IndicatorService; - -/** - * @author Tran Thanh Tri - * @version $Id$ - */ -public class ValidateIndicatorGroupSetAction - implements Action -{ - - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - private String name; - - public void setName( String name ) - { - this.name = name; - } - - private I18n i18n; - - public void setI18n( I18n i18n ) - { - this.i18n = i18n; - } - - private String message; - - public String getMessage() - { - return message; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - if ( name != null ) - { - // TODO compile fix, this should be removed - IndicatorGroupSet match = indicatorService.getIndicatorGroupSetByName( name ).get( 0 ); - - if ( match != null && (id == null || match.getId() != id) ) - { - message = i18n.getString( "name_in_use" ); - - return ERROR; - } - } - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2013-02-22 14:58:47 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2013-03-14 10:33:20 +0000 @@ -234,11 +234,6 @@ - - - - @@ -276,11 +271,6 @@ - - - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2013-02-22 14:58:47 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2013-03-14 10:33:20 +0000 @@ -390,12 +390,6 @@ F_INDICATORGROUP_UPDATE - - ../dhis-web-commons/ajax/jsonResponseSuccess.vm - ../dhis-web-commons/ajax/jsonResponseError.vm - plainTextError - - @@ -430,12 +424,6 @@ F_INDICATORGROUPSET_UPDATE - - ../dhis-web-commons/ajax/jsonResponseSuccess.vm - ../dhis-web-commons/ajax/jsonResponseError.vm - plainTextError - - /dhis-web-commons/ajax/jsonResponseSuccess.vm === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2013-03-14 10:33:20 +0000 @@ -11,8 +11,6 @@ 'rules' : getValidationRules( "indicator" ) } ); - // checkValueIsExist( "name", "validateIndicator.action" ); - // checkValueIsExist( "shortName", "validateIndicator.action" ); checkValueIsExist( "code", "validateIndicator.action" ); } ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm 2013-03-14 10:33:20 +0000 @@ -12,8 +12,6 @@ 'rules' : getValidationRules( "indicatorGroup" ) } ); - // checkValueIsExist( "name", "validateIndicatorGroup.action" ); - var nameField = document.getElementById( 'name' ); nameField.select(); nameField.focus(); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupSet.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupSet.js 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupSet.js 2013-03-14 10:33:20 +0000 @@ -10,6 +10,4 @@ }, 'rules' : getValidationRules( "indicatorGroupSet" ) } ); - - // checkValueIsExist( "name", "validateIndicatorGroupSet.action" ); } );