groups templates improvements

- require confirmation before removing a member
- require confirmation before removing self
- make button text less verbose
- use more standardised formatting for group editing form
- improve button colours
- add missing trans tags
- reload group page when removing member
This commit is contained in:
Hugh Rundle
2021-10-16 16:43:09 +11:00
parent 1736419538
commit 85784f07d2
6 changed files with 49 additions and 63 deletions

View File

@ -8,6 +8,23 @@
<div class="columns mt-3">
<section class="column is-three-quarters">
{% if group.user == request.user %}
<div class="block">
<form class="field has-addons" method="get" action="{% url 'group-find-users' group.id %}">
<div class="control">
<input type="text" name="user_query" value="{{ request.GET.user_query }}" class="input" placeholder="{% trans 'Search to add a user' %}" aria-label="{% trans 'Search to add a user' %}">
</div>
<div class="control">
<button class="button" type="submit">
<span class="icon icon-search" title="{% trans 'Search' %}">
<span class="is-sr-only">{% trans "Search" %}</span>
</span>
</button>
</div>
</form>
</div>
{% endif %}
{% block searchresults %}
{% endblock %}
<div class="mb-2">
@ -61,26 +78,5 @@
{% endif %}
{% include "snippets/pagination.html" with page=items %}
</section>
{% if group.user == request.user %}
<section class="column is-one-quarter">
<div class="block">
<h2 class="title is-5">Find new members</h2>
<form class="field has-addons" method="get" action="{% url 'group-find-users' group.id %}">
<div class="control">
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search to add a user' %}" aria-label="{% trans 'Search to add a user' %}">
</div>
<div class="control">
<button class="button" type="submit">
<span class="icon icon-search" title="{% trans 'Search' %}">
<span class="is-sr-only">{% trans "Search" %}</span>
</span>
</button>
</div>
</form>
</div>
</section>
{% endif %}
</div>
{% endblock %}