logintoboggan.permissions.js 778 B

12345678910111213141516171819202122232425
  1. /**
  2. * LoginToboggan needs its pre-auth role to not be explicitly tied to
  3. * the auth role.
  4. */
  5. (function ($) {
  6. /**
  7. * Shows checked and disabled checkboxes for inherited permissions.
  8. */
  9. Drupal.behaviors.LoginTobogganPermissions = {
  10. attach: function (context, settings) {
  11. // Revert changes made by modules/user/user.permissions.js
  12. $('table#permissions', context).once('tobogganPermissions', function () {
  13. $('input[type=checkbox]', this).filter('.rid-' + settings.LoginToboggan.preAuthID).removeClass('real-checkbox').each(function () {
  14. $(this).next().filter('.dummy-checkbox').remove();
  15. $('input.rid-' + settings.LoginToboggan.preAuthID).each(function () {
  16. this.style.display = '';
  17. });
  18. });
  19. });
  20. },
  21. };
  22. })(jQuery);