From 579ae72abba0769341347576d6e367f8d0c23f49 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Fri, 27 Sep 2019 16:52:09 +0100 Subject: [PATCH] Do not allow to send a letter template longer than 10 pages --- app/main/views/templates.py | 1 + app/templates/views/templates/_template.html | 2 +- tests/app/main/views/test_templates.py | 24 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 7a5923e13..3a62d61fb 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -74,6 +74,7 @@ def view_template(service_id, template_id): ), template_postage=template["postage"], user_has_template_permission=user_has_template_permission, + page_count=get_page_count_for_letter(template), ) diff --git a/app/templates/views/templates/_template.html b/app/templates/views/templates/_template.html index a6d907a23..c46259faa 100644 --- a/app/templates/views/templates/_template.html +++ b/app/templates/views/templates/_template.html @@ -15,7 +15,7 @@