Stop allowing the service org type to be changed

The service organisation type will either be the same as the org type of
the service's organisation or will be set by a user when creating a new
service. This removes the ability to change it from the platform admin
settings table.
This commit is contained in:
Katie Smith
2019-07-16 11:36:19 +01:00
parent 3167c6dc31
commit 53214937a8
6 changed files with 56 additions and 133 deletions
+19 -8
View File
@@ -308,16 +308,27 @@
{% call row() %}
{{ text_field('Organisation')}}
{{ optional_text_field(current_service.organisation.name) }}
{% call field() %}
{% if current_service.organisation_id %}
<a href="{{ url_for('main.organisation_dashboard', org_id=current_service.organisation_id) }}">
{{ current_service.organisation.name }}
</a>
{% else %}
<span class="table-field-status-default">Not set</span>
{% endif %}
{% if current_service.organisation_type %}
<div class="hint">
{{ {
'central': 'Central government',
'local': 'Local government',
'nhs': 'NHS',
}.get(current_service.organisation_type) }}
</div>
{% endif %}
{% endcall %}
{{ edit_field('Change', url_for('.link_service_to_organisation', service_id=current_service.id)) }}
{% endcall %}
{% call row() %}
{{ text_field('Organisation type')}}
{{ optional_text_field(
(current_service.organisation_type or '')|title
) }}
{{ edit_field('Change', url_for('.set_organisation_type', service_id=current_service.id)) }}
{% endcall %}
{% call row() %}
{{ text_field('Free text message allowance')}}
{{ text_field('{:,}'.format(current_service.free_sms_fragment_limit)) }}
@@ -1,23 +0,0 @@
{% extends "withnav_template.html" %}
{% from "components/radios.html" import radios %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% block service_page_title %}
Set branding and organisation
{% endblock %}
{% block maincolumn_content %}
{{ page_header(
'Set organisation type',
back_link=url_for('.service_settings', service_id=current_service.id)
) }}
{% call form_wrapper() %}
{{ radios(form.organisation_type) }}
{{ page_footer('Save') }}
{% endcall %}
{% endblock %}