Avoid template errors when form.cover is not defined
This commit is contained in:
parent
1a49569bf2
commit
464832bb31
@ -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 New Issue
Block a user