mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 09:38:25 -04:00
Display notes section in Service Settings
This commit is contained in:
@@ -156,6 +156,18 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td.table-field-wrap-text {
|
||||||
|
|
||||||
|
div {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.table-heading {
|
.table-heading {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class Service(JSONModel):
|
|||||||
'message_limit',
|
'message_limit',
|
||||||
'rate_limit',
|
'rate_limit',
|
||||||
'name',
|
'name',
|
||||||
|
'notes',
|
||||||
'prefix_sms',
|
'prefix_sms',
|
||||||
'research_mode',
|
'research_mode',
|
||||||
'service_callback_api',
|
'service_callback_api',
|
||||||
|
|||||||
@@ -63,12 +63,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- 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 field_alignment = 'table-field-right-aligned' if align == 'right' else 'table-field-left-aligned' %}
|
||||||
{% set border = '' if border else 'table-field-noborder' %}
|
{% set border = '' if border else 'table-field-noborder' %}
|
||||||
|
{% set wrap = 'table-field-wrap-text' if wrap else '' %}
|
||||||
|
|
||||||
<td class="{{ [field_alignment, border]|join(' ') }}" {% if colspan %}colspan="{{ colspan }}"{% endif %}>
|
<td class="{{ [field_alignment, border, wrap]|join(' ') }}" {% if colspan %}colspan="{{ colspan }}"{% endif %}>
|
||||||
<div class="{{ 'table-field-status-' + status if status }}">{{ caller() }}</div>
|
<div class="{{ 'table-field-status-' + status if status }}">{{ caller() }}</div>
|
||||||
</td>
|
</td>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
@@ -85,8 +86,8 @@
|
|||||||
</td>
|
</td>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro text_field(text, status='', truncate=false) -%}
|
{% macro text_field(text, status='', truncate=false, wrap=False) -%}
|
||||||
{% call field(status=status) %}
|
{% call field(status=status, wrap=wrap) %}
|
||||||
{% if text is iterable and text is not string %}
|
{% if text is iterable and text is not string %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in text %}
|
{% for item in text %}
|
||||||
@@ -105,11 +106,12 @@
|
|||||||
{% endcall %}
|
{% endcall %}
|
||||||
{%- endmacro %}
|
{%- 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_field(
|
||||||
text or default,
|
text or default,
|
||||||
status='' if text else 'default',
|
status='' if text else 'default',
|
||||||
truncate=truncate
|
truncate=truncate,
|
||||||
|
wrap=wrap
|
||||||
) }}
|
) }}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
|||||||
@@ -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') }}
|
{{ 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 %}
|
{% 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() %}
|
{% call row() %}
|
||||||
{{ text_field('Organisation')}}
|
{{ text_field('Organisation')}}
|
||||||
{% call field() %}
|
{% call field() %}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ def mock_get_service_settings_page_common(
|
|||||||
'Label Value Action',
|
'Label Value Action',
|
||||||
'Live Off Change service status',
|
'Live Off Change service status',
|
||||||
'Count in list of live services Yes Change if service is counted in list of live services',
|
'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',
|
'Organisation Test organisation Central government Change organisation for service',
|
||||||
'Rate limit 3,000 per minute Change rate limit',
|
'Rate limit 3,000 per minute Change rate limit',
|
||||||
'Message limit 1,000 per day Change daily message limit',
|
'Message limit 1,000 per day Change daily message limit',
|
||||||
|
|||||||
Reference in New Issue
Block a user