Refactor page_count checks to avoid magic numbers

This commit is contained in:
Pea Tyczynska
2019-10-01 16:03:35 +01:00
parent 028d156dc7
commit b42c7c4c9f
7 changed files with 18 additions and 6 deletions

View File

@@ -66,7 +66,7 @@
help='3' if help else 0
)}}" class='page-footer'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
{% if not error and page_count < 11 %}
{% if not error and (not page_count or page_count <= letter_max_pages) %}
<button type="submit" class="button">Send 1 {{ message_count_label(1, template.template_type, suffix='') }}</button>
{% endif %}
{% if template.template_type == 'letter' %}