mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 14:03:52 -04:00
Update email preview page
No longer requires the branding_type GET param. Retains the 'govuk' default brand.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
const $paneWrapper = $('<div class="column-full"></div>');
|
||||
const $form = $('form');
|
||||
const $previewPane = $('<iframe src="/_email?' +
|
||||
const $previewPane = $('<iframe src="/_email?' +
|
||||
buildQueryString(['branding_style', branding_style]) +
|
||||
'" class="email-branding-preview"></iframe>');
|
||||
|
||||
|
||||
@@ -80,17 +80,20 @@ def design_content():
|
||||
|
||||
@main.route('/_email')
|
||||
def email_template():
|
||||
branding_type = request.args.get('branding_type', 'govuk')
|
||||
branding_style = request.args.get('branding_style', 'None')
|
||||
branding_type = 'govuk'
|
||||
branding_style = request.args.get('branding_style', None)
|
||||
|
||||
if branding_type == 'govuk' or branding_style == 'None':
|
||||
if branding_style:
|
||||
email_branding = email_branding_client.get_email_branding(branding_style)['email_branding']
|
||||
branding_type = email_branding['brand_type']
|
||||
|
||||
if branding_type == 'govuk':
|
||||
brand_name = None
|
||||
brand_colour = None
|
||||
brand_logo = None
|
||||
govuk_banner = True
|
||||
brand_banner = False
|
||||
else:
|
||||
email_branding = email_branding_client.get_email_branding(branding_style)['email_branding']
|
||||
colour = email_branding['colour']
|
||||
brand_name = email_branding['text']
|
||||
brand_colour = colour
|
||||
|
||||
Reference in New Issue
Block a user