Merge pull request #2003 from bookwyrm-social/modal-button-pattern

Consistent positioning of success buttons
This commit is contained in:
Mouse Reeve
2022-03-10 14:29:39 -08:00
committed by GitHub
19 changed files with 93 additions and 60 deletions

View File

@ -32,14 +32,16 @@
{% endblock %}
{% block modal-footer %}
<button type="submit" class="button is-link">
{% if list.curation == 'open' or request.user == list.user or list.group|is_member:request.user %}
{% trans "Add" %}
{% else %}
{% trans "Suggest" %}
{% endif %}
</button>
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
<div class="buttons is-right is-flex-grow-1">
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
<button type="submit" class="button is-link">
{% if list.curation == 'open' or request.user == list.user or list.group|is_member:request.user %}
{% trans "Add" %}
{% else %}
{% trans "Suggest" %}
{% endif %}
</button>
</div>
{% endblock %}
{% block modal-form-close %}</form>{% endblock %}

View File

@ -8,15 +8,17 @@
{% endblock %}
{% block modal-footer %}
<form name="delete-list-{{ list.id }}" action="{% url 'delete-list' list.id %}" method="POST">
<form name="delete-list-{{ list.id }}" action="{% url 'delete-list' list.id %}" method="POST" class="is-flex-grow-1">
{% csrf_token %}
<input type="hidden" name="id" value="{{ list.id }}">
<button class="button is-danger" type="submit">
{% trans "Delete" %}
</button>
<button type="button" class="button" data-modal-close>
{% trans "Cancel" %}
</button>
<div class="buttons is-right is-flex-grow-1">
<button type="button" class="button" data-modal-close>
{% trans "Cancel" %}
</button>
<button class="button is-danger" type="submit">
{% trans "Delete" %}
</button>
</div>
</form>
{% endblock %}

View File

@ -114,7 +114,7 @@
</fieldset>
</div>
</div>
<div class="is-flex">
<div class="is-flex is-justify-content-end">
{% if list.id %}
<div class="is-flex-grow-1">
<button type="button" data-modal-open="delete_list" class="button is-danger">