mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
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.
This commit is contained in:
23
app/templates/components/radios.html
Normal file
23
app/templates/components/radios.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user