2016-03-01 11:23:03 -05:00
|
|
|
{% load form_helpers %}
|
|
|
|
|
|
|
|
<div class="form-group{% if field.errors %} has-error{% endif %}">
|
|
|
|
{% if field|widget_type == 'checkboxinput' %}
|
|
|
|
<div class="col-md-9 col-md-offset-3">
|
|
|
|
<div class="checkbox{% if field.errors %} has-error{% endif %}">
|
|
|
|
<label for="{{ field.id_for_label }}">
|
|
|
|
{{ field }}
|
|
|
|
{{ field.label }}
|
|
|
|
</label>
|
2016-03-04 14:19:33 -05:00
|
|
|
{% if field.help_text %}
|
|
|
|
<span class="help-block">{{ field.help_text|safe }}</span>
|
|
|
|
{% endif %}
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% elif field|widget_type == 'radioselect' %}
|
|
|
|
<div class="col-md-9 col-md-offset-3">
|
|
|
|
<div class="radio{% if field.errors %} has-error{% endif %}">
|
|
|
|
<label for="{{ field.id_for_label }}">
|
|
|
|
{{ field }}
|
|
|
|
{{ field.label }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% elif field|widget_type == 'textarea' %}
|
|
|
|
<div class="col-md-12">
|
|
|
|
{{ field }}
|
|
|
|
{% if field.help_text %}
|
|
|
|
<span class="help-block">{{ field.help_text|safe }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if field.errors %}
|
|
|
|
<ul>
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<li class="text-danger">{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<label class="col-md-3 control-label{% if field.field.required %} required{% endif %}" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
|
|
|
<div class="col-md-9">
|
|
|
|
{{ field }}
|
|
|
|
{% if field.help_text %}
|
|
|
|
<span class="help-block">{{ field.help_text|safe }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if field.errors %}
|
|
|
|
<ul>
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<li class="text-danger">{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|