Merge pull request #3057 from alphagov/new_org_types_part_1

Introduce new org types
This commit is contained in:
Pea (Malgorzata Tyczynska)
2019-07-22 15:56:31 +01:00
committed by GitHub
10 changed files with 112 additions and 39 deletions

View File

@@ -248,7 +248,24 @@ def organisation_type(label='Who runs this service?'):
choices=[
('central', 'Central government'),
('local', 'Local government'),
('nhs', 'NHS'),
('nhs_central', 'NHS central government agency or public body'),
('nhs_local', 'NHS Trust or Clinical Commissioning Group'),
('nhs_local', 'GP practice'),
('emergency_service', 'Emergency service'),
('school_or_college', 'School or college'),
('other', 'Other'),
],
validators=[DataRequired()],
)
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()],
)
@@ -584,13 +601,17 @@ class OrganisationDomainsForm(StripWhitespaceForm):
class CreateServiceForm(StripWhitespaceForm):
name = StringField(
u'Whats your service called?',
"Whats your service called?",
validators=[
DataRequired(message='Cant be empty')
])
organisation_type = organisation_type()
class CreateNhsServiceForm(CreateServiceForm):
organisation_type = nhs_organisation_type()
class NewOrganisationForm(
RenameOrganisationForm,
OrganisationOrganisationTypeForm,