[ticket/14315] Only add role options specified for each group

PHPBB3-14315
This commit is contained in:
Marc Alexander 2016-02-05 23:48:57 +01:00
parent d0ce6a18df
commit 4973632288
2 changed files with 3 additions and 0 deletions

View file

@ -46,7 +46,9 @@
<div class="dropdown hidden">
<ul class="dropdown-contents" id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" >
{% for role in loops.role_options %}
{% if role.UG_ID == p_mask.f_mask.UG_ID %}
<li data-id="{{ role.ID }}" data-target-id="advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" data-title="{{ role.TITLE }}"{% if role.SELECTED == true %} data-selected="{{ role.SELECTED }}"{% endif %}>{{ role.ROLE_NAME }}</li>
{% endif %}
{% endfor %}
</ul>
</div>

View file

@ -477,6 +477,7 @@ class auth_admin extends \phpbb\auth\auth
$template->assign_block_vars('role_options', array(
'ID' => $role_id,
'UG_ID' => $ug_id,
'ROLE_NAME' => $role_name,
'TITLE' => $role_description,
'SELECTED' => $role_id == $current_role_id,