diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-03-24 10:31:52 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:50 +0200 |
commit | 0fb2540a3359a38a2df7db05b76f6238e0d5ae35 (patch) | |
tree | 74f205d9d8e4c22e479fba867e8983879d477a51 /ishtar_common/templates | |
parent | cec6d7b3112b95ea2c10848f824d48a3e8cce035 (diff) | |
download | Ishtar-0fb2540a3359a38a2df7db05b76f6238e0d5ae35.tar.bz2 Ishtar-0fb2540a3359a38a2df7db05b76f6238e0d5ae35.zip |
Improve file widget with bootstrap
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r-- | ishtar_common/templates/widgets/clearable_file_input.html | 8 |
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 %} + <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" %}> |