{% load i18n ui help %}{% 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), help (a help topic id, shown under the hint as an explanation that opens in place, #81). 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 %} {% if help %}{% help_topic help %}{% 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 %} {% if help %}{% help_topic help %}{% endif %}
{% else %}
{% if field.help_text %}

{{ field.help_text }}

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