Refactor inbound api html and processing

This commit is contained in:
Ken Tsang
2017-06-20 13:24:01 +01:00
parent 5d5bb69f0e
commit 827c6ccc99
2 changed files with 54 additions and 18 deletions

View File

@@ -57,6 +57,17 @@
{{ edit_field('Change', url_for('.service_set_inbound_sms', service_id=current_service.id)) }}
{% endcall %}
{% if 'inbound_sms' in current_service.permissions %}
{% call row() %}
{{ text_field('API endpoint for received text messages') }}
{{ text_field(
'None' if not inbound_api_url else inbound_api_url,
status='' if inbound_api_url else 'default'
) }}
{{ edit_field('Change', url_for('.service_set_inbound_api', service_id=current_service.id)) }}
{% endcall %}
{% endif %}
{% call row() %}
{{ text_field('Letters') }}
{{ boolean_field(current_service.can_send_letters) }}
@@ -73,12 +84,6 @@
{% endcall %}
{% endif %}
{% call row() %}
{{ text_field('Inbound API') }}
{{ boolean_field(current_service.can_send_letters) }}
{{ edit_field('Change', url_for('.service_set_inbound_api', service_id=current_service.id)) }}
{% endcall %}
{% endcall %}
</div>