← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20527: Handling in dataentry controller of TRUE_ONLY

 

------------------------------------------------------------
revno: 20527
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-10-06 16:56:11 +0200
message:
  Handling in dataentry controller of TRUE_ONLY
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-10-06 13:54:28 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-10-06 14:56:11 +0000
@@ -528,6 +528,10 @@
 
             $scope.currentElement = {id: prStDe.dataElement.id, event: eventToSave.event, saved: false};
 
+            if(value === false && prStDe.dataElement.valueType === "TRUE_ONLY" ) {
+                value = "";
+            }
+
             var ev = {event: eventToSave.event,
                 orgUnit: eventToSave.orgUnit,
                 program: eventToSave.program,

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-10-06 14:40:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-10-06 14:56:11 +0000
@@ -179,8 +179,6 @@
                                    ng-required={{prStDe.compulsory}} 
                                    ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
                                    ng-change="saveDatavalue(prStDe, innerForm.foo)" 
-                                   ng-true-value="true" 
-                                   ng-false-value="''"
                                    name="foo"/>
                         </div>
                         <div ng-switch-default>
@@ -381,8 +379,6 @@
                                                    ng-required={{prStDes[de.dataElement.id].compulsory}} 
                                                    ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
                                                    ng-change="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)" 
-                                                   ng-true-value="true" 
-                                                   ng-false-value="''"
                                                    name="foo"/>
                                         </div>
                                         <div ng-switch-when="LONG_TEXT">

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html	2015-10-06 14:40:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/table-entry-form.html	2015-10-06 14:56:11 +0000
@@ -188,8 +188,6 @@
                                    ng-required={{prStDe.compulsory}} 
                                    ng-disabled="selectedEnrollment.status !== 'ACTIVE' || eventRow.editingNotAllowed" 
                                    ng-change="saveDatavalue(prStDe, innerForm.foo)" 
-                                   ng-true-value="true" 
-                                   ng-false-value="''"
                                    name="foo"/>
                         </div>
                         <div ng-switch-default>
@@ -233,8 +231,6 @@
                                    ng-model="eventRow[prStDe.dataElement.id]"                                                               
                                    ng-required={{prStDe.compulsory}} 
                                    ng-disabled="true" 
-                                   ng-true-value="true" 
-                                   ng-false-value="''"
                                    name="foo"/>
                         </div>
                         <div ng-switch-default>