lib.itmens/common/templates/_field.html
2023-10-22 17:46:34 -04:00

19 lines
571 B
HTML

<fieldset>
<label for="{{ field.id_for_label }}">
{{ field.label }}
{% if field.field.required %}<small>(Required)</small>{% endif %}
</label>
{{ field }}
{% if field.help_text %}
<small>
{{ field.help_text|safe|linebreaksbr }}
{% if field.field.required %}<small>(Required)</small>{% endif %}
</small>
{% endif %}
{{ field.errors }}
{% if field.field.widget.input_type == "file" and field.value %}
<img alt="{{ field.label }}"
style="max-height: 4em"
src="{{ field.value.url }}">
{% endif %}
</fieldset>