mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
remove nhs and gpo forms
This commit is contained in:
@@ -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(
|
||||
'What’s 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(
|
||||
|
||||
Reference in New Issue
Block a user