Fix list_self_check function causing true/false links to toggle all selected items (#7718)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user