Updates delete group modal

This commit is contained in:
Mouse Reeve 2021-12-30 17:29:06 -08:00
parent 57ce894667
commit c6b5ecc418
3 changed files with 16 additions and 18 deletions

View file

@ -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 %}

View file

@ -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 %}

View file

@ -14,21 +14,20 @@
</div>
</div>
</div>
<div class="columns is-mobile">
<div class="column">
<div class="field has-addons">
<div class="control">
{% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
</div>
<div class="control">
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
</div>
</div>
</div>
<div class="is-flex">
{% 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 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 %}
</div>
<div class="control">
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
</div>
</div>
</div>