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
This commit is contained in:
Chris Hill-Scott
2018-10-26 17:31:49 +01:00
parent 526f2d7900
commit 1e2608d2e0
12 changed files with 199 additions and 159 deletions

View File

@@ -10,7 +10,7 @@
{% block maincolumn_content %}
<h1 class="heading-large">Set Inbound Number</h1>
{% if service_has_inbound_number %}
{% 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),