mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 14:03:52 -04:00
Only show nhs radios if user has nhs domain email
Also split local NHS into two groups following designer advice on readability.
This commit is contained in:
@@ -249,7 +249,8 @@ def organisation_type(label='Who runs this service?'):
|
||||
('central', 'Central government'),
|
||||
('local', 'Local government'),
|
||||
('nhs_central', 'NHS – central government agency or public body'),
|
||||
('nhs_local', 'NHS Trust, GP surgery or Clinical Commissioning Group'),
|
||||
('nhs_local', 'NHS Trust or Clinical Commissioning Group'),
|
||||
('nhs_local', 'GP practice'),
|
||||
('emergency_service', 'Emergency service'),
|
||||
('school_or_college', 'School or college'),
|
||||
('other', 'Other'),
|
||||
@@ -258,6 +259,18 @@ def organisation_type(label='Who runs this service?'):
|
||||
)
|
||||
|
||||
|
||||
def nhs_organisation_type(label='Who runs this service?'):
|
||||
return RadioField(
|
||||
label,
|
||||
choices=[
|
||||
('nhs_central', 'NHS – central government agency or public body'),
|
||||
('nhs_local', 'NHS Trust or Clinical Commissioning Group'),
|
||||
('nhs_local', 'GP practice'),
|
||||
],
|
||||
validators=[DataRequired()],
|
||||
)
|
||||
|
||||
|
||||
class FieldWithNoneOption():
|
||||
|
||||
# This is a special value that is specific to our forms. This is
|
||||
@@ -588,13 +601,17 @@ class OrganisationDomainsForm(StripWhitespaceForm):
|
||||
|
||||
class CreateServiceForm(StripWhitespaceForm):
|
||||
name = StringField(
|
||||
u'What’s your service called?',
|
||||
"What’s your service called?",
|
||||
validators=[
|
||||
DataRequired(message='Can’t be empty')
|
||||
])
|
||||
organisation_type = organisation_type()
|
||||
|
||||
|
||||
class CreateNhsServiceForm(CreateServiceForm):
|
||||
organisation_type = nhs_organisation_type()
|
||||
|
||||
|
||||
class NewOrganisationForm(
|
||||
RenameOrganisationForm,
|
||||
OrganisationOrganisationTypeForm,
|
||||
|
||||
Reference in New Issue
Block a user