- ${encoder.htmlEncode( $dataElement.name )}
- $dataElement.getDetailedNumberType()
+ ${encoder.htmlEncode( $dataElement.name )}
|
#foreach( $optionCombo in $optionCombos )
#set( $dataEntryId = "${dataElement.id}-${optionCombo.id}-val" )
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-07-21 14:01:52 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-07-21 17:38:11 +0000
@@ -9,7 +9,6 @@
* {optioncomboid}-optioncombo // name of category option combo
* {dataelementid}-{optioncomboid}-min // min value for data value
* {dataelementid}-{optioncomboid}-max // max value for data value
- * {dataelementid}-type // data element type
*/
// -----------------------------------------------------------------------------
@@ -95,7 +94,7 @@
var fieldId = '#' + dataElementId + '-' + optionComboId + '-val';
var value =$( fieldId ).val();
- var type = $( '#' + dataElementId + '-type' ).html();
+ var type = dataElements[dataElementId].type;
$( fieldId ).css( 'background-color', COLOR_YELLOW );
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-07-21 14:01:52 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-07-21 17:38:11 +0000
@@ -1,6 +1,9 @@
// Identifiers for which zero values are, insignificant, also used in entry.js, populated in select.vm
var significantZeros = [];
+// Array with associative arrays for each data element, populated in select.vm
+var dataElements = [];
+
// Associative array with [indicator id, expression] for indicators in form, also used in entry.js, populated in select.vm
var indicatorFormulas = [];
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2011-07-21 14:01:52 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2011-07-21 17:38:11 +0000
@@ -53,7 +53,7 @@
#set( $count = $count + 1 )