{% load bootstrap_toolkit %}

{% if form.non_field_errors %}
    {% include "bootstrap_toolkit/non_field_errors.html" %}
{% endif %}

{% for field in form.hidden_fields %}
    {% for error in field.errors %}
        {% include "bootstrap_toolkit/non_field_error.html" %}
    {% endfor %}
{% endfor %}

{% for row in ifields %}
	<div class="row-fluid">
	{% for field in row %}
		<div class="span{{ colspan }}">
	    {% if not field.name|lower in exclude|lower|split:',' %}
	        {% if not fields or field.name|lower in fields|lower|split:',' %}
	            {% include "bootstrap_toolkit/field.html" %}
	        {% endif %}
	    {% endif %}
		</div>
	{% endfor %}
	</div>
{% endfor %}
