mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
split out new folder into two separate forms
move_to_new_folder and add_new_folder are now two separate html fields and form items - so that we can more easily manipulate them on the front end
This commit is contained in:
@@ -118,7 +118,9 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
|
||||
current_folder_id=template_folder_id,
|
||||
)
|
||||
|
||||
if request.method == 'POST' and can_manage_folders() and templates_and_folders_form.validate_on_submit():
|
||||
if request.method == 'POST' and templates_and_folders_form.validate_on_submit():
|
||||
if not can_manage_folders():
|
||||
abort(403)
|
||||
return process_folder_management_form(templates_and_folders_form, template_folder_id)
|
||||
|
||||
return render_template(
|
||||
@@ -145,7 +147,7 @@ def process_folder_management_form(form, current_folder_id):
|
||||
if form.is_add_op:
|
||||
new_folder_id = template_folder_api_client.create_template_folder(
|
||||
current_service.id,
|
||||
name=form.new_folder_name.data,
|
||||
name=form.get_folder_name(),
|
||||
parent_id=current_folder_id
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user