mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-01 06:30:56 -04:00
50 lines
1.9 KiB
HTML
50 lines
1.9 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/radios.html" import radio_select %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
|
|
{% block service_page_title %}
|
|
{{ "Error" if error else "Preview" }}
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
{% if error == 'not-allowed-to-send-to' %}
|
|
{% with
|
|
count_of_recipients=1,
|
|
template_type_label='phone number'
|
|
%}
|
|
{% include "partials/check/not-allowed-to-send-to.html" %}
|
|
{% endwith %}
|
|
{% elif error == 'too-many-messages' %}
|
|
{% include "partials/check/too-many-messages.html" %}
|
|
{% elif error == 'message-too-long' %}
|
|
{# the only row_errors we can get when sending one off messages is that the message is too long #}
|
|
{% include "partials/check/message-too-long.html" %}
|
|
{% else %}
|
|
<h1 class="heading-large">
|
|
Preview of {{ template.name }}
|
|
</h1>
|
|
{% endif %}
|
|
|
|
{{ template|string }}
|
|
|
|
<div class="bottom-gutter-3-2">
|
|
<form method="post" enctype="multipart/form-data" action="{{url_for(
|
|
'main.send_notification',
|
|
service_id=current_service.id,
|
|
template_id=template.id,
|
|
help='3' if help else 0
|
|
)}}" class='page-footer'>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
{% if not error %}
|
|
{% if template.template_type != 'letter' or not request.args.from_test %}
|
|
<input type="submit" class="button" value="Send 1 {{ message_count_label(1, template.template_type, suffix='') }}" />
|
|
{% else %}
|
|
<a href="{{ url_for('main.check_messages_preview', service_id=current_service.id, template_type=template.template_type, upload_id=upload_id, filetype='pdf') }}" download="download" class="button">Download as a printable PDF</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock %}
|