mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Remove duplication of org type lookup
There’s a couple of places where we’re looking up the label for the type of organisation. Having this repeated in multiple places means it’s more likely we forget to update one of these places when making a change. This commit looks up from the tuple in the organisation model, which is where other code references this stuff from. This is only possible now that we don’t have duplicate keys (ie GP practice doesn’t share a key any more).
This commit is contained in:
@@ -25,15 +25,7 @@
|
||||
{% endcall %}
|
||||
{% call row() %}
|
||||
{{ text_field('Sector') }}
|
||||
{{ optional_text_field({
|
||||
'central': 'Central government',
|
||||
'local': 'Local government',
|
||||
'nhs_central': 'NHS – central government agency or public body',
|
||||
'nhs_local': 'NHS Trust, GP practice or Clinical Commissioning Group',
|
||||
'emergency_service': 'Emergency service',
|
||||
'school_or_college': 'School or college',
|
||||
'other': 'Other',
|
||||
}.get(current_org.organisation_type)) }}
|
||||
{{ optional_text_field(current_org.organisation_type_label) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.edit_organisation_type', org_id=current_org.id)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
<p>
|
||||
{% if current_user.has_permissions('manage_service') %}
|
||||
To remove these restrictions, you can send us a
|
||||
To remove these restrictions, you can send us a
|
||||
<a href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a>.
|
||||
{% else %}
|
||||
Your service manager can ask to have these restrictions removed.
|
||||
@@ -324,15 +324,7 @@
|
||||
{% endif %}
|
||||
{% if current_service.organisation_type %}
|
||||
<div class="hint">
|
||||
{{ {
|
||||
'central': 'Central government',
|
||||
'local': 'Local government',
|
||||
'nhs_central': 'NHS – central government agency or public body',
|
||||
'nhs_local': 'NHS Trust, GP practice or Clinical Commissioning Group',
|
||||
'emergency_service': 'Emergency service',
|
||||
'school_or_college': 'School or college',
|
||||
'other': 'Other'
|
||||
}.get(current_service.organisation_type) }}
|
||||
{{ current_service.organisation_type_label }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user