{% macro radios( field, hint=None, disable=[], option_hints={}, hide_legend=False ) %} {% call radios_wrapper( field, hint, disable, option_hints, hide_legend ) %} {% for option in field %} {{ radio(option, disable, option_hints) }} {% endfor %} {% endcall %} {% endmacro %} {% macro radio_list( options, child_map, disable=[], option_hints={} ) %} {% endmacro %} {% macro radios_nested( field, child_map, hint=None, disable=[], option_hints={}, hide_legend=False ) %} {% call radios_wrapper( field, hint, disable, option_hints, hide_legend ) %}
{{ radio_list(child_map[None], child_map, disable, option_hints) }}
{% endcall %} {% endmacro %} {% macro radios_wrapper(field, hint=None, disable=[], option_hints={}, hide_legend=False) %}
{% if hide_legend %}{% endif %} {{ field.label.text|safe }} {% if hide_legend %}{% endif %} {% if hint %} {{ hint }} {% endif %} {% if field.errors %} {{ field.errors[0] }} {% endif %} {{ caller() }}
{% endmacro %} {% macro radio(option, disable=[], option_hints={}, data_target=None, as_list_item=False) %} {% if as_list_item %}
  • {% else %}
    {% endif %} {% if caller %} {{ caller() }} {% endif %} {% if as_list_item %}
  • {% else %} {% endif %} {% endmacro %} {% macro radio_select( field, hint=None, wrapping_class='form-group' ) %}
    {{ field.label.text }} {% if field.errors %} {{ field.errors[0] }} {% endif %}
    {% for option in field %}
    {{ option }}
    {% if loop.first %}
    {% endif %} {% endfor %}
    {% endmacro %} {% macro conditional_radio_panel(id) %}
    {{ caller() }}
    {% endmacro %}