diff --git a/app/main/views/index.py b/app/main/views/index.py index 8eb1b6584..7f21ac340 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -17,7 +17,11 @@ from app.main import main from app.main.forms import FieldWithNoneOption, SearchByNameForm from app.main.views.feedback import QUESTION_TICKET_TYPE from app.main.views.sub_navigation_dictionaries import features_nav, pricing_nav -from app.utils import get_logo_cdn_domain, user_is_logged_in +from app.utils import ( + LETTER_SPECIFICATION_URL, + get_logo_cdn_domain, + user_is_logged_in, +) @main.route('/') @@ -269,6 +273,7 @@ def features_sms(): def features_letters(): return render_template( 'views/features/letters.html', + letter_specification_url=LETTER_SPECIFICATION_URL, navigation_links=features_nav() ) diff --git a/app/main/views/uploads.py b/app/main/views/uploads.py index fcbd64ef0..a403e76cc 100644 --- a/app/main/views/uploads.py +++ b/app/main/views/uploads.py @@ -33,6 +33,7 @@ from app.s3_client.s3_letter_upload_client import ( ) from app.template_previews import TemplatePreview, sanitise_letter from app.utils import ( + LETTER_SPECIFICATION_URL, generate_next_dict, generate_previous_dict, get_letter_validation_error, @@ -65,6 +66,7 @@ def uploads(service_id): prev_page=prev_page, next_page=next_page, scheduled_jobs='', + letter_specification_url=LETTER_SPECIFICATION_URL, ) diff --git a/app/templates/views/features/letters.html b/app/templates/views/features/letters.html index 6c5a40c2b..12bd5112f 100644 --- a/app/templates/views/features/letters.html +++ b/app/templates/views/features/letters.html @@ -33,7 +33,7 @@

Upload your own letters

You can create reusable letter templates in Notify, or upload and send your own letters with the Notify API.

-

Use the letter specification document to help you set up your letter, save it as a PDF, then upload it to Notify.

+

Use the letter specification document to help you set up your letter, save it as a PDF, then upload it to Notify.

Read our API documentation for more information.

Pricing

diff --git a/app/templates/views/uploads/choose-file.html b/app/templates/views/uploads/choose-file.html index 855134988..0593157e8 100644 --- a/app/templates/views/uploads/choose-file.html +++ b/app/templates/views/uploads/choose-file.html @@ -33,7 +33,7 @@ )}}

You can upload a single letter as a PDF.

-

Your file must meet our letter specification.

+

Your file must meet our letter specification.

To help you set up your letter you can download a Word document template.

diff --git a/app/utils.py b/app/utils.py index bacce22b8..171734519 100644 --- a/app/utils.py +++ b/app/utils.py @@ -566,21 +566,25 @@ def get_letter_printing_statement(status, created_at): return 'Printed on {} at 5:30pm'.format(printed_date) +LETTER_SPECIFICATION_URL = ( + 'https://docs.notifications.service.gov.uk' + '/documentation/images/notify-pdf-letter-spec-v2.4.pdf' +) + + LETTER_VALIDATION_MESSAGES = { 'letter-not-a4-portrait-oriented': { 'title': 'Your letter is not A4 portrait size', 'detail': ( 'You need to change the size or orientation of {invalid_pages}.
' - 'Files must meet our letter specification.' + f'Files must meet our letter specification.' ), }, 'content-outside-printable-area': { 'title': 'Your content is outside the printable area', 'detail': ( 'You need to edit {invalid_pages}.
' - 'Files must meet our letter specification.' + f'Files must meet our letter specification.' ), }, 'letter-too-long': { @@ -604,8 +608,7 @@ LETTER_VALIDATION_MESSAGES = { 'title': 'The address block is empty', 'detail': ( 'You need to add a recipient address.
' - 'Files must meet our letter specification.' + f'Files must meet our letter specification.' ), } }