Add form to let users switch basic view on and off

This commit adds radio buttons to the ‘basic view’ page. This will let
users choose whether basic view is on or off for their service.

As before, this page will only be linked to if a service already has
basic view, so this commit does not launch the new feature.
This commit is contained in:
Chris Hill-Scott
2018-07-10 10:01:40 +01:00
parent a6662b3f59
commit 4d3a4ef9af
4 changed files with 76 additions and 4 deletions

View File

@@ -677,6 +677,20 @@ class ServiceSwitchLettersForm(StripWhitespaceForm):
)
class ServiceBasicViewForm(StripWhitespaceForm):
def __init__(self, enabled):
super().__init__(enabled='on' if enabled else 'off')
enabled = RadioField(
'Basic view',
choices=[
('on', 'On'),
('off', 'Off'),
],
)
class ServiceSetBranding(StripWhitespaceForm):
def __init__(self, email_branding=[], *args, **kwargs):