{% spaceless %}{% load rijkshuisstijl rijkshuisstijl_utils %} {% capture as base_attrs %} {% if name %} name="{{ name }}"{% endif %}{% endcapture %} {% capture as optional_attrs %}{% if choice.value == value or choice.value in value or checked %} checked{% endif %}{% if choice %} value="{{ choice.value }}"{% endif %}{% endcapture %} {% capture as valdation_atrs %}{% if disabled %} disabled{% endif %}{% if readonly%} readonly{% endif %}{% if required %} required{% endif %}{% endcapture %} {% capture as html_id %}{% if id and choice %}{{ id|add:'_'|add:choice.value|slugify }}{% elif id %}{{ id }}{% elif choice %}{% endif %}{% endcapture %} {% capture as meta_atrs %}{% if html_id %} id="{{ html_id }}"{% endif %}{% endcapture %} {% capture as additional_attrs %}{% for attr, value in widget_attrs.items %} {{ attr }}="{{ value }}"{% endfor %}{% endcapture %}
{% if choice %}{% include './label.html' with for=id label=choice.display %}{% endif %}
{% endspaceless %}