Files
notifications-admin/app/templates/components/radios.html
Chris Hill-Scott 7fcd56dc02 Add radio buttons for choosing the API key type
Best-guess wording for what the labels and question should be.

Adds a macro for rendering radio buttons from a WTForms field.
2016-07-06 10:12:20 +01:00

24 lines
564 B
HTML

{% macro radios(
field,
hint=None
) %}
<div class="form-group {% if field.errors %} error{% endif %}">
<fieldset>
<legend class="form-label">
{{ field.label }}
{% if field.errors %}
<span class="error-message">
{{ field.errors[0] }}
</span>
{% endif %}
</legend>
{% for option in field %}
<label class="block-label" for="{{ option.id }}">
{{ option }}
{{ option.label.text }}
</label>
{% endfor %}
</fieldset>
</div>
{% endmacro %}