Add link to cancel letters

Added a link to cancel letters from the letter notification pages if the
letter is still able to be cancelled. Clicking on this link will show a
confirmation box, and will then cancel the letter if the user confirms.
This commit is contained in:
Katie Smith
2018-12-05 10:58:27 +00:00
parent 429a23934d
commit 5406efa0cc
6 changed files with 173 additions and 3 deletions

View File

@@ -64,7 +64,13 @@
{% if template.template_type == 'letter' %}
<div class="js-stick-at-bottom-when-scrolling">
<div class="page-footer">
<div>&nbsp;</div>
{% if show_cancel_button %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('main.cancel_letter', service_id=current_service.id, notification_id=notification_id) }}">Cancel sending this letter</a>
</span>
{% else %}
<div>&nbsp;</div>
{% endif %}
<a class="page-footer-right-aligned-link" href="{{ url_for('main.view_letter_notification_as_preview', service_id=current_service.id, notification_id=notification_id, filetype='pdf') }}" download>Download as a PDF</a>
</div>
</div>