mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 19:04:33 -04:00
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:
@@ -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')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user