aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2018-01-02 13:51:39 +0700
committerrxu <rxu@mail.ru>2019-07-28 18:34:35 +0700
commit4d640555ef1ba851f9e041c594d0dda7253e8450 (patch)
treecb30a42157632267d6017398a120861d9b332ae2 /phpBB/adm
parentae62bc46428948cdfbb735c8b9b566d02c0f78f0 (diff)
downloadforums-4d640555ef1ba851f9e041c594d0dda7253e8450.tar
forums-4d640555ef1ba851f9e041c594d0dda7253e8450.tar.gz
forums-4d640555ef1ba851f9e041c594d0dda7253e8450.tar.bz2
forums-4d640555ef1ba851f9e041c594d0dda7253e8450.tar.xz
forums-4d640555ef1ba851f9e041c594d0dda7253e8450.zip
[ticket/15467] Fix JS for permissions setting
PHPBB3-15467
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/style/permission_mask.html2
-rw-r--r--phpBB/adm/style/permissions.js10
2 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index c556664b8c..23294d60df 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -9,6 +9,8 @@
var role_options = new Array();
+ var no_role_assigned = "{LA_NO_ROLE_ASSIGNED}";
+
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js
index 9178adab50..4ae566ace7 100644
--- a/phpBB/adm/style/permissions.js
+++ b/phpBB/adm/style/permissions.js
@@ -279,6 +279,16 @@ function reset_role(id) {
}
t.options[0].selected = true;
+
+ (function($)// Avoid conflicts with other libraries
+ {
+ var parent = $(t).parent();
+ parent.find("span[title=Roles]")[0].innerText = no_role_assigned;
+
+ // Find proper role value
+ var roleInput = parent.find('input[name^=role][data-name]');
+ roleInput.val(0);
+ })(jQuery); // Avoid conflicts with other libraries
}
/**