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

<div class="{% if inline_class %}form-check{% endif %}{% if field_class %} {{ field_class }}{% endif %}"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
    {% include 'bulma/layout/field_errors_block.html' %}

    {% for choice in field.field.choices %}
      {% if not inline_class %}<div class="field">{% endif %}
        <input
                type="radio"
                class="is-checkradio"
                {% if choice.0|stringformat:"s" == field.value|default_if_none:""|stringformat:"s" %}
                    checked="checked"
                {% endif %}
                name="{{ field.html_name }}"
                id="id_{{ field.id_for_label }}_{{ forloop.counter }}"
                value="{{ choice.0|unlocalize }}"
                {% if field.field.required %}
                    required=""
                {% endif %}
                {{ field.field.widget.attrs|flatatt }}>

        <label for="id_{{ field.id_for_label }}_{{ forloop.counter }}">
            {{ choice.1|unlocalize }}
        </label>
      {% if not inline_class %}</div>{% endif %}
    {% endfor %}

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