mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-24 17:38:26 +00:00
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) {
|
||||
var inputs = document.getElementsByTagName('input');
|
||||
for (var i = 0, max = inputs.length; i < max; i++) {
|
||||
if (inputs[i].type === 'checkbox' && inputs[i].name.search['enabled'] == -1) {
|
||||
inputs[i].checked = false;
|
||||
}
|
||||
}
|
||||
//unchecks each selected checkbox
|
||||
document.querySelectorAll('input[type="checkbox"]:not([name*="enabled"])').forEach(checkbox => {
|
||||
checkbox.checked = false;
|
||||
});
|
||||
|
||||
//select the checkbox with the specified id
|
||||
document.getElementById(checkbox_id).checked = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user