- Issue created by @Anybody
JS toggle implementation assumes the two first roles are always anonymous and registered user, but roles are sortable and I just ran into a case where the assumption is wrong, so that "Authenticated user" role (and thereby all other roles) are hidden!
toggle: function toggle() {
var isAuthChecked = $('#edit-roles-authenticated').is(':checked');
// Removing first 2 options, as they will always be Anon and Auth roles.
$('.js-form-item.js-form-type-checkbox').slice(2).each(function () {
this.style.display = isAuthChecked ? 'none' : '';
});
}
Exclude the "anonymous" and "authenticated" user role by key
Active
1.0
Code