mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Add brand type to email branding.
Removed banner_colour and single_id_colour. We only really need one colour now.
This commit is contained in:
@@ -51,7 +51,13 @@ def email_branding():
|
||||
def update_email_branding(branding_id, logo=None):
|
||||
email_branding = email_branding_client.get_email_branding(branding_id)['email_branding']
|
||||
|
||||
form = ServiceUpdateEmailBranding()
|
||||
form = ServiceUpdateEmailBranding(
|
||||
name=email_branding['name'],
|
||||
text=email_branding['text'],
|
||||
colour=email_branding['colour'],
|
||||
domain=email_branding['domain'],
|
||||
brand_type=email_branding['brand_type']
|
||||
)
|
||||
|
||||
logo = logo if logo else email_branding.get('logo') if email_branding else None
|
||||
|
||||
@@ -80,20 +86,12 @@ def update_email_branding(branding_id, logo=None):
|
||||
name=form.name.data,
|
||||
text=form.text.data,
|
||||
colour=form.colour.data,
|
||||
banner_colour=form.banner_colour.data,
|
||||
single_id_colour=form.single_id_colour.data,
|
||||
domain=form.domain.data,
|
||||
brand_type=form.brand_type.data,
|
||||
)
|
||||
|
||||
return redirect(url_for('.email_branding', branding_id=branding_id))
|
||||
|
||||
form.name.data = email_branding['name']
|
||||
form.text.data = email_branding['text']
|
||||
form.colour.data = email_branding['colour']
|
||||
form.banner_colour.data = email_branding['banner_colour']
|
||||
form.single_id_colour.data = email_branding['single_id_colour']
|
||||
form.domain.data = email_branding['domain']
|
||||
|
||||
return render_template(
|
||||
'views/email-branding/manage-branding.html',
|
||||
form=form,
|
||||
@@ -134,9 +132,8 @@ def create_email_branding(logo=None):
|
||||
name=form.name.data,
|
||||
text=form.text.data,
|
||||
colour=form.colour.data,
|
||||
banner_colour=form.banner_colour.data,
|
||||
single_id_colour=form.single_id_colour.data,
|
||||
domain=form.domain.data
|
||||
domain=form.domain.data,
|
||||
brand_type=form.brand_type.data,
|
||||
)
|
||||
|
||||
return redirect(url_for('.email_branding'))
|
||||
|
||||
Reference in New Issue
Block a user