Made the partials explicit in their section (i.e. user)
This commit is contained in:
21
templates/forms/partials/input-user-group.html.twig
Normal file
21
templates/forms/partials/input-user-group.html.twig
Normal file
@@ -0,0 +1,21 @@
|
||||
{% block input_user_group %}
|
||||
{% if 'group' not in form.fields.hidden %}
|
||||
<div class="form-group">
|
||||
<label for="input-user-group">{{translate('GROUP')}}</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fas fa-users fa-fw"></i></span>
|
||||
{% if 'group' in form.fields.disabled %}
|
||||
<input type="text" class="form-control" name="theme" value="{{user.group.name}}" disabled>
|
||||
{% else %}
|
||||
<select id="input-user-group" class="form-control js-select2" name="group_id">
|
||||
<option value="0">{{translate('GROUP.NONE')}}</option>
|
||||
<option disabled="disabled">-----</option>
|
||||
{% for group in groups %}
|
||||
<option value="{{group.id}}" {% if (group.id == user.group_id) %}selected{% endif %}>{{group.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user