Add editions view

This commit is contained in:
Mouse Reeve
2022-02-25 16:40:34 -08:00
parent 1d99e455e8
commit c67f92af46
7 changed files with 196 additions and 77 deletions

View File

@ -9,6 +9,8 @@
{% csrf_token %}
<input type="hidden" name="last_edited_by" value="{{ request.user.id }}">
<input type="hidden" name="parent_work" value="{% firstof book.parent_work.id form.parent_work %}">
<div class="columns">
<div class="column is-half">
<section class="block">
@ -123,8 +125,11 @@
</h2>
<div class="box">
{% if book.authors.exists %}
{# preserve authors if the book is unsaved #}
{{ form.authors.as_hidden }}
<fieldset>
{% for author in book.authors.all %}
{{ form.authors.as_hidden }}
<div class="is-flex is-justify-content-space-between">
<label class="label mb-2">
<input type="checkbox" name="remove_authors" value="{{ author.id }}" {% if author.id|stringformat:"i" in remove_authors %}checked{% endif %} aria-describedby="desc_remove_author_{{author.id}}">