=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html 2015-09-03 13:13:08 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html 2015-09-03 14:22:27 +0000 @@ -70,7 +70,7 @@ - + @@ -80,12 +80,12 @@ - + - + === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-08-25 14:54:19 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-09-03 14:22:27 +0000 @@ -432,7 +432,7 @@ var programRuleVariablesArray = []; //Loop through and add the variables belonging to this program angular.forEach(variables, function(variable){ - if(variable.program.id == programUid) { + if(variable.program.id === programUid) { programRuleVariablesArray.push(variable); } }); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-09-03 13:13:08 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-09-03 14:22:27 +0000 @@ -359,7 +359,7 @@ ' ng-disabled="isHidden(prStDes.' + fieldId + '.dataElement.id) || selectedEnrollment.status===\'CANCELLED\' || selectedEnrollment.status===\'COMPLETED\' || currentEvent[uid]==\'uid\' || currentEvent.editingNotAllowed"' + ' ng-required="{{prStDes.' + fieldId + '.compulsory}}" '; - if (prStDe && prStDe.dataElement && prStDe.dataElement.type) { + if (prStDe && prStDe.dataElement && prStDe.dataElement.valueType) { //check if dataelement has optionset if (prStDe.dataElement.optionSetValue) { var optionSetId = prStDe.dataElement.optionSet.id; @@ -373,14 +373,18 @@ } else { //check data element type and generate corresponding angular input field - if (prStDe.dataElement.type === "int") { + if (prStDe.dataElement.valueType === "NUMBER" || + prStDe.dataElement.valueType === "INTEGER" || + prStDe.dataElement.valueType === "INTEGER_POSITIVE" || + prStDe.dataElement.valueType === "INTEGER_NEGATIVE" || + prStDe.dataElement.valueType === "INTEGER_ZERO_OR_POSITIVE") { newInputField = ''; } - else if (prStDe.dataElement.type === "bool") { + else if (prStDe.dataElement.valueType === "BOOLEAN") { newInputField = ' '; } - else if (prStDe.dataElement.type === "date") { + else if (prStDe.dataElement.valueType === "DATE") { var maxDate = prStDe.allowFutureDate ? '' : 0; newInputField = ''; } - else if (prStDe.dataElement.type === "trueOnly") { + else if (prStDe.dataElement.valueType === "TRUE_ONLY") { newInputField = ''; } + else if (prStDe.dataElement.valueType === "LONG_TEXT") { + newInputField = '