{% load l10n material_form material_form_internal %}
{% part bound_field.field %}
  <div class="row radio-field agreement-widget">
    <div class="col s12">
      {% part field prefix %}{% endpart %}
      {% part field label %}
        <label for="{{ bound_field.id_for_label }}"
               class="{% part field add_label_class %}{{ form_label_class }}{% endpart %} agreement-top-label">
          {{ bound_field.label }}
        </label>
      {% endpart %}
    </div>
    <div
        {% attrs bound_field 'group' %}
          id="id_{{ bound_field.html_name }}_container"
          class="col s12 radio-container {% if field.required %} required{% endif %}{% if bound_field.errors %} has-error{% endif %}"
        {% endattrs %}>
      <div class="range-icon">
        <i class="material-icons left green-text">add_circle</i>
      </div>
      {% part field control %}
        {% for group, items in bound_field|select_options %}
          {% for choice, value, selected in items %}
            <div class="radio" id="id_{{ bound_field.html_name }}">
              <label>
                <input{% attrs bound_field 'widget' default field.widget.attrs %}
                  id="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}"
                  name="{{ bound_field.html_name }}"
                  type="radio"
                  class="with-gap{% if bound_field.errors %} invalid{% endif %}"
                  value="{{ value|unlocalize }}"
                  {% if field.disabled %}disabled{% endif %}
                  {% if selected %}checked{% endif %}
                {% endattrs %}/>
                <span{% attrs bound_field 'label' %}
                  for="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}"
                  class="item-label"
                {% endattrs %}></span>
              </label>
              <div class="center">
                {{ choice }}
              </div>
            </div>
          {% endfor %}
        {% endfor %}
      {% endpart %}
      <div class="range-icon">
        <i class="material-icons right red-text">remove_circle</i>
      </div>
    </div>
    {% part field help_text %}
      {% if field.help_text %}
        <div class="help-block">{{ bound_field.help_text|safe }}</div>
      {% endif %}
      {% part field errors %}
        {% if bound_field.errors %}
          {% include  'material/field_errors.html' %}
        {% endif %}
      {% endpart %}
    {% endpart %}
    {{ hidden_initial }}
  </div>{% endpart %}