Skip to content

Commit

Permalink
Showing 'Is set' when checkbox is checked
Browse files Browse the repository at this point in the history
  • Loading branch information
dicksonmulli committed Oct 27, 2024
1 parent 234fb75 commit 695d589
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion omod/src/main/webapp/admin/dictionary/conceptForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
</spring:bind>
</td>
</tr>
<tr id="conceptSetRow" style="display: none">
<tr id="conceptSetRow">
<th valign="top"><openmrs:message code="Concept.conceptSets"/></th>
<td valign="top">
<spring:bind path="command.concept.conceptSets">
Expand Down Expand Up @@ -1051,6 +1051,16 @@ function resetNewTermForm(){
$j('#newTermErrorMsg').hide();
$j('#successMsg').hide();
}
document.addEventListener("DOMContentLoaded", function() {
var conceptSetCheckbox = document.getElementById("conceptSet");
changeSetStatus(conceptSetCheckbox);
});
function changeSetStatus(checkbox) {
var conceptSetRow = document.getElementById("conceptSetRow");
conceptSetRow.style.display = checkbox.checked ? "" : "none";
}
</script>
</openmrs:hasPrivilege>

Expand Down
12 changes: 11 additions & 1 deletion omod/src/main/webapp/dictionary/conceptForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
</spring:bind>
</td>
</tr>
<tr id="conceptSetRow" style="display: none">
<tr id="conceptSetRow">
<th valign="top"><openmrs:message code="Concept.conceptSets"/></th>
<td valign="top">
<spring:bind path="command.concept.conceptSets">
Expand Down Expand Up @@ -1072,6 +1072,16 @@ function resetNewTermForm(){
$j('#newTermErrorMsg').hide();
$j('#successMsg').hide();
}
document.addEventListener("DOMContentLoaded", function() {
var conceptSetCheckbox = document.getElementById("conceptSet");
changeSetStatus(conceptSetCheckbox);
});
function changeSetStatus(checkbox) {
var conceptSetRow = document.getElementById("conceptSetRow");
conceptSetRow.style.display = checkbox.checked ? "" : "none";
}
</script>
</openmrs:hasPrivilege>

Expand Down

0 comments on commit 695d589

Please sign in to comment.