Skip to content

Commit

Permalink
fix: [DHIS2-14104] make sure deselected checkboxes evaluate `d2:hasVa…
Browse files Browse the repository at this point in the history
…lue` to `false` (#1692)
  • Loading branch information
superskip authored May 2, 2023
1 parent 2fbe885 commit 0954cf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/dataentry/compare-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
<input type="checkbox"
class="form-control-checkbox"
ng-model="otherEvent[prStDe.dataElement.id]"
ng-false-value="null"
ng-required={{prStDe.compulsory}}
ng-disabled="true"
name="foo"/>
Expand Down Expand Up @@ -244,6 +245,7 @@
<input type="checkbox"
class="form-control-checkbox"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-false-value="null"
ng-required={{prStDe.compulsory}}
ng-disabled="true"
name="foo"/>
Expand Down Expand Up @@ -372,6 +374,7 @@
<input type="checkbox"
class="form-control-checkbox"
ng-model="otherEvent[prStDes[de.id].dataElement.id]"
ng-false-value="null"
ng-required={{prStDesInStage[currentStage.id][de.id].compulsory}}
ng-disabled="true"
name="foo"/>
Expand Down
1 change: 1 addition & 0 deletions components/dataentry/inner-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
<input type="checkbox"
class="form-control-checkbox"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-false-value="null"
ng-required="prStDe.compulsory || mandatoryFields[currentEvent.event][prStDe.dataElement.id]"
ng-disabled="!dataElementEditable(prStDe)"
ng-change="saveDatavalue(prStDe, innerForm.foo)"
Expand Down
2 changes: 2 additions & 0 deletions components/dataentry/table-entry-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ <h3>{{'enrollment'| translate}}</h3>
class="form-control"
ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
ng-model="selectedOrgUnit.closedStatus || eventRow[prStDe.dataElement.id]"
ng-false-value="null"
ng-required={{prStDe.compulsory}}
ng-attr-title="{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}"
ng-dblclick="$event.stopPropagation();"
Expand Down Expand Up @@ -368,6 +369,7 @@ <h3>{{'enrollment'| translate}}</h3>
<input type="checkbox"
class="form-control"
ng-model="eventRow[prStDe.dataElement.id]"
ng-false-value="null"
ng-required={{prStDe.compulsory}}
ng-attr-title="{{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.displayName}}"
ng-disabled="true"
Expand Down

0 comments on commit 0954cf2

Please sign in to comment.