Remove branding_type from set_email_branding page

Includes updates to the controller so
branding_type is got from the email_branding model
instead of from user input.

Follows on from:

https://github.com/alphagov/notifications-admin/pull/2249
This commit is contained in:
Tom Byers
2018-08-29 11:36:50 +01:00
parent f6c3a8f817
commit 0df88ea182
5 changed files with 11 additions and 40 deletions

View File

@@ -682,23 +682,6 @@ class ServiceSwitchLettersForm(StripWhitespaceForm):
class ServiceSetBranding(StripWhitespaceForm):
def __init__(self, email_branding=[], *args, **kwargs):
self.branding_style.choices = email_branding
super(ServiceSetBranding, self).__init__(*args, **kwargs)
branding_type = RadioField(
'Branding type',
choices=[
('govuk', 'GOV.UK only'),
('both', 'GOV.UK and branding'),
('org', 'Branding only'),
('org_banner', 'Branding banner')
],
validators=[
DataRequired()
]
)
branding_style = RadioField(
'Branding style',
validators=[
@@ -709,7 +692,6 @@ class ServiceSetBranding(StripWhitespaceForm):
class ServicePreviewBranding(StripWhitespaceForm):
branding_type = HiddenField('branding_type')
branding_style = HiddenField('branding_style')