=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-10-26 12:07:23 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-10-27 17:40:17 +0000 @@ -303,7 +303,7 @@ if ( !valueIsEmpty && !SectionFormUtils.isBoolean( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_boolean" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_boolean" ) ); } } else if ( type.equals( DataElement.VALUE_TYPE_DATE ) ) @@ -311,7 +311,7 @@ if ( !SectionFormUtils.isDate( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_date" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_date" ) ); } } else if ( type.equals( DataElement.VALUE_TYPE_INT ) @@ -320,7 +320,7 @@ if ( !SectionFormUtils.isNumber( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_number" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_number" ) ); } } else if ( type.equals( DataElement.VALUE_TYPE_INT ) @@ -329,7 +329,7 @@ if ( !SectionFormUtils.isInteger( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_integer" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_integer" ) ); } } else if ( type.equals( DataElement.VALUE_TYPE_INT ) @@ -338,7 +338,7 @@ if ( !SectionFormUtils.isPositiveInteger( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_positive_integer" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_positive_integer" ) ); } } else if ( type.equals( DataElement.VALUE_TYPE_INT ) @@ -347,7 +347,7 @@ if ( !SectionFormUtils.isNegativeInteger( value ) ) { correctType = false; - typeViolations.put( key, i18n.getString( "invalid_negative_integer" ) ); + typeViolations.put( key, value + " " + i18n.getString( "is_invalid_negative_integer" ) ); } } } === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2011-10-27 16:59:32 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2011-10-27 17:40:17 +0000 @@ -25,9 +25,14 @@ db_language = Database Language # validation messages -invalid_boolean = Invalid boolean -invalid_date = Invalid date (yyyy-MM-dd) -invalid_number = Invalid number -invalid_integer = Invalid integer -invalid_positive_integer = Invalid positive integer -invalid_negative_integer = Invalid negative integer +is_invalid_boolean = is not a valid boolean +is_invalid_date = is not a valid date (yyyy-MM-dd) +is_invalid_number = is not a valid number +is_invalid_integer = is not a valid integer +is_invalid_positive_integer = is not a valid positive integer +is_invalid_negative_integer = is not a valid negative integer + +warnings_and_errors = Warnings and errors +validation_rule_violation_warnings = Validation Rule Violation Warnings +minmax_violation_warnings = Min/Max Violation Warnings +type_violation_errors = Type Violation Errors === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-10-26 11:49:43 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-10-27 17:40:17 +0000 @@ -3,9 +3,30 @@

$encoder.htmlEncode( $dataSet.name )

-#if( $validationRuleViolations.size() > 0 ) -
-

Validation Rule Violations

+#set( $validationRuleViolationsSize = $validationRuleViolations.size() ) +#set( $validationViolationsSize = $validationViolations.size() ) +#set( $typeViolationsSize = $typeViolations.size() ) + +#if( $validationRuleViolationsSize > 0 || $validationViolationsSize > 0 || $typeViolationsSize > 0 ) +
+

$i18n.getString("warnings_and_errors")

+

+ #if( $validationRuleViolationsSize > 0 ) + $validationRuleViolationsSize $i18n.getString("validation_rule_violation_warnings").
+ #end + #if( $validationViolationsSize > 0 ) + $validationViolationsSize $i18n.getString("minmax_violation_warnings").
+ #end + #if( $typeViolationsSize > 0 ) + $typeViolationsSize $i18n.getString("type_violation_errors").
+ #end +

+
+#end + +#if( $validationRuleViolationsSize > 0 ) +
+

$i18n.getString("validation_rule_violations")

#foreach( $validationRuleViolation in $validationRuleViolations ) $validationRuleViolation
@@ -60,11 +81,11 @@ #elseif( $dataElement.type == "int" && $dataElement.numberType == "number" ) #elseif( $dataElement.type == "int" && $dataElement.numberType == "int" ) - + #elseif( $dataElement.type == "int" && $dataElement.numberType == "positiveNumber" ) - + #elseif( $dataElement.type == "int" && $dataElement.numberType == "negativeNumber" ) - + #end #end #end