{% extends 'oscar/partials/form_field.html' %}

{% load widget_tweaks %}

{% block widget %}
    {% if field.widget_type == 'checkbox' %}
        <label for="{{ field.auto_id }}" class="checkbox {% if field.field.required %}required{% endif %}">
            {% render_field field %}
            {{ field.label|safe }}
        </label>
    {% elif field.widget_type == 'radioselect' %}
        <label for="{{ field.auto_id }}" class="controls {% if field.field.required %}required{% endif %}">
            {% render_field field %}
        </label>
    {% else %}
        {% render_field field class+="form-control" %}
    {% endif %}
{% endblock %}