mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 16:28:25 -04:00
Show form elements for templates and folders
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.
This commit is contained in:
@@ -4,12 +4,7 @@
|
||||
width='2-3'
|
||||
) %}
|
||||
<div class="multiple-choice">
|
||||
<input
|
||||
id="{{ field.id }}" name="{{ field.name }}" type="checkbox" value="y"
|
||||
{% if field.data %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
{{ checkbox_input(field.id, field.name, field.data) }}
|
||||
<label for="{{ field.id }}">
|
||||
{{ field.label.text }}
|
||||
{% if hint %}
|
||||
@@ -22,6 +17,22 @@
|
||||
{% 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
|
||||
|
||||
Reference in New Issue
Block a user