Merge pull request #1300 from alphagov/inbound-sms-permission

Service setting for inbound sms
This commit is contained in:
Rebecca Law
2017-06-05 13:54:42 +01:00
committed by GitHub
6 changed files with 127 additions and 9 deletions

View File

@@ -37,7 +37,12 @@
{% call row() %}
{{ text_field('Text message sender') }}
{{ text_field(current_service.sms_sender) }}
{{ edit_field('Change', url_for('.service_set_sms_sender', service_id=current_service.id)) }}
{% if current_user.has_permissions([], admin_override=True) or not can_receive_inbound %}
{{ edit_field('Change', url_for('.service_set_sms_sender', service_id=current_service.id, set_inbound_sms=False)) }}
{% else %}
{{ text_field('') }}
{% endif %}
{% endcall %}
{% call row() %}
@@ -162,6 +167,11 @@
</a>
</li>
{% endif %}
<li class="bottom-gutter">
<a href="{{ url_for('.service_set_sms_sender', service_id=current_service.id, set_inbound_sms=True) }}" class="button">
{{ 'Stop inbound sms' if can_receive_inbound else 'Allow inbound sms' }}
</a>
</li>
</ul>
{% endif %}