mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Add a page to set organisation and branding option
Platform admin only. Adds radio buttons to choose one of: - three hard-coded branding options - organisations from a list provided by the API
This commit is contained in:
committed by
Leo Hemsted
parent
20c39d24b7
commit
6b5e64479a
@@ -338,3 +338,29 @@ class ServiceSmsSender(Form):
|
||||
import re
|
||||
if field.data and not re.match('^[a-zA-Z0-9\s]+$', field.data):
|
||||
raise ValidationError('Sms text message sender can only contain alpha-numeric characters')
|
||||
|
||||
|
||||
class ServiceBrandingOrg(Form):
|
||||
|
||||
def __init__(self, organisations=[], *args, **kwargs):
|
||||
self.organisation.choices = organisations
|
||||
super(ServiceBrandingOrg, self).__init__(*args, **kwargs)
|
||||
|
||||
branding_type = RadioField(
|
||||
'Branding',
|
||||
choices=[
|
||||
('govuk', 'GOV.UK only'),
|
||||
('both', 'GOV.UK and organisation'),
|
||||
('org', 'Organisation only')
|
||||
],
|
||||
validators=[
|
||||
DataRequired()
|
||||
]
|
||||
)
|
||||
|
||||
organisation = RadioField(
|
||||
'Organisation',
|
||||
validators=[
|
||||
DataRequired()
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user