{% load form_helpers %}
{% if field|is_checkbox %} {% with is_vertical=1 %} {% include 'horizon/common/fields/_themable_checkbox.html' %} {% endwith %} {% else %} {{ field|add_bootstrap_class }} {% endif %} {% for error in field.errors %} {{ error }} {% empty %} {% comment %} Escape help_text a second time here, to avoid an XSS issue in bootstrap.js. This can most likely be removed once we upgrade bootstrap.js past 2.0.2. Note: the spaces are necessary here. {% endcomment %} {% if field.help_text %} {% filter force_escape %} {{ field.help_text }} {% endfilter %} {% endif %} {% endfor %}