From eb64033ff3b30ac86def4f4ea19862b542d18265 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Thu, 9 Aug 2018 15:50:07 +0100 Subject: [PATCH] Update selection radios before edit/create new They were already using the 'name' field in their label but we don't want any other part of the branding to appear now. --- app/main/views/email_branding.py | 1 + app/notify_client/email_branding_client.py | 3 ++- app/templates/views/email-branding/select-branding.html | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/main/views/email_branding.py b/app/main/views/email_branding.py index f9b72c493..11e8d18f7 100644 --- a/app/main/views/email_branding.py +++ b/app/main/views/email_branding.py @@ -124,6 +124,7 @@ def create_email_branding(logo=None): email_branding_client.create_email_branding( logo=logo, name=form.name.data, + text=form.text.data, colour=form.colour.data ) diff --git a/app/notify_client/email_branding_client.py b/app/notify_client/email_branding_client.py index cadafecc5..37651761c 100644 --- a/app/notify_client/email_branding_client.py +++ b/app/notify_client/email_branding_client.py @@ -15,10 +15,11 @@ class EmailBrandingClient(NotifyAdminAPIClient): def get_letter_email_branding(self): return self.get(url='/dvla_organisations') - def create_email_branding(self, logo, name, colour): + def create_email_branding(self, logo, name, text, colour): data = { "logo": logo, "name": name, + "text": text, "colour": colour } return self.post(url="/email-branding", data=data) diff --git a/app/templates/views/email-branding/select-branding.html b/app/templates/views/email-branding/select-branding.html index 732adee43..b5a2bc12f 100644 --- a/app/templates/views/email-branding/select-branding.html +++ b/app/templates/views/email-branding/select-branding.html @@ -1,5 +1,5 @@ {% extends "views/platform-admin/_base_template.html" %} -{% from "components/radios.html" import radios, branding_radios %} +{% from "components/radios.html" import radios %} {% from "components/page-footer.html" import page_footer %} {% block service_page_title %} @@ -15,7 +15,7 @@
- {{ branding_radios(form.email_branding, branding_dict=branding_dict, show_header=False) }} + {{ radios(form.email_branding) }} {{ page_footer( 'Next' ) }}