mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Redirect to template after succesful branding request
if user entered branding request flow from a template.
This commit is contained in:
@@ -1032,8 +1032,8 @@ def link_service_to_organisation(service_id):
|
||||
@main.route("/services/<uuid:service_id>/branding-request/<branding_type>", methods=['GET', 'POST'])
|
||||
@user_has_permissions('manage_service')
|
||||
def branding_request(service_id, branding_type):
|
||||
|
||||
form = BrandingOptions(current_service, branding_type=branding_type)
|
||||
from_template = request.args.get('from_template')
|
||||
if branding_type == "email":
|
||||
branding_name = current_service.email_branding_name
|
||||
elif branding_type == "letter":
|
||||
@@ -1065,19 +1065,20 @@ def branding_request(service_id, branding_type):
|
||||
user_name=current_user.name,
|
||||
tags=['notify_action', 'notify_branding'],
|
||||
)
|
||||
|
||||
flash((
|
||||
'Thanks for your branding request. We’ll get back to you '
|
||||
'within one working day.'
|
||||
), 'default')
|
||||
return redirect(url_for('.service_settings', service_id=service_id))
|
||||
return redirect(url_for(
|
||||
'.view_template', service_id=current_service.id, template_id=from_template
|
||||
) if from_template else url_for('.service_settings', service_id=current_service.id))
|
||||
|
||||
return render_template(
|
||||
'views/service-settings/branding/branding-options.html',
|
||||
form=form,
|
||||
branding_type=branding_type,
|
||||
branding_name=branding_name,
|
||||
from_template=request.args.get('from_template')
|
||||
from_template=from_template
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user