{% load crispy_forms_filters %}
{% load l10n %}

<div class="controls {{ field_class }}"{% if flat_attrs %} {{ flat_attrs }}{% endif %}>
    {% include 'bootstrap3/layout/field_errors_block.html' %}

    {% for group, options, index in field|optgroups %}
    {% if group %}<strong>{{ group }}</strong>{% endif %}
    {% for option in options %}

      {% if not inline_class %}<div class="radio">{% endif %}
        <label for="{{ option.attrs.id }}" class="{% if inline_class %}radio-{{ inline_class }}{% endif %}">
            <input type="radio" name="{{ field.html_name }}" value="{{ option.value|unlocalize }}" {% include "bootstrap3/layout/attrs.html" with widget=option %}>
            {{ option.label|unlocalize }}
        </label>
      {% if not inline_class %}</div>{% endif %}
    {% endfor %}
    {% endfor %} 

    {% include 'bootstrap3/layout/help_text.html' %}
</div>
