blob: fe9090e465434a8fa16a061bf6760be910eb9ee4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{% load i18n %}<div class="form-row form-control">
{% if is_initial or widget.value.url %}
<span class="col-4">
<div id="lightgallery-{{widget.name}}">
<a href="{{ widget.value.url }}">
<img class="form-thumbnail" src="{{ widget.value.url }}">
</a>
</div>
</span>{% endif %}
<span class="col-8">
{% if is_initial or widget.value.url %}{% if not widget.required %}
<input type="checkbox" name="{{ checkbox_name }}" id="{{ checkbox_id }}" />
<label for="{{ checkbox_id }}">{% trans "delete" %}</label>
{% endif %}{% endif %}
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include 'django/forms/widgets/attrs.html' %} />
</span>
</div>
{% if is_initial or widget.value.url %}
<script type="text/javascript">
lightGallery(document.getElementById('lightgallery-{{widget.name}}'));
</script>
{% endif %}
|