Display the template folders nested on the move template/folder form

Before, all the folders were displayed in a list which was ordered but
not nested. This changes the move form to nest the template folders.
This commit is contained in:
Tom Byers
2018-12-18 14:40:53 +00:00
committed by Katie Smith
parent 36656fd6ba
commit 3c4a186a25
5 changed files with 86 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
{% from "components/radios.html" import radios %}
{% from "components/radios.html" import radios, radios_nested %}
{% from "components/page-footer.html" import page_footer %}
<div id="sticky_template_forms" class="js-stick-at-bottom-when-scrolling">
@@ -6,7 +6,7 @@
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
{% if templates_and_folders_form.move_to.choices and template_list.templates_to_show %}
<div id="move_to_folder_radios">
{{ radios(templates_and_folders_form.move_to) }}
{{ radios_nested(templates_and_folders_form.move_to, move_to_children, current_option) }}
{{ page_footer('Move', button_name='operation', button_value='move-to-existing-folder') }}
</div>
<div id="move_to_new_folder_form">