{% load twitter_bootstrap %}

<div class="control-group{% if field.errors %} error{% endif %}">
    {% if field|is_checkbox %}
    <div class="controls">
        <label class="checkbox" for="{{ field.auto_id }}">
            {{ field }} {{ field.label }}
        </label>
    </div>
    {% else %}
    <label class="control-label" for="{{ field.auto_id }}">{{ field.label }}</label>
    <div class="controls">
        {% if field|is_radio %}
            {% for radio in field %}
                {{ radio }}
            {% endfor %}
        {% else %}
            {{ field }}
        {% endif %}

        {% for error in field.errors %}
            <span class="help-inline">{{ error }}</span>
        {% endfor %}

        {% if field.help_text %}
            <p class="help-block">{{ field.help_text|safe }}</p>
        {% endif %}
    </div>
    {% endif %}
</div>

