Closed e0ipso closed 7 years ago
oh man. OK I see a ton of "dummy-checkbox" checkboxes that get added to the Core Permissions javascript library due to it 'inherited' logic, which is confusing material design checkboxes. This may take some sorting out. meanwhile, it may just make sense to roll back browser default for this page. I will investigate.
@briancwald thanks for taking a look.
@e0ipso can you try out the permissions-checkboxes branch? It's definitely NOT an ideal solution and the code needs to be cleaned up but I think logically it should work. Just curious if it at least solves the problem of disabling checkboxes that shouldn't be.
Essentially replaces the core user/user.permissions.js library and replaces some markup to use the label instead of the checkboxes.
@mortenson I think this makes sense logically (as logical as the original code, at least) but if you get a minute, can you see if there is a better way of doing what I did here?
@briancwald It's hard to see what you changed in that branch, but overriding the entire behavior makes sense in this case.
45c45
< var $dummy = $('<span class="dummy-checkbox js-dummy-checkbox" ><input type="checkbox" checked="checked" disabled="disabled" /><label class="visually-hidden">disabled</label></span>')
---
> var $dummy = $('<input type="checkbox" class="dummy-checkbox js-dummy-checkbox" disabled="disabled" checked="checked" />')
53c53
< .before($dummy);
---
> .after($dummy);
60c60
< .each(self.toggle)
---
> .each(self.toggle);
81,85d80
< if (authCheckbox.checked) {
< $(this).siblings('label').css('display','none');
< } else {
< $(this).siblings('label').css('display','');
< }
This should be fixed now.
👏
They are incorrectly disabled:
Seven
Material Admin