mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Show all pages of a letter on the preview page
We’ve had a support ticket saying: > Hi, where a letter goes over to two sides, is there a way in the > 'Preview' screen (or anywhere else) that I can see page two? I can > see page one OK, but can't work out how to see what's generated on the > second page. Whether you’re about to send 1000s of letters – or just want to preview how one will look – it’s probably useful to be able to see more than just the first page.
This commit is contained in:
@@ -547,6 +547,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_
|
||||
) if not letters_as_pdf else None,
|
||||
email_reply_to=email_reply_to,
|
||||
sms_sender=sms_sender,
|
||||
page_count=get_page_count_for_letter(db_template),
|
||||
)
|
||||
recipients = RecipientCSV(
|
||||
contents,
|
||||
@@ -661,7 +662,7 @@ def check_messages_preview(service_id, template_id, upload_id, filetype, row_ind
|
||||
template = _check_messages(
|
||||
service_id, template_id, upload_id, row_index, letters_as_pdf=True
|
||||
)['template']
|
||||
return TemplatePreview.from_utils_template(template, filetype)
|
||||
return TemplatePreview.from_utils_template(template, filetype, page=request.args.get('page', 1))
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/start-job/<upload_id>", methods=['POST'])
|
||||
|
||||
Reference in New Issue
Block a user