← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20524: Store blank for TRUE_ONLY in TC

 

------------------------------------------------------------
revno: 20524
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-10-06 16:40:38 +0200
message:
  Store blank for TRUE_ONLY in TC
modified:
  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/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-24 14:38:58 +0000
+++ 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
@@ -179,6 +179,8 @@
                                    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>
@@ -379,6 +381,8 @@
                                                    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-09-24 14:38:58 +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:40:38 +0000
@@ -188,6 +188,8 @@
                                    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>
@@ -215,12 +217,10 @@
                 <ng-form ng-if="eventRow !== currentEvent" name="innerform" >
                     <div ng-switch="prStDe.dataElement.valueType">
                          <div ng-switch-when="BOOLEAN">
-                            <select ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
-                                    class="form-control"
+                            <select class="form-control"
                                     ng-model="eventRow[prStDe.dataElement.id]" 
                                     ng-required={{prStDe.compulsory}} 
-                                    ng-disabled="selectedEnrollment.status !== 'ACTIVE' || eventRow.editingNotAllowed" 
-                                    ng-change="saveDatavalue(prStDe, innerForm.foo)" 
+                                    ng-disabled="true" 
                                     name="foo">
                                 <option value="">{{'please_select'| translate}}</option>                        
                                 <option value="false">{{'no'| translate}}</option>
@@ -230,11 +230,11 @@
                         <div ng-switch-when="TRUE_ONLY">
                             <input type="checkbox"     
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
                                    ng-model="eventRow[prStDe.dataElement.id]"                                                               
                                    ng-required={{prStDe.compulsory}} 
-                                   ng-disabled="selectedEnrollment.status !== 'ACTIVE' || eventRow.editingNotAllowed" 
-                                   ng-change="saveDatavalue(prStDe, innerForm.foo)" 
+                                   ng-disabled="true" 
+                                   ng-true-value="true" 
+                                   ng-false-value="''"
                                    name="foo"/>
                         </div>
                         <div ng-switch-default>