From ff6b2b01dd64c21b1dcbdab9697f419485cce786 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 5 Oct 2017 11:08:22 +0100 Subject: [PATCH] Show org type and free allowance on settings page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a platform admin it’s useful to be able to see what each service has set for these attributes. --- app/templates/views/service-settings.html | 13 +++++++++++++ tests/__init__.py | 4 ++++ tests/app/main/views/test_service_settings.py | 2 ++ 3 files changed, 19 insertions(+) diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index d9845437d..169033a44 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -191,6 +191,19 @@ field_headings_visible=False, caption_visible=False ) %} + {% call row() %} + {{ text_field('Organisation type')}} + {{ text_field( + current_service.organisation_type|title or 'Not set', + status='' if current_service.organisation_type else 'default' + ) }} + {{ text_field() }} + {% endcall %} + {% call row() %} + {{ text_field('Free text message allowance')}} + {{ text_field('{:,}'.format(current_service.free_sms_fragment_limit)) }} + {{ text_field() }} + {% endcall %} {% call row() %} {{ text_field('Email branding' )}} {% call field() %} diff --git a/tests/__init__.py b/tests/__init__.py index d39311897..b48e2e33e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -54,6 +54,8 @@ def service_json( letter_contact_block=None, inbound_api=None, permissions=['email', 'sms'], + organisation_type='central', + free_sms_fragment_limit=250000, ): if users is None: users = [] @@ -66,12 +68,14 @@ def service_json( 'name': name, 'users': users, 'message_limit': message_limit, + 'free_sms_fragment_limit': free_sms_fragment_limit, 'active': active, 'restricted': restricted, 'email_from': email_from, 'reply_to_email_address': reply_to_email_address, 'sms_sender': sms_sender, 'research_mode': research_mode, + 'organisation_type': organisation_type, 'organisation': organisation, 'branding': branding, 'created_at': created_at or str(datetime.utcnow()), diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index b8cf44e9c..3f5f64feb 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -65,6 +65,8 @@ from tests.conftest import ( 'Send letters Off Change', 'Label Value Action', + 'Organisation type Central', + 'Free text message allowance 250,000', 'Email branding GOV.UK Change', 'Letter branding HM Government Change',