components/forms/_choice/choice.html (22 lines of code) (raw):
{# @choice
#
# parameters:
# type - string, ['checkbox', 'radio']
# id - string
# name - string
# value - string
# label - string
# legal - boolean
# error - boolean
# required - boolean
# checked - boolean
# disabled - boolean
# msg - string
# info - string
#}
<div class="mzp-c-choice{% if error %} mzp-is-error{% endif %}">
<input class="mzp-c-choice-control" type="{{ type }}" name="{{ name }}" id="{{ id }}" value="{{ value }}" {% if checked %}checked{% endif %} {% if required %}required aria-required="true"{% endif %} {% if msg %} aria-describedby="{{ id }}-msg"{% endif %} {% if disabled %}disabled{% endif %}>
<label class="mzp-c-choice-label{% if legal %} mzp-t-sm{% endif %}" for="{{ id }}">{{ label }}</label>
{%- if msg -%}<div class="mzp-c-choice-msg" id="{{ id }}-msg" role="tooltip">{{ msg }}</div>{%- endif -%}
{%- if info -%}<p class="mzp-c-choice-info">{{ info }}</p>{%- endif -%}
</div>