mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Harmonise content of error message with the document laid out by our content designer
This commit is contained in:
@@ -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_too_long=is_letter_too_long(page_count),
|
||||||
letter_max_pages=LETTER_MAX_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(),
|
help=get_help_argument(),
|
||||||
letter_too_long=is_letter_too_long(page_count),
|
letter_too_long=is_letter_too_long(page_count),
|
||||||
letter_max_pages=LETTER_MAX_PAGE_COUNT,
|
letter_max_pages=LETTER_MAX_PAGE_COUNT,
|
||||||
|
page_count=page_count,
|
||||||
**(get_template_error_dict(exception) if exception else {}),
|
**(get_template_error_dict(exception) if exception else {}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ def view_template(service_id, template_id):
|
|||||||
'.send_one_off', service_id=service_id, template_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(
|
return render_template(
|
||||||
'views/templates/template.html',
|
'views/templates/template.html',
|
||||||
template=get_template(
|
template=get_template(
|
||||||
@@ -76,8 +78,9 @@ def view_template(service_id, template_id):
|
|||||||
),
|
),
|
||||||
template_postage=template["postage"],
|
template_postage=template["postage"],
|
||||||
user_has_template_permission=user_has_template_permission,
|
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,
|
letter_max_pages=LETTER_MAX_PAGE_COUNT,
|
||||||
|
page_count=page_count
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send a letter that's too long" data-error-label="{{ upload_id }}">
|
<h1 class='banner-title' data-module="track-error" data-error-type="Trying to send a letter that's too long" data-error-label="{{ upload_id }}">
|
||||||
This letter is too long
|
Your letter is too long
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
Letters must be {{ letter_max_pages }} pages or fewer
|
Letters must be {{ letter_max_pages }} pages or less.
|
||||||
|
<br>
|
||||||
|
Your letter is {{ page_count }} pages long.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user