merged codes

This commit is contained in:
venusbb
2017-08-10 10:29:31 +01:00
parent 26ed24abb2
commit 050c68142b
6 changed files with 114 additions and 22 deletions

View File

@@ -53,9 +53,14 @@
{% if 'sms' in current_service.permissions %}
{% call row() %}
{{ text_field('Text message sender') }}
{{ text_field(current_service.sms_sender) }}
{% if current_user.has_permissions([], admin_override=True) or not can_receive_inbound %}
{% if can_receive_inbound %}
{{ text_field(inbound_number) }}
{% else %}
{{ text_field(current_service.sms_sender) }}
{% endif %}
{% if (current_user.has_permissions([], admin_override=True) or not can_receive_inbound) and 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('') }}
@@ -198,9 +203,15 @@
</a>
</li>
<li class="bottom-gutter">
{% if can_receive_inbound %}
<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' }}
Stop inbound sms
</a>
{% else %}
<a href="{{ url_for('.service_set_inbound_number', service_id=current_service.id, set_inbound_sms=True) }}" class="button">
Allow inbound sms
</a>
{% endif %}
</li>
{% endif %}
{% if current_service.active %}

View File

@@ -0,0 +1,33 @@
{% extends "withnav_template.html" %}
{% from "components/table.html" import text_field, edit_field %}
{% from "components/page-footer.html" import page_footer %}
{% block service_page_title %}
Inbound SMS Assigned Number
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Inbound SMS Assigned Nubmer</h1>
<p>
The following number has been assigned to your inbound sms service.
</p>
<p style="font-weight:bold;">
{{inbound_number}}
</p>
<p>
If you would like to continue and activate the inbound sms service, please click the confirm button.
</p>
<form method="post">
{{ page_footer(
'Confirm',
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</form>
{% endblock %}