mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 02:08:25 -04:00
Make organisation settings one table
There’s no longer a difference between regular settings and platform admin settings – it’s all platform admin.
This commit is contained in:
@@ -23,102 +23,88 @@
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Organisation type') }}
|
||||||
|
{{ optional_text_field({
|
||||||
|
'central': 'Central government',
|
||||||
|
'local': 'Local government',
|
||||||
|
'nhs': 'NHS',
|
||||||
|
}.get(current_org.organisation_type)) }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_type', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Crown organisation') }}
|
||||||
|
{{ optional_text_field(
|
||||||
|
{
|
||||||
|
True: 'Yes',
|
||||||
|
False: 'No',
|
||||||
|
}.get(current_org.crown),
|
||||||
|
default='Not sure'
|
||||||
|
) }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_crown_status', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Data sharing and financial agreement') }}
|
||||||
|
{{ text_field(
|
||||||
|
{
|
||||||
|
True: 'Signed',
|
||||||
|
False: 'Not signed',
|
||||||
|
None: 'Not signed (but we have some service-specific agreements in place)'
|
||||||
|
}.get(current_org.agreement_signed)
|
||||||
|
) }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_agreement', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Request to go live notes') }}
|
||||||
|
{{ optional_text_field(current_org.request_to_go_live_notes, default='None') }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_go_live_notes', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Default email branding') }}
|
||||||
|
{{ text_field(email_branding) }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_email_branding', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Default letter branding') }}
|
||||||
|
{{ optional_text_field(
|
||||||
|
letter_branding,
|
||||||
|
default='No branding'
|
||||||
|
) }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_letter_branding', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
|
{% call row() %}
|
||||||
|
{{ text_field('Known email domains') }}
|
||||||
|
{{ optional_text_field(current_org.domains or None, default='None') }}
|
||||||
|
{{ edit_field(
|
||||||
|
'Change',
|
||||||
|
url_for('.edit_organisation_domains', org_id=current_org.id)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% if current_user.platform_admin %}
|
|
||||||
<h2 class="heading-medium">Platform admin settings</h2>
|
|
||||||
<div class="settings-table body-copy-table">
|
|
||||||
{% call mapping_table(
|
|
||||||
caption='Platform admin settings',
|
|
||||||
field_headings=['Label', 'Value', 'Action'],
|
|
||||||
field_headings_visible=False,
|
|
||||||
caption_visible=False
|
|
||||||
) %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Organisation type') }}
|
|
||||||
{{ optional_text_field({
|
|
||||||
'central': 'Central government',
|
|
||||||
'local': 'Local government',
|
|
||||||
'nhs': 'NHS',
|
|
||||||
}.get(current_org.organisation_type)) }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_type', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Crown organisation') }}
|
|
||||||
{{ optional_text_field(
|
|
||||||
{
|
|
||||||
True: 'Yes',
|
|
||||||
False: 'No',
|
|
||||||
}.get(current_org.crown),
|
|
||||||
default='Not sure'
|
|
||||||
) }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_crown_status', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Data sharing and financial agreement') }}
|
|
||||||
{{ text_field(
|
|
||||||
{
|
|
||||||
True: 'Signed',
|
|
||||||
False: 'Not signed',
|
|
||||||
None: 'Not signed (but we have some service-specific agreements in place)'
|
|
||||||
}.get(current_org.agreement_signed)
|
|
||||||
) }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_agreement', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Request to go live notes') }}
|
|
||||||
{{ optional_text_field(current_org.request_to_go_live_notes, default='None') }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_go_live_notes', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Default email branding') }}
|
|
||||||
{{ text_field(email_branding) }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_email_branding', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Default letter branding') }}
|
|
||||||
{{ optional_text_field(
|
|
||||||
letter_branding,
|
|
||||||
default='No branding'
|
|
||||||
) }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_letter_branding', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% call row() %}
|
|
||||||
{{ text_field('Known email domains') }}
|
|
||||||
{{ optional_text_field(current_org.domains or None, default='None') }}
|
|
||||||
{{ edit_field(
|
|
||||||
'Change',
|
|
||||||
url_for('.edit_organisation_domains', org_id=current_org.id)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
|
||||||
{% endcall %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -182,8 +182,6 @@ def test_organisation_settings_for_platform_admin(
|
|||||||
expected_rows = [
|
expected_rows = [
|
||||||
'Label Value Action',
|
'Label Value Action',
|
||||||
'Organisation name Org 1 Change',
|
'Organisation name Org 1 Change',
|
||||||
|
|
||||||
'Label Value Action',
|
|
||||||
'Organisation type Not set Change',
|
'Organisation type Not set Change',
|
||||||
'Crown organisation Yes Change',
|
'Crown organisation Yes Change',
|
||||||
'Data sharing and financial agreement Not signed Change',
|
'Data sharing and financial agreement Not signed Change',
|
||||||
|
|||||||
Reference in New Issue
Block a user