mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-32150 Libraries: checkall and uncheckall will not select disabled or readonly checkboxes
This commit is contained in:
parent
a280078197
commit
af8def57f6
@ -796,6 +796,9 @@ function checkall() {
|
||||
var inputs = document.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].type == 'checkbox') {
|
||||
if (inputs[i].disabled || inputs[i].readOnly) {
|
||||
continue;
|
||||
}
|
||||
inputs[i].checked = true;
|
||||
}
|
||||
}
|
||||
@ -805,6 +808,9 @@ function checknone() {
|
||||
var inputs = document.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
if (inputs[i].type == 'checkbox') {
|
||||
if (inputs[i].disabled || inputs[i].readOnly) {
|
||||
continue;
|
||||
}
|
||||
inputs[i].checked = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user