=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java 2010-04-26 12:30:32 +0000 @@ -84,7 +84,6 @@ { this.conceptName = conceptName; } - // ------------------------------------------------------------------------- // Output @@ -121,16 +120,19 @@ } } - if ( conceptName != null || !conceptName.isEmpty()) { - - // This string will be used as an XML attribute name. So: - // Start with a letter. No funny characters please. max length 10. - Pattern conceptNamePattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_]{0,9}$"); - Matcher matcher = conceptNamePattern.matcher(conceptName); - - if (!matcher.matches()) + if ( conceptName != null || !conceptName.isEmpty() ) + { + // ----------------------------------------------------------------- + // This string will be used as an XML attribute name. + // Start with a letter. No funny characters please. Max length 10. + // ----------------------------------------------------------------- + + Pattern conceptNamePattern = Pattern.compile( "^[a-zA-Z][a-zA-Z0-9_]{0,9}$" ); + Matcher matcher = conceptNamePattern.matcher( conceptName ); + + if ( !matcher.matches() ) { - message = i18n.getString( "illegal_conceptName" ); + message = i18n.getString( "illegal_concept_name" ); return INPUT; } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2010-03-30 04:36:31 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2010-04-26 12:30:32 +0000 @@ -384,7 +384,7 @@ mark_value_for_followup = Mark value for follow-up unmark_value_for_followup = Unmark value for follow-up concept_name = Concept name -illegal_conceptName = Concept name must 10 or less alphanumeric or '_' characters +illegal_concept_name = Concept name must contain alphanumeric characters only and have maximum 10 characters switch_view = Switch View available_groups = Available Groups assign_groups_for_dataelement = Assign Groups for Data Element === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js 2010-03-30 04:36:31 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js 2010-04-26 12:30:32 +0000 @@ -136,7 +136,8 @@ { setMessage( xmlObject.firstChild.nodeValue ); } - else if(mode == "update"){ + else if ( mode == "update" ) + { updateCategoryOptionName(); } else === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/addDataElementCategoryForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/addDataElementCategoryForm.vm 2010-03-30 04:36:31 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/addDataElementCategoryForm.vm 2010-04-26 12:30:32 +0000 @@ -34,7 +34,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryForm.vm 2010-03-30 04:36:31 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateDataElementCategoryForm.vm 2010-04-26 12:30:32 +0000 @@ -37,7 +37,7 @@ - +