Files
notifications-admin/app/templates/views/service-settings/set-inbound-number.html
Chris Hill-Scott 1e2608d2e0 Refactor settings page to use service model
There’s a lot of code in service settings which:
- talks to the API directly through the clients
- passes that information through to the Jinja template

By encapsulating this logic in the service model:
- the Jinja template can access the data directly
- the logic can be reused across multiple methods
2018-10-30 15:07:52 +00:00

37 lines
1.1 KiB
HTML

{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/radios.html" import radios%}
{% from "components/form.html" import form_wrapper %}
{% block service_page_title %}
Set Inbound Number
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Set Inbound Number</h1>
{% if current_service.has_inbound_number %}
<p> This service already has an inbound number </p>
{{ page_footer(
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
{% elif no_available_numbers %}
<p> No available inbound numbers </p>
{{ page_footer(
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
{% else %}
{% call form_wrapper() %}
{{ radios(form.inbound_number) }}
{{ page_footer(
'Save',
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back'
) }}
{% endcall %}
{% endif %}
{% endblock %}