mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 03:58:24 -04:00
Add a platform admin button to service-settings page to turn the inbound_sms messaging on and off.
If clicked you will be prompted to enter a sms sender number, when setting the permission on or off. Team members will always be able to see the number, but will only be able to change it if the inbound_sms permission is off.
This commit is contained in:
@@ -36,8 +36,13 @@
|
||||
|
||||
{% 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)) }}
|
||||
{{ text_field(current_service.sms_sender}}
|
||||
{% 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 %}
|
||||
|
||||
Reference in New Issue
Block a user