mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Group, list, and shelve form buttons
This commit is contained in:
parent
d4be0ca58b
commit
9977b33a8d
9 changed files with 44 additions and 33 deletions
|
@ -2,7 +2,7 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% trans "Create Group" %}
|
{% trans "Create group" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form %}
|
{% block form %}
|
||||||
|
|
|
@ -8,13 +8,15 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% 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 %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="id" value="{{ group.id }}">
|
<input type="hidden" name="id" value="{{ group.id }}">
|
||||||
<button class="button is-danger" type="submit">
|
<div class="buttons is-right is-flex-grow-1">
|
||||||
{% trans "Delete" %}
|
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||||
</button>
|
<button class="button is-danger" type="submit">
|
||||||
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
{% trans "Delete" %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -16,18 +16,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="is-flex">
|
<div class="is-flex">
|
||||||
{% if group.id %}
|
{% if group.id %}
|
||||||
<div class="is-flex-grow-1">
|
<div>
|
||||||
<button type="button" data-modal-open="delete_group" class="button is-danger">
|
<button type="button" data-modal-open="delete_group" class="button is-danger">
|
||||||
{% trans "Delete group" %}
|
{% trans "Delete group" %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="field has-addons">
|
|
||||||
<div class="control">
|
<div class="is-flex is-flex-grow-1 is-justify-content-flex-end">
|
||||||
{% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
|
<div class="field has-addons">
|
||||||
</div>
|
<div class="control">
|
||||||
<div class="control">
|
{% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
|
||||||
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<button type="submit" class="button is-primary">{% trans "Save" %}</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,14 +32,16 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% block modal-footer %}
|
||||||
<button type="submit" class="button is-link">
|
<div class="buttons is-right is-flex-grow-1">
|
||||||
{% if list.curation == 'open' or request.user == list.user or list.group|is_member:request.user %}
|
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||||
{% trans "Add" %}
|
<button type="submit" class="button is-link">
|
||||||
{% else %}
|
{% if list.curation == 'open' or request.user == list.user or list.group|is_member:request.user %}
|
||||||
{% trans "Suggest" %}
|
{% trans "Add" %}
|
||||||
{% endif %}
|
{% else %}
|
||||||
</button>
|
{% trans "Suggest" %}
|
||||||
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
{% endif %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-form-close %}</form>{% endblock %}
|
{% block modal-form-close %}</form>{% endblock %}
|
||||||
|
|
|
@ -8,15 +8,17 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% 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 %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="id" value="{{ list.id }}">
|
<input type="hidden" name="id" value="{{ list.id }}">
|
||||||
<button class="button is-danger" type="submit">
|
<div class="buttons is-right is-flex-grow-1">
|
||||||
{% trans "Delete" %}
|
<button type="button" class="button" data-modal-close>
|
||||||
</button>
|
{% trans "Cancel" %}
|
||||||
<button type="button" class="button" data-modal-close>
|
</button>
|
||||||
{% trans "Cancel" %}
|
<button class="button is-danger" type="submit">
|
||||||
</button>
|
{% trans "Delete" %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="is-flex">
|
<div class="is-flex is-justify-content-end">
|
||||||
{% if list.id %}
|
{% if list.id %}
|
||||||
<div class="is-flex-grow-1">
|
<div class="is-flex-grow-1">
|
||||||
<button type="button" data-modal-open="delete_list" class="button is-danger">
|
<button type="button" data-modal-open="delete_list" class="button is-danger">
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% block modal-footer %}
|
||||||
<button type="submit" class="button is-primary">{% trans "Set" %}</button>
|
<div class="buttons is-right is-flex-grow-1">
|
||||||
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||||
|
<button type="submit" class="button is-primary">{% trans "Set" %}</button>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-form-close %}</form>{% endblock %}
|
{% block modal-form-close %}</form>{% endblock %}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% trans "Create Shelf" %}
|
{% trans "Create shelf" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form %}
|
{% block form %}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<label class="label" for="id_description_{{ uuid }}">{% trans "Description:" %}</label>
|
<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>
|
<textarea name="description" cols="40" rows="5" maxlength="500" class="textarea" id="id_description_{{ uuid }}">{{ form.description.value|default:'' }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="field has-addons">
|
<div class="field has-addons is-justify-content-end">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
{% include 'snippets/privacy_select.html' with current=privacy %}
|
{% include 'snippets/privacy_select.html' with current=privacy %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue