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:
Chris Hill-Scott
2018-11-08 11:56:29 +00:00
parent 921de47164
commit 2743216519
10 changed files with 215 additions and 31 deletions

View File

@@ -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