diff --git a/app/assets/stylesheets/components/table.scss b/app/assets/stylesheets/components/table.scss
index 14ae48f10..563323692 100644
--- a/app/assets/stylesheets/components/table.scss
+++ b/app/assets/stylesheets/components/table.scss
@@ -156,6 +156,18 @@
}
+ td.table-field-wrap-text {
+
+ div {
+ white-space: normal;
+ }
+
+ ul li {
+ margin-bottom: 5px;
+ }
+
+ }
+
.table-heading {
margin-bottom: 20px;
}
diff --git a/app/models/service.py b/app/models/service.py
index 3f699e54d..e3a23fc54 100644
--- a/app/models/service.py
+++ b/app/models/service.py
@@ -37,6 +37,7 @@ class Service(JSONModel):
'message_limit',
'rate_limit',
'name',
+ 'notes',
'prefix_sms',
'research_mode',
'service_callback_api',
diff --git a/app/templates/components/table.html b/app/templates/components/table.html
index 72b6cdc3b..cfd029ee8 100644
--- a/app/templates/components/table.html
+++ b/app/templates/components/table.html
@@ -63,12 +63,13 @@
{% endif %}
{%- endmacro %}
-{% macro field(align='left', status='', border=True, colspan=None) -%}
+{% macro field(align='left', status='', border=True, colspan=None, wrap=False) -%}
{% set field_alignment = 'table-field-right-aligned' if align == 'right' else 'table-field-left-aligned' %}
{% set border = '' if border else 'table-field-noborder' %}
+ {% set wrap = 'table-field-wrap-text' if wrap else '' %}
-
+ |
{{ caller() }}
|
{%- endmacro %}
@@ -85,8 +86,8 @@
{%- endmacro %}
-{% macro text_field(text, status='', truncate=false) -%}
- {% call field(status=status) %}
+{% macro text_field(text, status='', truncate=false, wrap=False) -%}
+ {% call field(status=status, wrap=wrap) %}
{% if text is iterable and text is not string %}
{% for item in text %}
@@ -105,11 +106,12 @@
{% endcall %}
{%- endmacro %}
-{% macro optional_text_field(text, default='Not set', truncate=false) -%}
+{% macro optional_text_field(text, default='Not set', truncate=false, wrap=False) -%}
{{ text_field(
text or default,
status='' if text else 'default',
- truncate=truncate
+ truncate=truncate,
+ wrap=wrap
) }}
{%- endmacro %}
diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html
index 668939cc5..9bffeefd4 100644
--- a/app/templates/views/service-settings.html
+++ b/app/templates/views/service-settings.html
@@ -335,6 +335,12 @@
{{ edit_field('Change', url_for('.service_switch_count_as_live', service_id=current_service.id), suffix='if service is counted in list of live services') }}
{% endcall %}
+ {% call row() %}
+ {{ text_field('Notes')}}
+ {{ optional_text_field(current_service.notes, default="No notes yet", wrap=True) }}
+ {{ edit_field('Change', url_for('.service_switch_count_as_live', service_id=current_service.id), suffix='the notes for the service') }}
+ {% endcall %}
+
{% call row() %}
{{ text_field('Organisation')}}
{% call field() %}
diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py
index b392136a0..a615c6752 100644
--- a/tests/app/main/views/test_service_settings.py
+++ b/tests/app/main/views/test_service_settings.py
@@ -100,6 +100,7 @@ def mock_get_service_settings_page_common(
'Label Value Action',
'Live Off Change service status',
'Count in list of live services Yes Change if service is counted in list of live services',
+ 'Notes No notes yet Change the notes for the service',
'Organisation Test organisation Central government Change organisation for service',
'Rate limit 3,000 per minute Change rate limit',
'Message limit 1,000 per day Change daily message limit',