{% load misago_admin_form %}
{% if field|is_yesno_switch_field %}
  {% for option in field|get_options %}
    <label class="radio">
      <input {% render_attrs widget class_name="form-control" %} id="{{ option.attrs.id }}" name="{{ widget.name }}" type="radio"{% if option.value is not None %} value="{{ option.value }}"{% endif %}{% if option.selected %} checked{% endif %}>
      {{ option.label }}
    </label>
  {% endfor %}
{% else %}
  {% for option in field|get_options %}
    <div class="form-check">
      <input class_name="form-check-input" id="{{ option.attrs.id }}" name="{{ widget.name }}" type="radio"{% if option.value is not None %} value="{{ option.value }}"{% endif %}{% if option.selected %} checked{% endif %}>
      <label class="form-check-label" for="{{ option.attrs.id }}">
        {{ option.label }}
      </label>
    </div>
  {% endfor %}
{% endif %}