mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 03:13:12 -04:00
Fixed viewing templates.
This commit is contained in:
@@ -14,7 +14,6 @@ from client.errors import HTTPError
|
|||||||
def manage_service_templates(service_id):
|
def manage_service_templates(service_id):
|
||||||
try:
|
try:
|
||||||
templates = tdao.get_service_templates(service_id)['data']
|
templates = tdao.get_service_templates(service_id)['data']
|
||||||
print(templates)
|
|
||||||
except HTTPError as e:
|
except HTTPError as e:
|
||||||
if e.status_code == 404:
|
if e.status_code == 404:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<div>
|
<div>
|
||||||
<a href="#">Switch to A N Other service</a>
|
<a href="#">Switch to A N Other service</a>
|
||||||
<a href="{{ url_for('.add_service') }}">Add a new service to GOV.UK Notify</a>
|
<a href="{{ url_for('main.add_service') }}">Add a new service to GOV.UK Notify</a>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ GOV.UK Notify | Manage templates
|
|||||||
{% for template in templates %}
|
{% for template in templates %}
|
||||||
{% if template.get_field('template_type') == 'sms' %}
|
{% if template.get_field('template_type') == 'sms' %}
|
||||||
{{ sms_message(
|
{{ sms_message(
|
||||||
template.content,
|
template.get_field('content'),
|
||||||
name=template.name,
|
name=template.title,
|
||||||
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
|
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
|
||||||
) }}
|
) }}
|
||||||
{% elif template.get_field('template_type') == 'email' %}
|
{% elif template.get_field('template_type') == 'email' %}
|
||||||
{{ email_message(
|
{{ email_message(
|
||||||
"template subject",
|
template.get_field('subject'),
|
||||||
template.content,
|
template.get_field('content'),
|
||||||
name=template.name,
|
name=template.get_field('name'),
|
||||||
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
|
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
|
||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user