mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-14 15:34:20 -05:00
This commit adds: - checkboxes to let you select a template or folder - radio buttons to let you select where to move those template(s) and/or folder(s) to It only does the `get` part of this work; handling the `post` and calling API will be done in a subsequent commit.
49 lines
1001 B
HTML
49 lines
1001 B
HTML
{% macro checkbox(
|
|
field,
|
|
hint=False,
|
|
width='2-3'
|
|
) %}
|
|
<div class="multiple-choice">
|
|
{{ checkbox_input(field.id, field.name, field.data) }}
|
|
<label for="{{ field.id }}">
|
|
{{ field.label.text }}
|
|
{% if hint %}
|
|
<div class="hint">
|
|
{{ hint }}
|
|
</div>
|
|
{% endif %}
|
|
</label>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
|
|
{% macro checkbox_input(id, name, data=None, value="y") %}
|
|
<input
|
|
id="{{ id }}" name="{{ name }}" type="checkbox" value="{{ value }}"
|
|
{% if data %}
|
|
checked
|
|
{% endif %}
|
|
>
|
|
{% endmacro %}
|
|
|
|
{% macro unlabelled_checkbox(id, name, data=None, value="y") %}
|
|
<div class="multiple-choice">
|
|
{{ checkbox_input(id, name, data, value) }}
|
|
<label></label>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro checkbox_group(
|
|
legend,
|
|
fields
|
|
) %}
|
|
<fieldset class="form-group">
|
|
<legend class="form-label">
|
|
{{ legend }}
|
|
</legend>
|
|
{% for field in fields %}
|
|
{{ checkbox(field) }}
|
|
{% endfor %}
|
|
</fieldset>
|
|
{% endmacro %}
|