diff --git a/app/main/views/organisations.py b/app/main/views/organisations.py index 2bb395cdc..02b8c4491 100644 --- a/app/main/views/organisations.py +++ b/app/main/views/organisations.py @@ -553,3 +553,9 @@ def edit_organisation_notes(org_id): 'views/organisations/organisation/settings/edit-organisation-notes.html', form=form, ) + + +@main.route("/organisations//settings/edit-billing-details", methods=['GET', 'POST']) +@user_is_platform_admin +def edit_organisation_billing_details(org_id): + pass diff --git a/app/navigation.py b/app/navigation.py index a84636366..99efe22ce 100644 --- a/app/navigation.py +++ b/app/navigation.py @@ -182,6 +182,7 @@ class HeaderNavigation(Navigation): 'download_notifications_csv', 'edit_data_retention', 'edit_organisation_agreement', + 'edit_organisation_billing_details', 'edit_organisation_crown_status', 'edit_organisation_domains', 'edit_organisation_email_branding', @@ -577,6 +578,7 @@ class MainNavigation(Navigation): 'download_notifications_csv', 'edit_data_retention', 'edit_organisation_agreement', + 'edit_organisation_billing_details', 'edit_organisation_crown_status', 'edit_organisation_email_branding', 'edit_organisation_domains', @@ -807,6 +809,7 @@ class CaseworkNavigation(Navigation): 'clear_cache', 'count_content_length', 'edit_organisation_agreement', + 'edit_organisation_billing_details', 'edit_organisation_crown_status', 'edit_organisation_domains', 'edit_organisation_email_branding', @@ -1080,6 +1083,7 @@ class OrgNavigation(Navigation): 'settings': { 'confirm_edit_organisation_name', 'edit_organisation_agreement', + 'edit_organisation_billing_details', 'edit_organisation_crown_status', 'edit_organisation_domains', 'edit_organisation_email_branding', diff --git a/app/templates/views/organisations/organisation/settings/index.html b/app/templates/views/organisations/organisation/settings/index.html index 2a3810d12..de53a41a0 100644 --- a/app/templates/views/organisations/organisation/settings/index.html +++ b/app/templates/views/organisations/organisation/settings/index.html @@ -75,7 +75,7 @@ {% call row() %} {{ text_field('Billing details')}} {{ optional_text_field(current_org.billing_details, default="No billing details yet", wrap=True) }} - {{ edit_field('Change', url_for('.organisation_settings', org_id=current_org.id), suffix='billing details for the organisation') }} + {{ edit_field('Change', url_for('.edit_organisation_billing_details', org_id=current_org.id), suffix='billing details for the organisation') }} {% endcall %} {% call row() %} diff --git a/tests/app/main/views/organisations/test_organisations.py b/tests/app/main/views/organisations/test_organisations.py index e44d90775..4a1c08bae 100644 --- a/tests/app/main/views/organisations/test_organisations.py +++ b/tests/app/main/views/organisations/test_organisations.py @@ -1313,3 +1313,18 @@ def test_update_organisation_notes( cached_service_ids=None, notes="Very fluffy" ) + + +def test_organisation_settings_links_to_edit_organisation_billing_details_page( + mocker, + mock_get_organisation, + organisation_one, + platform_admin_client, +): + response = platform_admin_client.get(url_for( + '.organisation_settings', org_id=organisation_one['id'] + )) + page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') + assert len(page.find_all( + 'a', attrs={'href': '/organisations/{}/settings/edit-billing-details'.format(organisation_one['id'])} + )) == 1