{% load i18n ui %}{% comment %} A form field with its label, hint and inline errors. Parameters: field (a bound field), unit (shown after a text or number input, e.g. "mm"), narrow (a short input). A field has no help link of its own: its section's ⓘ opens the help ({% section_help %}, #177), and the hint (the field's help_text) is kept short, for values that need one. Django gives the widget aria-describedby (_helptext, _error) and aria-invalid, so the hint and error ids below must keep those names. Radio groups render as a fieldset. {% endcomment %} {% with kind=field.widget_type %} {% if field.use_fieldset %}
{{ field.label }}{% if field.field.required %} {% endif %} {% if field.help_text %}

{{ field.help_text }}

{% endif %} {% include "components/field_errors.html" %} {% for choice in field %}{% endfor %}
{% elif kind == "checkbox" %}
{% include "components/field_errors.html" %} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% else %}
{% if field.help_text %}

{{ field.help_text }}

{% endif %} {% include "components/field_errors.html" %} {% if unit %}
{{ field }}{{ unit }}
{% else %}{{ field }}{% endif %}
{% endif %} {% endwith %}