Harmonise content of error message with the document laid out by our content designer

This commit is contained in:
Pea Tyczynska
2019-10-16 13:02:11 +01:00
parent 2ed1e382b4
commit 4b5a131072
3 changed files with 10 additions and 3 deletions

View File

@@ -596,6 +596,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_
),
letter_too_long=is_letter_too_long(page_count),
letter_max_pages=LETTER_MAX_PAGE_COUNT,
page_count=page_count
)
@@ -890,6 +891,7 @@ def _check_notification(service_id, template_id, exception=None):
help=get_help_argument(),
letter_too_long=is_letter_too_long(page_count),
letter_max_pages=LETTER_MAX_PAGE_COUNT,
page_count=page_count,
**(get_template_error_dict(exception) if exception else {}),
)

View File

@@ -60,6 +60,8 @@ def view_template(service_id, template_id):
'.send_one_off', service_id=service_id, template_id=template_id
))
page_count = get_page_count_for_letter(template)
return render_template(
'views/templates/template.html',
template=get_template(
@@ -76,8 +78,9 @@ def view_template(service_id, template_id):
),
template_postage=template["postage"],
user_has_template_permission=user_has_template_permission,
letter_too_long=is_letter_too_long(get_page_count_for_letter(template)),
letter_too_long=is_letter_too_long(page_count),
letter_max_pages=LETTER_MAX_PAGE_COUNT,
page_count=page_count
)