forked from mirrors/bookwyrm
parent
b9f06edc1b
commit
ffe5ce7251
2 changed files with 5 additions and 21 deletions
|
@ -42,26 +42,10 @@
|
|||
<h3 class="title is-6 mb-1">Add cover</h3>
|
||||
<form name="add-cover" method="POST" action="/upload-cover/{{ book.id }}" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
<div class="file is-small mb-1">
|
||||
<label class="file-label">
|
||||
<input class="file-input" type="file" name="cover" accept="image/*" enctype="multipart/form-data" id="id_cover" required>
|
||||
<span class="file-cta">
|
||||
<span class="file-icon">
|
||||
<i class="fas fa-upload"></i>
|
||||
</span>
|
||||
<span class="file-label">
|
||||
Choose file...
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button is-small is-primary" type="submit">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
<label class="label">
|
||||
<input type="file" name="cover" accept="image/*" enctype="multipart/form-data" id="id_cover" required>
|
||||
</label>
|
||||
<button class="button is-small is-primary" type="submit">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<div class="column is-narrow">
|
||||
<div class="block">
|
||||
<h2 class="title is-4">Cover</h2>
|
||||
<p>{{ form.cover }} </p>
|
||||
<p>{{ form.cover }}</p>
|
||||
{% for error in form.cover.errors %}
|
||||
<p class="help is-danger">{{ error | escape }}</p>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue