Allow services to turn international SMS on/off

We didn’t make this self-service before because the pricing information
wasn’t published (ie we had to send it to services that asked for it).

Now that we publish pricing information in the app, there’s no reason
why services can’t make an informed decision about whether they want
international SMS or not.

So this commit:
- removes the platform admin button
- adds some radio buttons that our users can click with their mice
This commit is contained in:
Chris Hill-Scott
2017-09-26 14:05:02 +01:00
parent 3906b31929
commit 9581a3bb77
5 changed files with 102 additions and 76 deletions

View File

@@ -231,11 +231,6 @@
</a>
</li>
{% if 'sms' in current_service.permissions %}
<li class="bottom-gutter">
<a href="{{ url_for('.service_switch_can_send_international_sms', service_id=current_service.id) }}" class="button">
{{ 'Stop sending international sms' if 'international_sms' in current_service.permissions else 'Allow to send international sms' }}
</a>
</li>
<li class="bottom-gutter">
{% if can_receive_inbound %}
<a href="{{ url_for('.service_set_inbound_number', service_id=current_service.id, set_inbound_sms=False) }}" class="button">

View File

@@ -1,5 +1,5 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/radios.html" import radios %}
{% from "components/page-footer.html" import page_footer %}
{% block service_page_title %}
@@ -11,28 +11,21 @@
<div class="grid-row">
<div class="column-five-sixths">
<h1 class="heading-large">International text messages</h1>
{% if 'international_sms' in current_service.permissions %}
<p>
Your service can send text messages to international phone numbers.
</p>
<p>
If you want to turn it off,
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
</p>
{% else %}
<p>
Sending text messages to international phone numbers is an
invitation&#8209;only feature.
</p>
<p>
If you want to try it out,
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
</p>
{% endif %}
{{ page_footer(
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
<p>
Messages to international mobile numbers are charged at 1, 2, or
3 times the cost of messages to UK mobile numbers.</p>
<p>
See <a href="{{ url_for(".pricing") }}">pricing</a> for the list
of rates.
</p>
<form method="post">
{{ radios(form.enabled) }}
{{ page_footer(
button_text="Save",
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</form>
</div>
</div>