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 {
|
||||
checkboxes.each(function() {
|
||||
$(this).attr('checked', $(this).data('SecurityAdmin.oldChecked'));
|
||||
$(this).attr('disabled', $(this).data('SecurityAdmin.oldDisabled'));
|
||||
$(this).attr('checked', $(this).data('SecurityAdmin.oldChecked') === 'checked');
|
||||
$(this).attr('disabled', $(this).data('SecurityAdmin.oldDisabled') === 'disabled');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -72,13 +72,15 @@
|
||||
var checkboxes = this.getCheckboxesExceptThisOne();
|
||||
if($(this).is(':checked')) {
|
||||
checkboxes.each(function() {
|
||||
$(this).data('PermissionCheckboxSetField.oldChecked', $(this).attr('checked'));
|
||||
$(this).data('PermissionCheckboxSetField.oldDisabled', $(this).attr('disabled'));
|
||||
$(this).attr('disabled', 'disabled');
|
||||
$(this).attr('checked', 'checked');
|
||||
});
|
||||
} else {
|
||||
checkboxes.each(function() {
|
||||
$(this).prop('checked', false);
|
||||
$(this).prop('disabled', false);
|
||||
$(this).attr('checked', $(this).data('PermissionCheckboxSetField.oldChecked') === 'checked');
|
||||
$(this).attr('disabled', $(this).data('PermissionCheckboxSetField.oldDisabled') === 'disabled');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user