{% load filesfolders_tags %}

<label for="sodar-ff-flag-group">{{ form.flag.label }}</label>
<div class="form-group" id="sodar-ff-flag-group">
  {% for k, v in form.fields.flag.choices %}
    <label for="sodar-ff-flag-select" class="sodar-horizontal-radio">
      <input id="sodar-ff-flag-select"
             type="radio" value="{{ k }}" name="flag"
             class="radio-inline" {% get_flag_status form.flag.value k %}>
        {% if k %}
          {{ v }}
        {% else %}
          None
        {% endif %}
        {% if k %}
          {% get_flag k False as flag_icon %}
          {{ flag_icon | safe }}
        {% endif %}
    </label>
  {% endfor %}
  <br /><small id="hint_id_flag" class="text-muted">{{ form.flag.help_text }}</small>
</div>
