summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-05-08 18:57:37 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-06-12 08:44:18 +0200
commit4d9d105d21339e7236c69f47ce26f195749c3d10 (patch)
treee98f2edc2cd8f1ba40505ac09517024bbcb54b78 /ishtar_common
parent929ff43d546e7c6cb5b12f6c9b522f119a8a26ef (diff)
downloadIshtar-4d9d105d21339e7236c69f47ce26f195749c3d10.tar.bz2
Ishtar-4d9d105d21339e7236c69f47ce26f195749c3d10.zip
Fix display of images when image is missing on the HD
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/templates/widgets/image_input.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/templates/widgets/image_input.html b/ishtar_common/templates/widgets/image_input.html
index 7f8f62482..e03aa9153 100644
--- a/ishtar_common/templates/widgets/image_input.html
+++ b/ishtar_common/templates/widgets/image_input.html
@@ -1,5 +1,5 @@
{% load i18n %}<div class="form-row form-control">
- {% if widget.value.url or hidden_value %}
+ {% if widget.value and widget.value.url or hidden_value %}
<span class="col-4">
<div id="lightgallery-{{widget.name}}">
<a href="{% if hidden_value %}{{hidden_value}}{% else %}{{ widget.value.url }}{%endif%}">
@@ -13,14 +13,14 @@
</span>
{% endif %}
<span class="col-8">
- {% if widget.value.url %}{% if not widget.required %}
+ {% if widget.value and widget.value.url %}{% if not widget.required %}
<input type="checkbox" name="{{ widget.checkbox_name }}"
id="{{ widget.checkbox_id }}" />
<label for="{{ widget.checkbox_id }}">{% trans "delete" %}</label>
{% endif %}{% endif %}
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include 'django/forms/widgets/attrs.html' %} />
<input type="hidden" name="{{ widget.name }}-hidden"
- value="{% if widget.value.url %}{{widget.value.url}}{% elif hidden_value %}{{hidden_value}}{% endif %}"/>
+ value="{% if widget.value and widget.value.url %}{{widget.value.url}}{% elif hidden_value %}{{hidden_value}}{% endif %}"/>
<input type="hidden" name="{{ widget.name }}-hidden-name"
value="{% if hidden_name_value %}{{hidden_name_value}}{% endif %}"/>
</span>