mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Fix SecurityAdmin checkboxes not being properly unchecked
This commit is contained in:
parent
ac1658b500
commit
ee1cfa2393
@ -67,8 +67,8 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
checkboxes.each(function() {
|
checkboxes.each(function() {
|
||||||
$(this).attr('checked', $(this).data('SecurityAdmin.oldChecked'));
|
$(this).attr('checked', $(this).data('SecurityAdmin.oldChecked') === 'checked');
|
||||||
$(this).attr('disabled', $(this).data('SecurityAdmin.oldDisabled'));
|
$(this).attr('disabled', $(this).data('SecurityAdmin.oldDisabled') === 'disabled');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,13 +72,15 @@
|
|||||||
var checkboxes = this.getCheckboxesExceptThisOne();
|
var checkboxes = this.getCheckboxesExceptThisOne();
|
||||||
if($(this).is(':checked')) {
|
if($(this).is(':checked')) {
|
||||||
checkboxes.each(function() {
|
checkboxes.each(function() {
|
||||||
|
$(this).data('PermissionCheckboxSetField.oldChecked', $(this).attr('checked'));
|
||||||
|
$(this).data('PermissionCheckboxSetField.oldDisabled', $(this).attr('disabled'));
|
||||||
$(this).attr('disabled', 'disabled');
|
$(this).attr('disabled', 'disabled');
|
||||||
$(this).attr('checked', 'checked');
|
$(this).attr('checked', 'checked');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
checkboxes.each(function() {
|
checkboxes.each(function() {
|
||||||
$(this).prop('checked', false);
|
$(this).attr('checked', $(this).data('PermissionCheckboxSetField.oldChecked') === 'checked');
|
||||||
$(this).prop('disabled', false);
|
$(this).attr('disabled', $(this).data('PermissionCheckboxSetField.oldDisabled') === 'disabled');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user