2024-04-24 13:43:17 -07:00
{% extends "withnav_template.html" %}
2016-09-20 12:12:58 +01:00
{% from "components/banner.html" import banner_wrapper %}
2018-07-09 16:58:04 +01:00
{% from "components/table.html" import mapping_table, row, settings_row, text_field, optional_text_field, edit_field, field, boolean_field with context %}
2015-11-30 16:16:58 +00:00
2017-02-13 10:45:15 +00:00
{% block service_page_title %}
Settings
2015-11-30 16:16:58 +00:00
{% endblock %}
2024-04-24 13:43:17 -07:00
{% block serviceNavigation %}{% endblock %}
{% block sideNavigation %}
2024-08-20 13:17:01 -07:00
{% include "components/settings_nav.html" %}
2024-04-24 13:43:17 -07:00
{% endblock %}
2015-12-14 16:53:07 +00:00
{% block maincolumn_content %}
2015-11-30 16:16:58 +00:00
2023-06-08 13:12:00 -04:00
< h1 class = "font-body-lg" > Settings< / h1 >
2016-01-07 12:29:56 +00:00
2024-07-26 10:38:00 -04:00
< div class = "bottom-gutter-3-2 settings-table body-copy-table table-overflow-x-auto" >
2016-08-22 14:39:57 +01:00
{% call mapping_table(
2017-07-12 15:50:11 +01:00
caption='General',
2016-08-22 14:39:57 +01:00
field_headings_visible=False,
caption_visible=False
) %}
2017-07-12 15:50:11 +01:00
2016-08-22 14:39:57 +01:00
{% call row() %}
2017-03-02 15:56:28 +00:00
{{ text_field('Service name') }}
2016-08-22 14:39:57 +01:00
{{ text_field(current_service.name) }}
2018-01-25 15:29:05 +00:00
{{ edit_field(
'Change',
url_for('.service_name_change', service_id=current_service.id),
2020-08-25 20:01:31 +01:00
permissions=['manage_service'],
suffix='service name',
2018-01-25 15:29:05 +00:00
)
}}
2016-08-22 14:39:57 +01:00
{% endcall %}
2017-03-02 15:56:28 +00:00
2023-05-08 10:49:30 -04:00
{% call row() %}
{{ text_field('Send text messages') }}
{{ boolean_field('sms' in current_service.permissions) }}
{{ edit_field(
'Change',
url_for(
'.service_set_channel',
service_id=current_service.id,
channel='sms'
),
permissions=['manage_service'],
suffix='your settings for sending text messages',
)}}
{% endcall %}
2023-07-28 09:17:02 -06:00
{% if current_user.platform_admin %}
2023-05-08 10:49:30 -04:00
{% call settings_row(if_has_permission='sms') %}
2023-07-28 09:17:02 -06:00
{{ text_field('Text message senders\n(Only visible to Platform Admins)') }}
2023-05-08 10:49:30 -04:00
{% call field(status='default' if current_service.default_sms_sender == "None" else '') %}
{{ current_service.default_sms_sender | nl2br if current_service.default_sms_sender else 'None'}}
{% if current_service.count_sms_senders > 1 %}
< div class = "hint" >
{{ '…and %d more' | format(current_service.count_sms_senders - 1) }}
< / div >
{% endif %}
{% endcall %}
{{ edit_field(
'Manage',
url_for('.service_sms_senders', service_id=current_service.id),
permissions=['manage_service','manage_api_keys'],
suffix='text message senders',
)
}}
{% endcall %}
2023-07-28 09:17:02 -06:00
{% endif %}
2023-05-08 10:49:30 -04:00
{% call settings_row(if_has_permission='sms') %}
{{ text_field('Start text messages with service name') }}
{{ boolean_field(current_service.prefix_sms) }}
{{ edit_field(
'Change',
url_for('.service_set_sms_prefix', service_id=current_service.id),
permissions=['manage_service'],
suffix='your settings for starting text messages with service name',
)
}}
{% endcall %}
2023-12-06 12:26:33 -07:00
2023-10-04 14:40:21 -04:00
{% if current_user.platform_admin %}
{% call settings_row(if_has_permission='sms') %}
{{ text_field('Send international text messages') }}
{{ boolean_field('international_sms' in current_service.permissions) }}
{{ edit_field(
'Change',
url_for('.service_set_international_sms', service_id=current_service.id),
permissions=['manage_service'],
suffix='your settings for sending international text messages',
)
}}
{% endcall %}
{% endif %}
2023-12-06 12:26:33 -07:00
2023-05-08 10:49:30 -04:00
<!-- {% call settings_row(if_has_permission='sms') %}
{{ text_field('Receive text messages') }}
{{ boolean_field('inbound_sms' in current_service.permissions) }}
{{ edit_field(
'Change',
url_for('.service_set_inbound_sms', service_id=current_service.id),
permissions=['manage_service'],
suffix='your settings for receiving text messages',
)
}}
{% endcall %} -->
2017-07-12 15:50:11 +01:00
{% endcall %}
2022-12-01 08:53:50 -05:00
<!-- {% call mapping_table(
2022-10-04 03:04:13 +00:00
caption='Email settings',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=True
) %}
2020-07-13 08:43:29 +01:00
2022-10-04 03:04:13 +00:00
{% call row() %}
{{ text_field('Send emails') }}
{{ boolean_field('email' in current_service.permissions) }}
{{ edit_field(
'Change',
url_for(
'.service_set_channel',
channel='email',
service_id=current_service.id
),
permissions=['manage_service'],
suffix='your settings for sending emails',
)}}
{% endcall %}
2022-03-02 15:36:28 +00:00
2022-10-04 03:04:13 +00:00
{% call settings_row(if_has_permission='email') %}
{{ text_field('Reply-to email addresses') }}
{% call field(status='default' if current_service.count_email_reply_to_addresses == 0 else '') %}
{{ current_service.default_email_reply_to_address or 'Not set' }}
{% if current_service.count_email_reply_to_addresses > 1 %}
< div class = "hint" >
{{ '…and %d more' | format(current_service.count_email_reply_to_addresses - 1) }}
< / div >
{% endif %}
2020-07-13 08:43:29 +01:00
{% endcall %}
2022-10-04 03:04:13 +00:00
{{ edit_field(
2019-07-25 11:52:13 +01:00
'Manage',
2022-10-04 03:04:13 +00:00
url_for('.service_email_reply_to', service_id=current_service.id),
permissions=['manage_service','manage_api_keys'],
suffix='reply-to email addresses',
)
}}
2018-07-09 16:58:04 +01:00
{% endcall %}
2017-06-26 15:22:06 +01:00
2022-10-04 03:04:13 +00:00
{% call settings_row(if_has_permission='email') %}
{{ text_field('Send files by email') }}
{{ optional_text_field(current_service.contact_link, default="Not set up", truncate=true) }}
{{ edit_field(
'Manage',
url_for('.send_files_by_email_contact_details', service_id=current_service.id),
permissions=['manage_service'],
suffix='sending files by email',
)}}
{% endcall %}
2017-05-02 11:03:10 +01:00
2022-12-01 08:53:50 -05:00
{% endcall %} -->
2017-11-03 15:01:41 +00:00
2016-08-22 14:39:57 +01:00
< / div >
2015-11-30 16:16:58 +00:00
2022-10-04 03:04:13 +00:00
{% if current_service.trial_mode %}
2023-06-08 13:12:00 -04:00
< h2 class = "font-body-lg top-gutter-0" > Your service is in trial mode< / h2 >
2022-10-04 03:04:13 +00:00
2023-06-06 15:28:24 -04:00
< p > You can only:< / p >
2022-10-04 03:04:13 +00:00
< ul class = 'list list-bullet' >
2023-05-08 10:49:30 -04:00
< li > send {{ current_service.message_limit }} text messages per day< / li >
2022-10-04 03:04:13 +00:00
< li > send messages to yourself and other people in your team< / li >
< / ul >
2023-06-06 15:28:24 -04:00
< p >
2022-10-04 03:04:13 +00:00
{% if current_user.has_permissions('manage_service') %}
To remove these restrictions, you can send us a
2023-08-08 16:19:17 -04:00
< a class = "usa-link" href = "mailto:notify-support@gsa.gov" > request to go live< / a > .
2022-10-04 03:04:13 +00:00
{% else %}
Your service manager can ask to have these restrictions removed.
{% endif %}
< / p >
{% else %}
< h2 class = "heading-medium top-gutter-0" > Your service is live< / h2 >
2023-06-06 15:28:24 -04:00
< p >
2022-10-04 03:04:13 +00:00
You can send up to
{{ "{:,}".format(current_service.message_limit) }} messages
2023-11-28 11:34:29 -08:00
per year.
2022-10-04 03:04:13 +00:00
< / p >
2023-06-06 15:28:24 -04:00
< p >
2022-10-04 03:04:13 +00:00
Problems or comments?
2023-12-20 10:44:38 -05:00
< a class = "usa-link" href = "{{ url_for('main.support') }}" > Contact us< / a > .
2022-10-04 03:04:13 +00:00
< / p >
2016-11-04 09:50:11 +00:00
{% endif %}
2018-02-27 16:45:20 +00:00
{% if current_user.platform_admin %}
2016-08-22 10:44:45 +01:00
2019-04-23 10:31:32 +01:00
< div class = "settings-table body-copy-table top-gutter-4-3" >
2023-06-06 15:28:24 -04:00
< h2 class = "font-body-lg" > Platform admin settings< / h2 >
2019-04-23 10:31:32 +01:00
{% call mapping_table(
caption='Settings',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('Live')}}
2023-07-12 12:09:44 -04:00
{% if current_service.trial_mode and not current_service.organization_id %}
2022-12-20 09:44:33 -05:00
{{ text_field('No (organization must be set first)') }}
2019-04-23 10:31:32 +01:00
{{ text_field('') }}
{% else %}
{{ boolean_field(not current_service.trial_mode) }}
2020-08-25 20:01:31 +01:00
{{ edit_field('Change', url_for('.service_switch_live', service_id=current_service.id), suffix='service status') }}
2019-04-23 10:31:32 +01:00
{% endif %}
{% endcall %}
2019-03-25 14:46:42 +00:00
2019-04-23 10:31:32 +01:00
{% call row() %}
{{ text_field('Count in list of live services')}}
2021-10-15 09:18:54 +01:00
{{ text_field(current_service.count_as_live|format_yes_no) }}
2020-08-25 20:01:31 +01:00
{{ 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') }}
2018-07-17 14:39:04 +01:00
{% endcall %}
2021-01-22 16:50:32 +00:00
{% call row() %}
{{ text_field('Billing details')}}
2021-02-16 15:20:15 +00:00
{{ optional_text_field(current_service.billing_details, default="None", wrap=True) }}
2021-01-25 14:52:07 +00:00
{{ edit_field('Change', url_for('.edit_service_billing_details', service_id=current_service.id), suffix='billing details for service') }}
2021-01-22 16:50:32 +00:00
{% endcall %}
2021-01-13 18:48:20 +00:00
{% call row() %}
{{ text_field('Notes')}}
2021-02-16 15:20:15 +00:00
{{ optional_text_field(current_service.notes, default="None", wrap=True) }}
2021-01-14 18:00:44 +00:00
{{ edit_field('Change', url_for('.edit_service_notes', service_id=current_service.id), suffix='the notes for the service') }}
2021-01-13 18:48:20 +00:00
{% endcall %}
2019-04-23 10:31:32 +01:00
{% call row() %}
2022-12-20 09:44:33 -05:00
{{ text_field('Organization')}}
2019-07-08 09:44:22 +01:00
{% call field() %}
2023-07-12 12:09:44 -04:00
{% if current_service.organization_id %}
2023-08-08 16:19:17 -04:00
< a class = "usa-link" href = "{{ url_for('main.organization_dashboard', org_id=current_service.organization_id) }}" >
2023-07-12 12:09:44 -04:00
{{ current_service.organization_name }}
2019-07-08 09:44:22 +01:00
< / a >
{% else %}
< span class = "table-field-status-default" > Not set< / span >
{% endif %}
2023-07-12 12:09:44 -04:00
{% if current_service.organization_type %}
2019-07-08 09:44:22 +01:00
< div class = "hint" >
2023-07-12 12:09:44 -04:00
{{ current_service.organization_type_label }}
2019-07-08 09:44:22 +01:00
< / div >
{% endif %}
{% endcall %}
2023-07-12 12:09:44 -04:00
{{ edit_field('Change', url_for('.link_service_to_organization', service_id=current_service.id), suffix='organization for service') }}
2019-04-23 10:31:32 +01:00
{% endcall %}
2021-02-04 17:11:49 +00:00
2020-10-21 14:30:35 +01:00
{% call row() %}
{{ text_field('Rate limit')}}
{{ text_field('{:,} per minute'.format(current_service.rate_limit)) }}
{{ edit_field('Change', url_for('.set_rate_limit', service_id=current_service.id), suffix='rate limit') }}
{% endcall %}
2020-10-19 17:19:32 +01:00
{% call row() %}
2023-12-06 12:26:33 -07:00
{{ text_field('Message batch limit')}}
{{ text_field('{:,} per send'.format(current_service.message_limit)) }}
{{ edit_field('Change', url_for('.set_message_limit', service_id=current_service.id), suffix='message batch limit') }}
2020-10-19 17:19:32 +01:00
{% endcall %}
2019-04-23 10:31:32 +01:00
{% call row() %}
{{ text_field('Free text message allowance')}}
2020-10-19 17:19:32 +01:00
{{ text_field('{:,} per year'.format(current_service.free_sms_fragment_limit)) }}
2020-08-25 20:01:31 +01:00
{{ edit_field('Change', url_for('.set_free_sms_allowance', service_id=current_service.id), suffix='free text message allowance') }}
2019-04-23 10:31:32 +01:00
{% endcall %}
{% call row() %}
2020-10-19 16:47:55 +01:00
{{ text_field('Custom data retention')}}
2019-04-23 10:31:32 +01:00
{% call field() %}
2020-10-19 16:47:55 +01:00
{% for channel in current_service.data_retention %}
{% if loop.first %}
< ul >
{% endif %}
< li > {{ channel.notification_type|format_notification_type }} – {{ channel.days_of_retention }} days< / li >
{% if loop.last %}
< / ul >
{% endif %}
{% else %}
< div class = "table-field-status-default" > Not set< / div >
{% endfor %}
2019-02-18 16:56:43 +00:00
{% endcall %}
2020-08-25 20:01:31 +01:00
{{ edit_field('Change', url_for('.data_retention', service_id=current_service.id), suffix='data retention') }}
2019-04-23 10:31:32 +01:00
{% endcall %}
2019-02-18 16:56:43 +00:00
2019-04-23 10:31:32 +01:00
{% for permission in service_permissions %}
{% if not service_permissions[permission].requires or current_service.has_permission(service_permissions[permission].requires) %}
{% call row() %}
{{ text_field(service_permissions[permission].title)}}
{{ boolean_field(current_service.has_permission(permission)) }}
2020-08-25 20:01:31 +01:00
{{ edit_field(
'Change',
url_for(
service_permissions[permission].endpoint or '.service_set_permission',
service_id=current_service.id,
permission=permission if not service_permissions[permission].endpoint else None
),
suffix='your settings for ' + service_permissions[permission].title,
) }}
2019-04-23 10:31:32 +01:00
{% endcall %}
{% endif %}
{% endfor %}
2016-08-22 10:44:45 +01:00
2019-04-23 10:31:32 +01:00
{% endcall %}
< / div >
2016-08-23 15:47:43 +01:00
2016-08-22 10:44:45 +01:00
{% endif %}
2019-05-29 16:51:25 +01:00
{% if current_service.active and (current_service.trial_mode or current_user.platform_admin) %}
< p class = "top-gutter-1-2" >
2022-03-24 12:58:08 +00:00
< span class = "page-footer-link page-footer-delete-link-without-button" >
2023-06-08 13:12:00 -04:00
< a class = "usa-button usa-button--secondary" href = "{{ url_for('.archive_service', service_id=current_service.id) }}" >
2019-05-29 16:51:25 +01:00
Delete this service
< / a >
< / span >
{% if current_user.platform_admin %}
2022-03-24 12:58:08 +00:00
< span class = "page-footer-link" >
2023-08-08 16:19:17 -04:00
< a href = "{{ url_for('.suspend_service', service_id=current_service.id) }}" class = "usa-link usa-link--destructive page-footer-link" >
2019-05-29 16:51:25 +01:00
Suspend service
< / a >
< / span >
2022-03-24 12:58:56 +00:00
< span class = "page-footer-link" >
2023-08-08 16:19:17 -04:00
< a href = "{{ url_for('.history', service_id=current_service.id) }}" class = "usa-link page-footer-link" >
2022-03-24 12:58:56 +00:00
Service history
< / a >
< / span >
2019-05-29 16:51:25 +01:00
{% endif %}
< / p >
{% endif %}
{% if (not current_service.active) and current_user.platform_admin %}
2023-06-06 15:28:24 -04:00
< p >
2023-09-15 12:26:31 -04:00
< div class = "hint " >
2019-05-29 16:51:25 +01:00
Service suspended
< / div >
2022-03-24 12:58:08 +00:00
< span class = "page-footer-link page-footer-delete-link-without-button" >
2023-08-08 16:19:17 -04:00
< a class = "usa-link usa-link--destructive" href = "{{ url_for('.resume_service', service_id=current_service.id) }}" >
2019-05-29 16:51:25 +01:00
Resume service
< / a >
< / span >
2022-03-24 12:58:56 +00:00
< span class = "page-footer-link" >
2023-08-08 16:19:17 -04:00
< a href = "{{ url_for('.history', service_id=current_service.id) }}" class = "usa-link page-footer-link" >
2022-03-24 12:58:56 +00:00
Service history
< / a >
< / span >
2019-05-29 16:51:25 +01:00
< / p >
{% endif %}
2015-11-30 16:16:58 +00:00
{% endblock %}
2018-07-10 10:09:17 +01:00
}