mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-27 02:20:31 +00:00
Updates delete group modal
This commit is contained in:
parent
57ce894667
commit
c6b5ecc418
3 changed files with 16 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
|||
{% extends 'components/modal.html' %}
|
||||
{% extends 'components/new_modal.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block modal-title %}{% trans "Delete this group?" %}{% endblock %}
|
||||
|
@ -14,8 +14,7 @@
|
|||
<button class="button is-danger" type="submit">
|
||||
{% trans "Delete" %}
|
||||
</button>
|
||||
{% trans "Cancel" as button_text %}
|
||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="delete_group" controls_uid=group.id %}
|
||||
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
<form name="edit-group" method="post" action="{% url 'group' group.id %}">
|
||||
{% include 'groups/form.html' %}
|
||||
</form>
|
||||
{% include "groups/delete_group_modal.html" with controls_text="delete_group" controls_uid=group.id %}
|
||||
{% include "groups/delete_group_modal.html" with id="delete_group" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,8 +14,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<div class="is-flex">
|
||||
{% if group.id %}
|
||||
<div class="is-flex-grow-1">
|
||||
<button type="button" data-modal-open="delete_group" class="button is-danger">
|
||||
{% trans "Delete group" %}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
{% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
|
||||
|
@ -24,11 +30,4 @@
|
|||
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if group.id %}
|
||||
<div class="column is-narrow">
|
||||
{% trans "Delete group" as button_text %}
|
||||
{% include 'snippets/toggle/toggle_button.html' with class="is-danger" text=button_text icon_with_text="x" controls_text="delete_group" controls_uid=group.id focus="modal_title_delete_group" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue