{% load twitter_bootstrap %}

<div class="form-group{% if field.errors %} error{% endif %}">
    {% if field|is_checkbox %}
    <div class="col-sm-offset-2 col-sm-10">
        <div class="checkbox">
            <label for="{{ field.auto_id }}">
                {{ field }} {{ field.label }}
            </label>
        </div>
    </div>
    {% else %}
    <label class="col-sm-2 control-label" for="{{ field.auto_id }}">{{ field.label }}</label>
    <div class="col-sm-10">
        {{ field|add_class:"form-control" }}

        {% 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>

