2022-11-13 15:14:38 -08:00
|
|
|
<div class="field">
|
2022-11-17 16:43:00 -08:00
|
|
|
<div class="label-input">
|
|
|
|
<label for="{{ field.id_for_label }}">
|
|
|
|
{{ field.label }}
|
|
|
|
{% if field.field.required %}<small>(Required)</small>{% endif %}
|
|
|
|
</label>
|
|
|
|
{% if field.help_text %}
|
|
|
|
<p class="help">
|
2022-12-05 18:21:00 -08:00
|
|
|
{{ field.help_text|safe|linebreaksbr }}
|
2022-11-17 16:43:00 -08:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
{{ field.errors }}
|
2023-01-10 19:31:50 -08:00
|
|
|
{% if field.field.widget.input_type == "file" and field.value and not hide_existing %}
|
2023-01-09 08:58:17 -08:00
|
|
|
<div class="clear">
|
|
|
|
<input type="checkbox" class="clear" name="{{ field.name }}__clear"> Clear current value</input>
|
|
|
|
</div>
|
2022-11-17 18:21:00 -08:00
|
|
|
{% endif %}
|
2022-11-17 16:43:00 -08:00
|
|
|
{{ field }}
|
|
|
|
</div>
|
2023-01-10 19:31:50 -08:00
|
|
|
{% if field.field.widget.input_type == "file" and field.value and not hide_existing %}
|
2022-11-17 18:21:00 -08:00
|
|
|
<img class="preview" src="{{ field.value }}">
|
2022-11-13 15:14:38 -08:00
|
|
|
{% endif %}
|
|
|
|
</div>
|