Use close button instead of cancel button on edit form

This commit is contained in:
Mouse Reeve 2021-01-31 12:36:53 -08:00
parent 697bcb0edb
commit 944503dde5
3 changed files with 15 additions and 6 deletions

View file

@ -28,7 +28,7 @@
<label class="field">
<input type="radio" name="curation" value="open"{% if list.curation == 'open' %} checked{% endif %}> Open
<p class="help mb-2">Anyone can add books to this list, but only you can remove them</p>
<p class="help mb-2">Anyone can add books to this list</p>
</label>
</fieldset>
</div>
@ -39,7 +39,6 @@
</div>
<div class="control">
<button type="submit" class="button is-primary">Save</button>
{% include 'snippets/toggle/close_button.html' with controls_text='create-list' text="Cancel" %}
</div>
</div>

View file

@ -10,13 +10,18 @@
</div>
{% if request.user == list.user %}
<div class="column is-narrow">
{% include 'snippets/toggle/open_button.html' with text="Edit list" icon="pencil" controls_text="create-list" %}
{% include 'snippets/toggle/open_button.html' with text="Edit list" icon="pencil" controls_text="edit-list" %}
</div>
{% endif %}
</header>
<form name="create-list" method="post" action="{% url 'list' list.id %}" class="box hidden" id="create-list">
<h3 class="title">Edit list</h3>
<form name="edit-list" method="post" action="{% url 'list' list.id %}" class="box hidden" id="edit-list">
<header class="columns">
<h3 class="title column">Edit list</h3>
<div class="column is-narrow">
{% include 'snippets/toggle/toggle_button.html' with controls_text="edit-list" label="close" class="delete" nonbutton=True %}
</div>
</header>
{% include 'lists/form.html' %}
</form>

View file

@ -17,7 +17,12 @@
</header>
<form name="create-list" method="post" action="{% url 'lists' %}" class="box hidden" id="create-list">
<h3 class="title">Create list</h3>
<header class="columns">
<h3 class="title column">Create list</h3>
<div class="column is-narrow">
{% include 'snippets/toggle/toggle_button.html' with controls_text="create-list" label="close" class="delete" nonbutton=True %}
</div>
</header>
{% include 'lists/form.html' %}
</form>