{% load widget_tweaks %} {% if field.is_hidden %} {{ field }} {% else %} {% comment %} Make the field widget type available to templates so we can mark-up checkboxes differently to other widgets. {% endcomment %} {% block control_group %} {% if not layout %}
{% endif %} {% block controls %}
{% block widget %} {# checkbox or radio #} {% if style == 'vertical' %} {% include "arctic/partials/form_field_parts/form_field_default.html" %} {% elif style == 'horizontal' %} {% include "arctic/partials/form_field_parts/form_field_horizontal.html" %} {% else %} {# deafault #} {% include "arctic/partials/form_field_parts/form_field_default.html" %} {% endif %} {% endblock %} {% block errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endblock %} {% block help_text %} {% if field.help_text %}
{# We allow HTML within form help fields #} {{ field.help_text|safe }}
{% endif %} {% endblock %}
{% endblock %} {% if not layout %}
{% endif %} {% endblock %} {% endif %}