mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
move add new folder and move to folder into one dialog box
this lets us combine the two actions to create "Move to a new folder". If the user hits enter rather than clicking a button, there is a hidden submit button that (for now) prevents them from taking any action. A future commit will try and understand what the user might be doing based on which fields are populated/selected.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% if templates_and_folders_form.move_to.choices and template_list.templates_to_show %}
|
||||
<button type="submit" name="operation" value="unknown" hidden></button>
|
||||
{{ radios(templates_and_folders_form.move_to) }}
|
||||
{{ page_footer('Move selected', button_name='operation', button_value='move') }}
|
||||
{{ page_footer('Move', button_name='operation', button_value='move_to_existing_folder') }}
|
||||
{{ textbox(templates_and_folders_form.new_folder_name) }}
|
||||
{{ page_footer('Move to a new folder', button_name='operation', button_value='move_to_new_folder') }}
|
||||
{{ page_footer('New folder', button_name='operation', button_value='add_new_folder') }}
|
||||
{% endif %}
|
||||
|
||||
@@ -85,11 +85,6 @@
|
||||
{% endwith %}
|
||||
{% endcall %}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ textbox(add_folder_form.name) }}
|
||||
{{ page_footer('New folder', button_name='operation', button_value='add_new_folder') }}
|
||||
{% endcall %}
|
||||
|
||||
{% else %}
|
||||
{% include 'views/templates/_template_list.html' %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user