{% load i18n %} {% load form_tags %} {% if form.is_bound and not form.is_valid %}
{% trans "Oops! We found some errors" %} - {% trans "please check the error messages below and try again" %}
{% endif %} {% if form.non_field_errors %} {% for error in form.non_field_errors %}
{{ error }}
{% endfor %} {% endif %} {% for field in form.hidden_fields %} {{ field }} {% endfor %} {% for field in form.visible_fields %} {% comment %} Make the field widget type available to templates so we can mark-up checkboxes differently to other widgets. {% endcomment %} {% annotate_form_field field %} {% comment %} We use a separate template for each field so that forms can be rendered field-by-field easily #} {% endcomment %} {% if field.widget_type == 'CheckboxInput' %} {% include 'partials/form_field_checkbox.html' with field=field %} {% else %} {% include 'partials/form_field.html' with field=field %} {% endif %} {% endfor %}