mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-28 11:49:13 -04:00
Go back to template if coming from template
Most users don’t have multiple contact blocks. So by default it should feel like you’re just editing the one contact block, rather than managing a collection of them. So this page skips the ‘choose’ page when the user doesn’t yet have any contact blocks.
This commit is contained in:
@@ -713,7 +713,7 @@ def service_add_letter_contact(service_id):
|
||||
)
|
||||
if request.args.get('from_template'):
|
||||
return redirect(
|
||||
url_for('.set_template_sender', service_id=service_id, template_id=request.args.get('from_template'))
|
||||
url_for('.view_template', service_id=service_id, template_id=request.args.get('from_template'))
|
||||
)
|
||||
return redirect(url_for('.service_letter_contact_details', service_id=service_id))
|
||||
return render_template(
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
{{ page_header(
|
||||
'Add a new address',
|
||||
back_link=None if request.args.get('from_template') else url_for('.service_letter_contact_details', service_id=current_service.id)
|
||||
back_link=url_for('main.view_template', template_id=request.args.get('from_template'), service_id=current_service.id) if request.args.get('from_template') else url_for('.service_letter_contact_details', service_id=current_service.id)
|
||||
) }}
|
||||
<div class="grid-row">
|
||||
<div class="column-whole">
|
||||
|
||||
Reference in New Issue
Block a user