mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-30 02:50:03 -04:00
Added a send button which only appears on the page if the query string indicates that the PDF is valid. Before actually sending, we check that the service has the right permissions and that the metadata for the letter confirms the letter is valid (because the query string can be changed).
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
|
|
{% block service_page_title %}
|
|
{{ original_filename }}
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
{{ page_header(
|
|
original_filename,
|
|
back_link=url_for('main.upload_letter', service_id=current_service.id)
|
|
) }}
|
|
|
|
{% if status == 'invalid' %}
|
|
<p class="notification-status-cancelled" id="validation-error-message">
|
|
Validation failed
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div class="letter-sent">
|
|
{{ template|string }}
|
|
</div>
|
|
|
|
{% if status == 'valid' %}
|
|
<div class="js-stick-at-bottom-when-scrolling">
|
|
<form method="post" enctype="multipart/form-data" action="{{url_for(
|
|
'main.send_uploaded_letter',
|
|
service_id=current_service.id,
|
|
)}}" class='page-footer'>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<input type="hidden" name="filename" value="{{ original_filename }}" />
|
|
<input type="hidden" name="file_id" value="{{ file_id }}" />
|
|
<button type="submit" class="button">Send 1 letter</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|