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.
This commit is contained in:
Tom Byers
2018-08-09 15:50:07 +01:00
parent f2c3e0fdee
commit eb64033ff3
3 changed files with 5 additions and 3 deletions

View File

@@ -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
)

View File

@@ -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)

View File

@@ -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 @@
<div class="grid-row">
<div class="column-three-quarters">
<form method="post">
{{ branding_radios(form.email_branding, branding_dict=branding_dict, show_header=False) }}
{{ radios(form.email_branding) }}
{{ page_footer(
'Next'
) }}