mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 13:31:02 +00:00
Avoid template errors when form.cover is not defined
This commit is contained in:
parent
1a49569bf2
commit
464832bb31
1 changed files with 2 additions and 2 deletions
|
@ -37,9 +37,9 @@
|
|||
|
||||
<label for="cover">{{ "Illustration" | _ }}<small>{{ "Optional" | _ }}</small></label>
|
||||
<select id="cover" name="cover">
|
||||
<option value="none" {% if not form.cover %}selected{% endif %}>{{ "None" | _ }}</option>
|
||||
<option value="none" {% if form is undefined or form.cover is undefined %}selected{% endif %}>{{ "None" | _ }}</option>
|
||||
{% for media in medias %}
|
||||
<option value="{{ media.id }}" {% if form.cover == media.id %}selected{% endif %}>
|
||||
<option value="{{ media.id }}" {% if form is defined and form.cover is defined and form.cover == media.id %}selected{% endif %}>
|
||||
{{ media.alt_text | default(value=media.content_warning) }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue