Can't cancel letter job if job not processed yet

Also add more tests for showing or not the cancel those letters link

Also check if all notifications already in database

Upgrade delete button text logic to handle more cases

Also corrections following review
This commit is contained in:
Pea Tyczynska
2019-06-24 17:57:04 +01:00
parent 4a679a6583
commit 0118787a56
4 changed files with 118 additions and 19 deletions

View File

@@ -25,11 +25,7 @@
<div class="js-stick-at-bottom-when-scrolling">
<div class="page-footer">
<span class="page-footer-delete-link page-footer-delete-link-without-button">
{% if can_cancel_letter_job == True %}
<a href="{{ url_for('main.cancel_letter_job', service_id=current_service.id, job_id=job_id) }}">Cancel sending those letters</a>
{% else %}
<p> Can't cancel: {{ can_cancel_letter_job }} </p>
{% endif %}
<a href="{{ url_for('main.cancel_letter_job', service_id=current_service.id, job_id=job_id) }}">Cancel sending these letters</a>
</span>
{% else %}
<div>&nbsp;</div>