mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Link to edit billing details page for organisation
This commit is contained in:
@@ -553,3 +553,9 @@ def edit_organisation_notes(org_id):
|
|||||||
'views/organisations/organisation/settings/edit-organisation-notes.html',
|
'views/organisations/organisation/settings/edit-organisation-notes.html',
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/organisations/<uuid:org_id>/settings/edit-billing-details", methods=['GET', 'POST'])
|
||||||
|
@user_is_platform_admin
|
||||||
|
def edit_organisation_billing_details(org_id):
|
||||||
|
pass
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ class HeaderNavigation(Navigation):
|
|||||||
'download_notifications_csv',
|
'download_notifications_csv',
|
||||||
'edit_data_retention',
|
'edit_data_retention',
|
||||||
'edit_organisation_agreement',
|
'edit_organisation_agreement',
|
||||||
|
'edit_organisation_billing_details',
|
||||||
'edit_organisation_crown_status',
|
'edit_organisation_crown_status',
|
||||||
'edit_organisation_domains',
|
'edit_organisation_domains',
|
||||||
'edit_organisation_email_branding',
|
'edit_organisation_email_branding',
|
||||||
@@ -577,6 +578,7 @@ class MainNavigation(Navigation):
|
|||||||
'download_notifications_csv',
|
'download_notifications_csv',
|
||||||
'edit_data_retention',
|
'edit_data_retention',
|
||||||
'edit_organisation_agreement',
|
'edit_organisation_agreement',
|
||||||
|
'edit_organisation_billing_details',
|
||||||
'edit_organisation_crown_status',
|
'edit_organisation_crown_status',
|
||||||
'edit_organisation_email_branding',
|
'edit_organisation_email_branding',
|
||||||
'edit_organisation_domains',
|
'edit_organisation_domains',
|
||||||
@@ -807,6 +809,7 @@ class CaseworkNavigation(Navigation):
|
|||||||
'clear_cache',
|
'clear_cache',
|
||||||
'count_content_length',
|
'count_content_length',
|
||||||
'edit_organisation_agreement',
|
'edit_organisation_agreement',
|
||||||
|
'edit_organisation_billing_details',
|
||||||
'edit_organisation_crown_status',
|
'edit_organisation_crown_status',
|
||||||
'edit_organisation_domains',
|
'edit_organisation_domains',
|
||||||
'edit_organisation_email_branding',
|
'edit_organisation_email_branding',
|
||||||
@@ -1080,6 +1083,7 @@ class OrgNavigation(Navigation):
|
|||||||
'settings': {
|
'settings': {
|
||||||
'confirm_edit_organisation_name',
|
'confirm_edit_organisation_name',
|
||||||
'edit_organisation_agreement',
|
'edit_organisation_agreement',
|
||||||
|
'edit_organisation_billing_details',
|
||||||
'edit_organisation_crown_status',
|
'edit_organisation_crown_status',
|
||||||
'edit_organisation_domains',
|
'edit_organisation_domains',
|
||||||
'edit_organisation_email_branding',
|
'edit_organisation_email_branding',
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
{% call row() %}
|
{% call row() %}
|
||||||
{{ text_field('Billing details')}}
|
{{ text_field('Billing details')}}
|
||||||
{{ optional_text_field(current_org.billing_details, default="No billing details yet", wrap=True) }}
|
{{ 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 %}
|
{% endcall %}
|
||||||
|
|
||||||
{% call row() %}
|
{% call row() %}
|
||||||
|
|||||||
@@ -1313,3 +1313,18 @@ def test_update_organisation_notes(
|
|||||||
cached_service_ids=None,
|
cached_service_ids=None,
|
||||||
notes="Very fluffy"
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user