<div class="form-group">
    {% if field.label %}
        <label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
    {% endif %}
    {% if field.style.inline %}
        <div>
        {% for key, text in field.choices.items %}
            <label class="radio-inline">
                <input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
                {{ text }}
            </label>
        {% endfor %}
        </div>
    {% else %}
        {% for key, text in field.choices.items %}
            <div class="radio">
                <label>
                    <input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
                    {{ text }}
                </label>
            </div>
        {% endfor %}
    {% endif %}
</div>
