User moderation actions

This commit is contained in:
Joachim 2021-11-29 23:26:43 +01:00
parent c2873c601f
commit 08b4c538e6

View File

@ -50,18 +50,23 @@
{% endif %} {% endif %}
{% with group=user.groups.first %} {% with group=user.groups.first %}
<div class="select"> <div class="select">
<select name="groups" id="id_user_group"> <select name="groups" id="id_user_group" aria-describedby="desc_user_group">
{% for value, name in group_form.fields.groups.choices %} {% for value, name in group_form.fields.groups.choices %}
<option value="{{ value }}" {% if name == group.name %}selected{% endif %}>{{ name|title }}</option> <option value="{{ value }}" {% if name == group.name %}selected{% endif %}>
{{ name|title }}
</option>
{% endfor %} {% endfor %}
<option value="" {% if not group %}selected{% endif %}>User</option> <option value="" {% if not group %}selected{% endif %}>
User
</option>
</select> </select>
</div> </div>
{% for error in group_form.groups.errors %}
<p class="help is-danger">{{ error | escape }}</p> {% include 'snippets/form_errors.html' with errors_list=group_form.groups.errors id="desc_user_group" %}
{% endfor %}
{% endwith %} {% endwith %}
<button class="button">{% trans "Save" %}</button> <button class="button">
{% trans "Save" %}
</button>
</form> </form>
</div> </div>
{% endif %} {% endif %}