summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/widgets
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-23 16:33:10 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-23 16:33:10 +0100
commit8f4136267df28d5b13d31d3bfbb74f0ca7edcb6e (patch)
tree9935281965c3f002a60ec8761f5102022af94276 /ishtar_common/templates/widgets
parentbb698c1a1579eb4050fe50ac56007deed0c59570 (diff)
downloadIshtar-8f4136267df28d5b13d31d3bfbb74f0ca7edcb6e.tar.bz2
Ishtar-8f4136267df28d5b13d31d3bfbb74f0ca7edcb6e.zip
Widgets: image input
Diffstat (limited to 'ishtar_common/templates/widgets')
-rw-r--r--ishtar_common/templates/widgets/image_input.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/ishtar_common/templates/widgets/image_input.html b/ishtar_common/templates/widgets/image_input.html
new file mode 100644
index 000000000..79be1aaf9
--- /dev/null
+++ b/ishtar_common/templates/widgets/image_input.html
@@ -0,0 +1,15 @@
+<div class="form-row form-control">
+ {% if is_initial %}
+ <span class="col-4">
+ <a href="{{ widget.value.url }}">
+ <img class="form-thumbnail" src="{{ widget.value.url }}">
+ </a>
+ </span>{% endif %}
+ <span class="col-8">
+ {% if not widget.required and is_initial %}
+ <input type="checkbox" name="{{ checkbox_name }}" id="{{ checkbox_id }}" />
+ <label for="{{ checkbox_id }}">{{ clear_checkbox_label }}</label>
+ {% endif %}
+ <input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %} />
+ </span>
+</div> \ No newline at end of file