mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -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 $paneWrapper = $('<div class="column-full"></div>');
|
||||||
const $form = $('form');
|
const $form = $('form');
|
||||||
const $previewPane = $('<iframe src="/_email?' +
|
const $previewPane = $('<iframe src="/_email?' +
|
||||||
buildQueryString(['branding_style', branding_style]) +
|
buildQueryString(['branding_style', branding_style]) +
|
||||||
'" class="email-branding-preview"></iframe>');
|
'" class="email-branding-preview"></iframe>');
|
||||||
|
|
||||||
|
|||||||
@@ -80,17 +80,20 @@ def design_content():
|
|||||||
|
|
||||||
@main.route('/_email')
|
@main.route('/_email')
|
||||||
def email_template():
|
def email_template():
|
||||||
branding_type = request.args.get('branding_type', 'govuk')
|
branding_type = 'govuk'
|
||||||
branding_style = request.args.get('branding_style', 'None')
|
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_name = None
|
||||||
brand_colour = None
|
brand_colour = None
|
||||||
brand_logo = None
|
brand_logo = None
|
||||||
govuk_banner = True
|
govuk_banner = True
|
||||||
brand_banner = False
|
brand_banner = False
|
||||||
else:
|
else:
|
||||||
email_branding = email_branding_client.get_email_branding(branding_style)['email_branding']
|
|
||||||
colour = email_branding['colour']
|
colour = email_branding['colour']
|
||||||
brand_name = email_branding['text']
|
brand_name = email_branding['text']
|
||||||
brand_colour = colour
|
brand_colour = colour
|
||||||
|
|||||||
Reference in New Issue
Block a user