moviewyrm/bookwyrm/templates/snippets/remove_from_group_button.html

26 lines
1 KiB
HTML
Raw Normal View History

2021-10-02 03:48:53 +00:00
{% load i18n %}
2022-01-18 20:30:46 +00:00
{% load group_tags %}
2021-10-02 03:48:53 +00:00
{% 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 }}">
{% trans "Confirm" %}
</button>
<button id="hide_submit_button" data-controls="submit_button" class="button is-small" type="button" aria-pressed="false">
{% trans "Remove" %}
2021-10-04 11:20:02 +00:00
</button>
2021-10-02 03:48:53 +00:00
</form>
</div>
</div>
{% endif %}