1
0
Fork 0

Merge pull request #1456 from Tak/add-cover-from-url-while-adding-book

Add cover from url while adding book
This commit is contained in:
Mouse Reeve 2021-09-29 08:56:05 -07:00 committed by GitHub
commit 002a9c4267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 19 deletions

View file

@ -236,14 +236,12 @@
<label class="label" for="id_cover">{% trans "Upload cover:" %}</label>
{{ form.cover }}
</div>
{% if book %}
<div class="field">
<label class="label" for="id_cover_url">
{% trans "Load cover from url:" %}
</label>
<input class="input" name="cover-url" id="id_cover_url">
<input class="input" name="cover-url" id="id_cover_url" type="url" value="{{ cover_url|default:'' }}">
</div>
{% endif %}
{% for error in form.cover.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}