mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-26 13:20:54 -05:00
Redirect to individual template page after adding
When you add a new template the next thing you want to do is probably: - send a test - edit it after seeing what it looks like So let’s redirect you straight to the page where you can do these things. This is especially important for letters where we want to tighten the edit/feedback loop.
This commit is contained in:
@@ -202,7 +202,7 @@ def add_service_template(service_id, template_type):
|
||||
if form.process_type.data == 'priority':
|
||||
abort_403_if_not_admin_user()
|
||||
try:
|
||||
service_api_client.create_service_template(
|
||||
new_template = service_api_client.create_service_template(
|
||||
form.name.data,
|
||||
template_type,
|
||||
form.template_content.data,
|
||||
@@ -221,7 +221,7 @@ def add_service_template(service_id, template_type):
|
||||
raise e
|
||||
else:
|
||||
return redirect(
|
||||
url_for('.choose_template', service_id=service_id)
|
||||
url_for('.view_template', service_id=service_id, template_id=new_template['data']['id'])
|
||||
)
|
||||
|
||||
return render_template(
|
||||
|
||||
Reference in New Issue
Block a user