<div class="non-field-errors">
	{% if form.non_field_errors %}
		<ul class="errors">
			{% for error in form.non_field_errors %}
				<li>{{ error }}</li>
			{% endfor %}
		</ul>
	{% endif %}
</div>

{% for hidden in form.hidden_fields %}
	{{ hidden }}
{% endfor %}

{% for field in form.visible_fields %}
	<div{% if field.auto_id %} id="{{ field.auto_id }}-form-row"{% endif %} class="form-row{% if field.errors %} has-errors{% endif %}{% if field.field.required %} required{% endif %}">
		<label for="{{ field.auto_id }}" class="field-label">
			{{ field.label|safe }}:
		</label>
		<span class="form-control">
			{{ field }}
		</span>
		{% if field.help_text %}<p class="help">{{ field.field.help_text|safe }}</p>{% endif %}
		<div class="field-errors" id="{{ field.auto_id }}_errors">
			{% if field.errors %}
				<ul class="errors">
					{% for error in field.errors %}
						<li>{{ error }}</li>
					{% endfor %}
				</ul>
			{% endif %}
		</div>
	</div>
{% endfor %}
