remove nhs and gpo forms

This commit is contained in:
stvnrlly
2022-09-13 13:20:54 +00:00
parent 0db9653638
commit 7b51d1e7a6
4 changed files with 30 additions and 127 deletions

View File

@@ -1191,50 +1191,6 @@ class RenameOrganisationForm(StripWhitespaceForm):
])
class AddGPOrganisationForm(StripWhitespaceForm):
def __init__(self, *args, service_name='unknown', **kwargs):
super().__init__(*args, **kwargs)
self.same_as_service_name.label.text = 'Is your GP practice called {}?'.format(service_name)
self.service_name = service_name
def get_organisation_name(self):
if self.same_as_service_name.data:
return self.service_name
return self.name.data
same_as_service_name = OnOffField(
'Is your GP practice called the same name as your service?',
choices=(
(True, 'Yes'),
(False, 'No'),
),
)
name = GovukTextInputField(
'Whats your practice called?',
)
def validate_name(self, field):
if self.same_as_service_name.data is False:
if not field.data:
raise ValidationError('Cannot be empty')
else:
field.data = ''
class AddNHSLocalOrganisationForm(StripWhitespaceForm):
def __init__(self, *args, organisation_choices=None, **kwargs):
super().__init__(*args, **kwargs)
self.organisations.choices = organisation_choices
organisations = GovukRadiosField(
'Which NHS Trust or Clinical Commissioning Group do you work for?',
thing='an NHS Trust or Clinical Commissioning Group'
)
class OrganisationOrganisationTypeForm(StripWhitespaceForm):
organisation_type = OrganisationTypeField('What type of organisation is this?')
@@ -1298,7 +1254,7 @@ class CreateServiceForm(StripWhitespaceForm):
MustContainAlphanumericCharacters(),
Length(max=255, message='Service name must be 255 characters or fewer')
])
# organisation_type = OrganisationTypeField('Who runs this service?')
organisation_type = OrganisationTypeField('Where is this service run?')
class AdminNewOrganisationForm(