{% load i18n %} {% load mtp_common %} {% comment %} USAGE: {% include 'mtp_common/forms/radio-field.html' with field= only %} optional parameters: input_classes - classes to add to the input element label_classes - classes to add to the fieldset legend element value - input element value override instead of default filtered field value (ignored if None) choices_help_text - list of hints added to choices inline - whether options should show in one row small - whether smaller circles should be used TODO: the widget is not currently configurable {% endcomment %}
{{ field.label }} {% include 'mtp_common/forms/field-help-text.html' with field=field only %} {% include 'mtp_common/forms/field-errors.html' with field=field only %}
{% with initial=value|default:field.value|default:field.field.initial %} {% choices_with_help_text field.field.choices choices_help_text as choices %} {% for choice, label, help_text in choices %} {% with choice_slug=choice|slugify %}
{% if help_text %}
{{ help_text }}
{% endif %}
{% endwith %} {% endfor %} {% endwith %}