moviewyrm/bookwyrm/templates/snippets/remove_from_group_button.html

25 lines
1.1 KiB
HTML
Raw Normal View History

2021-10-02 03:48:53 +00:00
{% load i18n %}
{% load bookwyrm_group_tags %}
{% if request.user == user or not request.user == group.user or not request.user.is_authenticated %}
{% else %}
{% if user in request.user.blocks.all %}
{% include 'snippets/block_button.html' with blocks=True %}
<br/>
{% endif %}
<div class="fieldmb-0">
2021-10-02 03:48:53 +00:00
<div class="control">
<form action="{% url 'remove-group-member' %}" method="POST" class="has-text-centered">
2021-10-02 03:48:53 +00:00
{% csrf_token %}
<input type="hidden" name="group" value="{{ group.id }}">
<input type="hidden" name="user" value="{{ user.username }}">
<button id="submit_button" class="button is-small is-danger is-light is-hidden" type="submit" data-id="member_{{ member.id }}">
2021-10-16 07:00:55 +00:00
{% blocktrans with username=user.localname %} Confirm {% endblocktrans %}
</button>
<button id="hide_submit_button" data-controls="submit_button" class="button is-small" type="button" aria-pressed="false">
{% blocktrans with username=user.localname %} Remove {% endblocktrans %}
2021-10-04 11:20:02 +00:00
</button>
2021-10-02 03:48:53 +00:00
</form>
</div>
</div>
{% endif %}