Added fixes, displaying templates still needs to be fixed.

This commit is contained in:
Nicholas Staples
2016-01-22 11:14:56 +00:00
parent 64af225d2d
commit bb853ee95a
4 changed files with 22 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ GOV.UK Notify | Edit template
<form method="post">
{{ textbox(form.name) }}
{{ textbox(form.template_type) }}
{{ textbox(form.content, highlight_tags=True) }}
{{ page_footer(
'Save',

View File

@@ -18,18 +18,18 @@ GOV.UK Notify | Manage templates
<a href="{{ url_for('.add_service_template', service_id=service_id) }}">Create new template</a>
{% for template in templates %}
{% if template.type == 'sms' %}
{% if template.get_field('template_type') == 'sms' %}
{{ sms_message(
template.content,
name=template.name,
edit_link=url_for('.edit_service_template', service_id=template.service, template_id=template.id)
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
) }}
{% elif template.type == 'email' %}
{% elif template.get_field('template_type') == 'email' %}
{{ email_message(
"template subject",
template.content,
name=template.name,
edit_link=url_for('.edit_service_template', service_id=template.service, template_id=template.id)
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
) }}
{% endif %}
{% endfor %}