=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2013-08-14 11:04:31 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2013-08-23 11:07:06 +0000 @@ -35,6 +35,7 @@ import java.util.Set; import java.util.regex.Matcher; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hisp.dhis.dataelement.DataElement; @@ -285,7 +286,13 @@ { return i18n.getString( "category_option_combo_with_id" ) + ": " + optionComboId + " " + i18n.getString( "does_not_exist" ); } - + + if ( dataSet.isDataElementDecoration() && dataElement.hasDescription() ) + { + String titleTag = " title=\"" + StringEscapeUtils.escapeHtml( dataElement.getDisplayDescription() ) + "\" "; + inputHtml = inputHtml.replaceAll( "title=\".*?\"", "" ).replace( TAG_CLOSE, titleTag + TAG_CLOSE ); + } + String appendCode = ""; if ( dataElement.getType().equals( DataElement.VALUE_TYPE_BOOL ) ) @@ -314,11 +321,12 @@ } inputHtml = inputHtml.replace( TAG_CLOSE, appendCode ); + inputHtml += "" + dataElement.getFormNameFallback() + ""; inputHtml += "" + categoryOptionCombo.getName() + ""; } - inputMatcher.appendReplacement( sb, inputHtml ); + inputMatcher.appendReplacement( sb, inputHtml ); } inputMatcher.appendTail( sb );