mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 21:51:43 -04:00
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
37 lines
1.1 KiB
HTML
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 %}
|