{% extends "withnav_template.html" %} {% from "components/banner.html" import banner_wrapper %} {% from "components/table.html" import mapping_table, row, settings_row, text_field, optional_text_field, edit_field, field, boolean_field with context %} {% block service_page_title %} Settings {% endblock %} {% block serviceNavigation %}{% endblock %} {% block sideNavigation %} {% include "components/settings_nav.html" %} {% endblock %} {% block maincolumn_content %}

Settings

{% call mapping_table( caption='General', field_headings_visible=False, caption_visible=False ) %} {% call row() %} {{ text_field('Service name') }} {{ text_field(current_service.name) }} {{ edit_field( 'Change', url_for('.service_name_change', service_id=current_service.id), permissions=['manage_service'], suffix='service name', ) }} {% endcall %} {% 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 %} {% if current_user.platform_admin %} {% call settings_row(if_has_permission='sms') %} {{ text_field('Text message senders\n(Only visible to Platform Admins)') }} {% 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 %}
{{ '…and %d more' | format(current_service.count_sms_senders - 1) }}
{% 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 %} {% endif %} {% 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 %} {% 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 %} {% endcall %}
{% if current_service.trial_mode %}

Your service is in trial mode

You can only:

{% if current_user.has_permissions('manage_service') %} To remove these restrictions, you can send us a request to go live. {% else %} Your service manager can ask to have these restrictions removed. {% endif %}

{% else %}

Your service is live

You can send up to {{ "{:,}".format(current_service.message_limit) }} messages per year.

Problems or comments? Contact us.

{% endif %} {% if current_user.platform_admin %}

Platform admin settings

{% call mapping_table( caption='Settings', field_headings=['Label', 'Value', 'Action'], field_headings_visible=False, caption_visible=False ) %} {% call row() %} {{ text_field('Live')}} {% if current_service.trial_mode and not current_service.organization_id %} {{ text_field('No (organization must be set first)') }} {{ text_field('') }} {% else %} {{ boolean_field(not current_service.trial_mode) }} {{ edit_field('Change', url_for('.service_switch_live', service_id=current_service.id), suffix='service status') }} {% endif %} {% endcall %} {% call row() %} {{ text_field('Count in list of live services')}} {{ text_field(current_service.count_as_live|format_yes_no) }} {{ 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('Billing details')}} {{ optional_text_field(current_service.billing_details, default="None", wrap=True) }} {{ edit_field('Change', url_for('.edit_service_billing_details', service_id=current_service.id), suffix='billing details for service') }} {% endcall %} {% call row() %} {{ text_field('Notes')}} {{ optional_text_field(current_service.notes, default="None", wrap=True) }} {{ edit_field('Change', url_for('.edit_service_notes', service_id=current_service.id), suffix='the notes for the service') }} {% endcall %} {% call row() %} {{ text_field('Organization')}} {% call field() %} {% if current_service.organization_id %} {{ current_service.organization_name }} {% else %} Not set {% endif %} {% if current_service.organization_type %}
{{ current_service.organization_type_label }}
{% endif %} {% endcall %} {{ edit_field('Change', url_for('.link_service_to_organization', service_id=current_service.id), suffix='organization for service') }} {% endcall %} {% 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 %} {% call row() %} {{ 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') }} {% endcall %} {% call row() %} {{ text_field('Free text message allowance')}} {{ text_field('{:,} per year'.format(current_service.free_sms_fragment_limit)) }} {{ edit_field('Change', url_for('.set_free_sms_allowance', service_id=current_service.id), suffix='free text message allowance') }} {% endcall %} {% call row() %} {{ text_field('Custom data retention')}} {% call field() %} {% for channel in current_service.data_retention %} {% if loop.first %} {% endif %} {% else %}
Not set
{% endfor %} {% endcall %} {{ edit_field('Change', url_for('.data_retention', service_id=current_service.id), suffix='data retention') }} {% endcall %} {% 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)) }} {{ 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, ) }} {% endcall %} {% endif %} {% endfor %} {% endcall %}
{% endif %} {% if current_service.active and (current_service.trial_mode or current_user.platform_admin) %}

Delete this service {% if current_user.platform_admin %} Suspend service Service history {% endif %}

{% endif %} {% if (not current_service.active) and current_user.platform_admin %}

Service suspended
Resume service Service history

{% endif %} {% endblock %} }