mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 11:38:24 -04:00
Introduce new org types
This commit is contained in:
@@ -39,6 +39,11 @@ class Config(object):
|
||||
'central': 250000,
|
||||
'local': 25000,
|
||||
'nhs': 25000,
|
||||
'nhs_central': 250000,
|
||||
'nhs_local': 25000,
|
||||
'emergency_service': 25000,
|
||||
'school_or_college': 25000,
|
||||
'other': 25000,
|
||||
}
|
||||
EMAIL_EXPIRY_SECONDS = 3600 # 1 hour
|
||||
INVITATION_EXPIRY_SECONDS = 3600 * 24 * 2 # 2 days - also set on api
|
||||
|
||||
@@ -248,7 +248,11 @@ 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, GP surgery or Clinical Commissioning Group'),
|
||||
('emergency_service', 'Emergency service'),
|
||||
('school_or_college', 'School or college'),
|
||||
('other', 'Other'),
|
||||
],
|
||||
validators=[DataRequired()],
|
||||
)
|
||||
|
||||
@@ -268,7 +268,9 @@ class Service(JSONModel):
|
||||
|
||||
@property
|
||||
def shouldnt_use_govuk_as_sms_sender(self):
|
||||
return self.organisation_type in {'local', 'nhs'}
|
||||
return self.organisation_type in {
|
||||
'local', 'nhs', 'nhs_local', 'nhs_central', 'emergency_service', 'school_or_college', 'other'
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def sms_senders(self):
|
||||
|
||||
@@ -322,7 +322,7 @@ class User(JSONModel, UserMixin):
|
||||
if self.default_organisation:
|
||||
return self.default_organisation.organisation_type
|
||||
if self.has_nhs_email_address:
|
||||
return 'nhs'
|
||||
return 'nhs_local'
|
||||
return None
|
||||
|
||||
@property
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
{{ optional_text_field({
|
||||
'central': 'Central government',
|
||||
'local': 'Local government',
|
||||
'nhs': 'NHS',
|
||||
'nhs_central': 'NHS – central government agency or public body',
|
||||
'nhs_local': 'NHS Trust, GP surgery or Clinical Commissioning Group',
|
||||
'emergency_service': 'Emergency service',
|
||||
'school_or_college': 'School or college',
|
||||
'other': 'Other',
|
||||
}.get(current_org.organisation_type)) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
|
||||
Reference in New Issue
Block a user