diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-12-01 11:34:00 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-12-01 11:34:00 +0100 |
commit | b24c2ea5be700b09053c9916f15f807c195d151b (patch) | |
tree | 9dd99a67435a8a3501e979b58191bbc8e6807ff5 /phpBB/adm | |
parent | d8944728668bb5087192df7b94c7cfc99cdb55a2 (diff) | |
download | forums-b24c2ea5be700b09053c9916f15f807c195d151b.tar forums-b24c2ea5be700b09053c9916f15f807c195d151b.tar.gz forums-b24c2ea5be700b09053c9916f15f807c195d151b.tar.bz2 forums-b24c2ea5be700b09053c9916f15f807c195d151b.tar.xz forums-b24c2ea5be700b09053c9916f15f807c195d151b.zip |
[ticket/14736] Reset role dropdown when modifying permissions
PHPBB3-14736
Diffstat (limited to 'phpBB/adm')
-rw-r--r-- | phpBB/adm/style/tooltip.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js index 65773ae14f..8781e2b509 100644 --- a/phpBB/adm/style/tooltip.js +++ b/phpBB/adm/style/tooltip.js @@ -211,6 +211,23 @@ $(function() { // Prepare dropdown phpbb.prepareRolesDropdown(); + + // Reset role drop-down on modifying permissions in advanced tab + $('div.permissions-switch > a').on('click', function () { + $.each($('input[type=radio][name^="setting["]'), function () { + var $this = $(this); + $this.on('click', function () { + var $rolesOptions = $this.closest('fieldset.permissions').find('.roles-options'), + rolesSelect = $rolesOptions.find('select > option')[0]; + + // Set selected setting + $rolesOptions.children('span') + .text(rolesSelect.text); + $rolesOptions.children('input[type=hidden]') + .val(rolesSelect.value); + }); + }); + }); }); })(jQuery); // Avoid conflicts with other libraries |