Group, list, and shelve form buttons

This commit is contained in:
Mouse Reeve 2022-03-10 10:49:33 -08:00
parent d4be0ca58b
commit 9977b33a8d
9 changed files with 44 additions and 33 deletions

View file

@ -2,7 +2,7 @@
{% load i18n %}
{% block header %}
{% trans "Create Group" %}
{% trans "Create group" %}
{% endblock %}
{% block form %}

View file

@ -8,13 +8,15 @@
{% endblock %}
{% block modal-footer %}
<form name="delete-group-{{ group.id }}" action="{% url 'delete-group' group.id %}" method="POST">
<form name="delete-group-{{ group.id }}" action="{% url 'delete-group' group.id %}" method="POST" class="is-flex-grow-1">
{% csrf_token %}
<input type="hidden" name="id" value="{{ group.id }}">
<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>
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
</div>
</form>
{% endblock %}

View file

@ -16,12 +16,14 @@
</div>
<div class="is-flex">
{% if group.id %}
<div class="is-flex-grow-1">
<div>
<button type="button" data-modal-open="delete_group" class="button is-danger">
{% trans "Delete group" %}
</button>
</div>
{% endif %}
<div class="is-flex is-flex-grow-1 is-justify-content-flex-end">
<div class="field has-addons">
<div class="control">
{% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
@ -30,4 +32,5 @@
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
</div>
</div>
</div>
</div>

View file

@ -32,14 +32,16 @@
{% endblock %}
{% block modal-footer %}
<button type="submit" class="button is-link">
<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>
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
</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>
<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">

View file

@ -18,8 +18,10 @@
{% endblock %}
{% block modal-footer %}
<button type="submit" class="button is-primary">{% trans "Set" %}</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-primary">{% trans "Set" %}</button>
</div>
{% endblock %}
{% block modal-form-close %}</form>{% endblock %}

View file

@ -2,7 +2,7 @@
{% load i18n %}
{% block header %}
{% trans "Create Shelf" %}
{% trans "Create shelf" %}
{% endblock %}
{% block form %}

View file

@ -17,7 +17,7 @@
<label class="label" for="id_description_{{ uuid }}">{% trans "Description:" %}</label>
<textarea name="description" cols="40" rows="5" maxlength="500" class="textarea" id="id_description_{{ uuid }}">{{ form.description.value|default:'' }}</textarea>
</div>
<div class="field has-addons">
<div class="field has-addons is-justify-content-end">
<div class="control">
{% include 'snippets/privacy_select.html' with current=privacy %}
</div>