Added template ID to template page, to allow users to identity required data for API calls.

This commit is contained in:
Martyn Inglis
2016-01-22 12:44:19 +00:00
parent d7f3cccbc5
commit fb3b6510c4
3 changed files with 4 additions and 2 deletions

View File

@@ -56,7 +56,7 @@
Current service
</summary>
<div>
<a href="{{ url_for('main.choose_service') }}">Switch service</a>
<a href="{{ url_for('main.choose_service') }}">Switch service</a>
<a href="{{ url_for('.add_service') }}">Add a new service to GOV.UK Notify</a>
</div>
</details>

View File

@@ -1,11 +1,12 @@
{% macro sms_message(
body, recipient=None, name=None, edit_link=None, input_name=None, input_index=None
body, recipient=None, name=None, id=None, edit_link=None, input_name=None, input_index=None
) %}
{% if input_name %}
<label class="sms-message-option" for="{{ input_name }}-{{ input_index }}">
{% endif %}
{% if name %}
<h3 class="sms-message-name">
ID: {{ id }}
{% if edit_link %}
<a href="{{ edit_link }}">{{ name }}</a>
{% else %}

View File

@@ -22,6 +22,7 @@ GOV.UK Notify | Manage templates
{{ sms_message(
template.get_field('content'),
name=template.title,
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' %}