Fix list_self_check function causing true/false links to toggle all selected items (#7718)

This commit is contained in:
Alex
2026-01-23 12:13:19 -07:00
committed by GitHub
parent 0c828e9e40
commit b8e17acf38
+6 -6
View File
@@ -1007,12 +1007,12 @@
} }
function list_self_check(checkbox_id) { function list_self_check(checkbox_id) {
var inputs = document.getElementsByTagName('input'); //unchecks each selected checkbox
for (var i = 0, max = inputs.length; i < max; i++) { document.querySelectorAll('input[type="checkbox"]:not([name*="enabled"])').forEach(checkbox => {
if (inputs[i].type === 'checkbox' && inputs[i].name.search['enabled'] == -1) { checkbox.checked = false;
inputs[i].checked = false; });
}
} //select the checkbox with the specified id
document.getElementById(checkbox_id).checked = true; document.getElementById(checkbox_id).checked = true;
} }