{% extends "withnav_template.html" %} {% from "components/banner.html" import banner %} {% from "components/ajax-block.html" import ajax_block %} {% from "components/message-count-label.html" import message_count_label %} {% from "components/page-footer.html" import page_footer %} {% block service_page_title %} {{ message_count_label(1, template.template_type, suffix='') | capitalize }} {% endblock %} {% block maincolumn_content %}

{{ message_count_label(1, template.template_type, suffix='') | capitalize }}

{% if is_precompiled_letter %} Provided as PDF {% else %} {% if help %} ‘{{ template.name }}’ {% else %} ‘{{ template.name }}’ {% endif %} was sent {% endif %} {% if job and job.original_file_name != 'Report' %} {% set destination = {'letter': 'an address', 'email': 'an email address', 'sms': 'a phone number'} %} to {{ destination[template.template_type] }} from {{ job.original_file_name }} {% elif created_by %} by {{ created_by.name }} {% endif %} on {{ created_at|format_datetime_short }}

{% if template.template_type == 'letter' %} {% if notification_status in ('permanent-failure', 'cancelled') %}

Cancelled {{ updated_at|format_datetime_short }}

{% elif notification_status == 'validation-failed' %}

Validation failed – content is outside the printable area

{% elif notification_status == 'technical-failure' %}

Technical failure – Notify will resend once the team have fixed the problem

{% else %} {% if sent_with_test_key %} {% if is_precompiled_letter %}

This letter passed our checks, but we will not print it because you used a test key.

{% else %}

We will not print this letter because you used a test key.

{% endif %} {% else %}

{{ letter_print_day }}

Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}

{% endif %} {% endif %} {% endif %}
{{ template|string }}
{% if template.template_type == 'letter' %}
{% elif template.template_type == 'email' %}
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
{% elif template.template_type == 'sms' %} {{ ajax_block(partials, updates_url, 'status', finished=finished) }} {% endif %} {% if current_user.has_permissions('send_messages') and current_user.has_permissions('view_activity') and template.template_type == 'sms' and can_receive_inbound %}

See all text messages sent to this phone number

{% endif %} {% endblock %}