diff --git a/app/templates/components/radios.html b/app/templates/components/radios.html index 3d62bdfa1..00be13302 100644 --- a/app/templates/components/radios.html +++ b/app/templates/components/radios.html @@ -5,9 +5,19 @@ 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 radios_wrapper(field, hint=None, disable=[], option_hints={}, hide_legend=False) %}
- + {% if hide_legend %}{% endif %} {{ field.label.text|safe }} {% if hide_legend %}{% endif %} @@ -17,14 +27,11 @@ {% endif %} - {% for option in field %} - {{ radio(option, disable, option_hints) }} - {% endfor %} + {{ caller() }}
{% endmacro %} - {% macro radio(option, disable=[], option_hints={}) %}