djLint/tests/source_django/clearable_file_input.html
2021-12-14 09:57:37 +01:00

16 lines
616 B
HTML

{% if widget.is_initial %}
{{ widget.initial_text }}:
<a href="{{ widget.value.url }}">{{ widget.value }}</a>
{% if not widget.required %}
<input type="checkbox"
name="{{ widget.checkbox_name }}"
id="{{ widget.checkbox_id }}"
{% if widget.attrs.disabled %}disabled{% endif %}>
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
{% endif %}
<br>
{{ widget.input_text }}:
{% endif %}
<input type="{{ widget.type }}"
name="{{ widget.name }}"
{% include "django/forms/widgets/attrs.html" %}>