Files
notifications-admin/app/templates/views/uploads/preview.html
Katie Smith a542047581 Show recipient when about to send uploaded letter
The recipient of the letter now displays at the bottom of the page when
previewing a valid letter. The template preview `/precompiled/sanitise`
endpoint returns the address, but we format it to display on a single
line with commas between each line. We also need to convert the
recipient address to ASCII so that it can be stored as S3 metadata.
2019-11-08 10:17:11 +00:00

50 lines
1.5 KiB
HTML

{% extends "withnav_template.html" %}
{% from "components/banner.html" import banner_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/radios.html" import radios %}
{% block service_page_title %}
{{ original_filename }}
{% endblock %}
{% block maincolumn_content %}
{% if status == 'invalid' and message %}
{% include "partials/check/letter-validation-failed-banner.html" %}
{% elif current_service.trial_mode %}
{% call banner_wrapper(type='dangerous') %}
{% with
count_of_recipients=1
%}
{% include "partials/check/trying-to-send-letters-in-trial-mode.html" %}
{% endwith %}
{% endcall %}
{% else %}
{{ page_header(
original_filename,
back_link=url_for('main.upload_letter', service_id=current_service.id)
) }}
{% endif %}
<div class="letter-sent">
{{ template|string }}
</div>
{% if status == 'valid' and current_service.live %}
<div class="js-stick-at-bottom-when-scrolling">
<p>
Recipient: {{ recipient }}
</p>
<form method="post" enctype="multipart/form-data" action="{{url_for(
'main.send_uploaded_letter',
service_id=current_service.id,
)}}" class='page-footer'>
{{ radios(form.postage, hide_legend=true, inline=True) }}
{{ form.file_id(value=file_id) }}
{{ page_footer("Send 1 letter") }}
</form>
</div>
{% endif %}
{% endblock %}