mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
* 3.2.x: [ticket/14736] Reset role dropdown when modifying permissions
This commit is contained in:
commit
4ae6cb9789
1 changed files with 17 additions and 0 deletions
|
@ -211,6 +211,23 @@ $(function() {
|
||||||
|
|
||||||
// Prepare dropdown
|
// Prepare dropdown
|
||||||
phpbb.prepareRolesDropdown();
|
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
|
})(jQuery); // Avoid conflicts with other libraries
|
||||||
|
|
Loading…
Add table
Reference in a new issue