mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Fix the EmailBranding
This commit is contained in:
@@ -30,7 +30,6 @@ def email_branding():
|
||||
form = ServiceSelectEmailBranding()
|
||||
email_brandings = get_branding_as_value_and_label(brandings)
|
||||
form.email_branding.choices = email_brandings + [('None', 'Create a new email branding')]
|
||||
|
||||
if form.validate_on_submit():
|
||||
if form.email_branding.data != 'None':
|
||||
return redirect(url_for('.update_email_branding', branding_id=form.email_branding.data))
|
||||
@@ -107,7 +106,6 @@ def update_email_branding(branding_id, logo=None):
|
||||
@user_is_platform_admin
|
||||
def create_email_branding(logo=None):
|
||||
form = ServiceUpdateEmailBranding()
|
||||
|
||||
if form.validate_on_submit():
|
||||
if form.file.data:
|
||||
upload_filename = upload_logo(
|
||||
|
||||
@@ -78,13 +78,6 @@ def design_content():
|
||||
return render_template('views/design-patterns-content-guidance.html')
|
||||
|
||||
|
||||
def _set_colour(branding_style, email_branding):
|
||||
if branding_style in ['both', 'org']:
|
||||
return email_branding['single_id_colour'] or email_branding['colour']
|
||||
elif branding_style == 'org_banner':
|
||||
return email_branding['banner_colour'] or email_branding['colour']
|
||||
|
||||
|
||||
@main.route('/_email')
|
||||
def email_template():
|
||||
branding_type = request.args.get('branding_type', 'govuk')
|
||||
@@ -98,7 +91,7 @@ def email_template():
|
||||
brand_banner = False
|
||||
else:
|
||||
email_branding = email_branding_client.get_email_branding(branding_style)['email_branding']
|
||||
colour = _set_colour(branding_type, email_branding)
|
||||
colour = email_branding['colour']
|
||||
brand_name = email_branding['text']
|
||||
brand_colour = colour
|
||||
brand_logo = 'https://{}/{}'.format(get_cdn_domain(), email_branding['logo'])
|
||||
|
||||
Reference in New Issue
Block a user