summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/widgets/clearable_file_input.html
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/widgets/clearable_file_input.html')
-rw-r--r--ishtar_common/templates/widgets/clearable_file_input.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/templates/widgets/clearable_file_input.html b/ishtar_common/templates/widgets/clearable_file_input.html
new file mode 100644
index 000000000..f2721fbfd
--- /dev/null
+++ b/ishtar_common/templates/widgets/clearable_file_input.html
@@ -0,0 +1,8 @@
+{% load i18n %}{% if widget.is_initial %}
+<p class="file-upload w-100 mb-1">{{ widget.initial_text }}{% trans ":" %} <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %}
+&nbsp; <span class="clearable-file-input">
+<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}">
+<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label></span>{% endif %}
+</p>
+<p class="w-100 m-0">{{ widget.input_text }}{% trans ":" %}</p>{% endif %}
+<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>