mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed PermissionCheckboxSetField.js checkbox toggling when no previous values have been saved through jQuery.data()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101070 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2c809ccd87
commit
0eab4a2daf
@ -24,8 +24,11 @@
|
||||
});
|
||||
} else {
|
||||
checkboxes.each(function() {
|
||||
$(this).attr('checked', $(this).data('SecurityAdmin.oldChecked'));
|
||||
$(this).attr('disabled', $(this).data('SecurityAdmin.oldDisabled'));
|
||||
// only update attributes if previous values have been saved
|
||||
var oldChecked = $(this).data('SecurityAdmin.oldChecked');
|
||||
var oldDisabled = $(this).data('SecurityAdmin.oldDisabled');
|
||||
if(oldChecked != null) $(this).attr('checked', oldChecked);
|
||||
if(oldDisabled != null) $(this).attr('disabled', oldDisabled);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user