diff --git a/app/templates/views/check-sms.html b/app/templates/views/check-sms.html
index 2a61a83f2..d4b761075 100644
--- a/app/templates/views/check-sms.html
+++ b/app/templates/views/check-sms.html
@@ -17,14 +17,14 @@
{% for rejected in upload_result.rejects %}
{% for template in templates %}
- {% if template.get_field('template_type') == 'sms' %}
- {{ 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' %}
+ {% if template.template_type == 'email' %}
{{ email_message(
template.get_field('subject'),
template.get_field('content'),
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=service_id, template_id=template.id)
+ ) }}
+ {% else %}
+ {{ sms_message(
+ template.formatted_as_markup,
+ name=template.name,
+ id=template.id,
+ edit_link=url_for('.edit_service_template', service_id=service_id, template_id=template.id)
) }}
{% endif %}
{% endfor %}
diff --git a/app/templates/views/send-sms.html b/app/templates/views/send-sms.html
index 66f7491ee..c43c52265 100644
--- a/app/templates/views/send-sms.html
+++ b/app/templates/views/send-sms.html
@@ -2,6 +2,7 @@
{% from "components/sms-message.html" import sms_message %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/file-upload.html" import file_upload %}
+{% from "components/table.html" import list_table %}
{% block page_title %}
Send text messages – GOV.UK Notify
@@ -32,5 +33,20 @@
"Continue to preview"
) }}
+ {% if column_headers %}
+ {% call(item) list_table(
+ [],
+ caption='Preview',
+ field_headings=column_headers,
+ field_headings_visible=True,
+ caption_visible=False,
+ empty_message="Your data here"
+ ) %}
+ {% endcall %}
+ {% endif %}
+
+ Download this CSV file
+
+
{% endblock %}
diff --git a/requirements.txt b/requirements.txt
index 2c5fed09d..631ea6965 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,4 +14,4 @@ Pygments==2.0.2
git+https://github.com/alphagov/notifications-python-client.git@0.2.5#egg=notifications-python-client==0.2.5
-git+https://github.com/alphagov/notifications-utils.git@0.0.3#egg=notifications-utils==0.0.3
+git+https://github.com/alphagov/notifications-utils.git@0.1.0#egg=notifications-utils==0.1.0
diff --git a/tests/app/main/views/test_sms.py b/tests/app/main/views/test_sms.py
index 9f4c4c158..57af2f99e 100644
--- a/tests/app/main/views/test_sms.py
+++ b/tests/app/main/views/test_sms.py
@@ -8,9 +8,8 @@ def test_choose_sms_template(app_,
api_user_active,
mock_login,
mock_get_user,
- mock_get_service_templates,
mock_check_verify_code,
- mock_get_service_template):
+ mock_get_service_templates):
with app_.test_request_context():
with app_.test_client() as client:
client.login(api_user_active)