mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #3296 from alphagov/add-letter-specification-guidance
Add letter specification guidance
This commit is contained in:
@@ -21,8 +21,25 @@
|
|||||||
<li>Select <b class="govuk-!-font-weight-bold">Choose file</b>.</li>
|
<li>Select <b class="govuk-!-font-weight-bold">Choose file</b>.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<p>Use the <a href="{{ url_for('.letter_spec') }}">letter specification document</a> to help you set up your letter.<p>
|
<h2 class="heading-medium" id="letter-specification">Letter specification</h2>
|
||||||
|
|
||||||
|
<p>Your file must be:</p>
|
||||||
|
|
||||||
|
<ul class="list list-bullet">
|
||||||
|
<li>a PDF</li>
|
||||||
|
<li>A4 portrait size (210 × 297 mm)</li>
|
||||||
|
<li>10 pages or less</li>
|
||||||
|
<li>smaller than 2MB</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>The content of your letter must appear inside the printable area.</p>
|
||||||
|
|
||||||
|
<p>To help you set up your letter, you can download:</p>
|
||||||
|
|
||||||
|
<ul class="list list-bullet">
|
||||||
|
<li>our <a href="{{ url_for('.letter_spec') }}">letter specification document (PDF)</a></li>
|
||||||
|
<li>a <a href="https://docs.notifications.service.gov.uk/documentation/images/notify-pdf-letter-word-template-v1.0.docx">Microsoft Word document template (.docx)</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -33,8 +33,7 @@
|
|||||||
)}}
|
)}}
|
||||||
</p>
|
</p>
|
||||||
<p>You can upload a single letter as a PDF.</p>
|
<p>You can upload a single letter as a PDF.</p>
|
||||||
<p>Your file must meet our <a href="{{ url_for('.letter_spec') }}">letter specification</a>.</p>
|
<p>Your file must meet our <a href="{{ url_for('.upload_a_letter', _anchor='letter-specification') }}">letter specification</a>.</p>
|
||||||
<p>To help you set up your letter you can download a <a href="https://docs.notifications.service.gov.uk/documentation/images/notify-pdf-letter-word-template-v1.0.docx">Word document template</a>.</p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ LETTER_VALIDATION_MESSAGES = {
|
|||||||
'title': 'Your letter is not A4 portrait size',
|
'title': 'Your letter is not A4 portrait size',
|
||||||
'detail': (
|
'detail': (
|
||||||
'You need to change the size or orientation of {invalid_pages}. <br>'
|
'You need to change the size or orientation of {invalid_pages}. <br>'
|
||||||
'Files must meet our <a href="{letter_spec}" target="_blank">letter specification</a>.'
|
'Files must meet our <a href="{letter_spec_guidance}" target="_blank">letter specification</a>.'
|
||||||
),
|
),
|
||||||
'summary': (
|
'summary': (
|
||||||
'Validation failed because {invalid_pages} {invalid_pages_are_or_is} not A4 portrait size.<br>'
|
'Validation failed because {invalid_pages} {invalid_pages_are_or_is} not A4 portrait size.<br>'
|
||||||
@@ -582,7 +582,7 @@ LETTER_VALIDATION_MESSAGES = {
|
|||||||
'title': 'Your content is outside the printable area',
|
'title': 'Your content is outside the printable area',
|
||||||
'detail': (
|
'detail': (
|
||||||
'You need to edit {invalid_pages}.<br>'
|
'You need to edit {invalid_pages}.<br>'
|
||||||
'Files must meet our <a href="{letter_spec}" target="_blank">letter specification</a>.'
|
'Files must meet our <a href="{letter_spec_guidance}" target="_blank">letter specification</a>.'
|
||||||
),
|
),
|
||||||
'summary': (
|
'summary': (
|
||||||
'Validation failed because content is outside the printable area on {invalid_pages}.<br>'
|
'Validation failed because content is outside the printable area on {invalid_pages}.<br>'
|
||||||
@@ -618,7 +618,7 @@ LETTER_VALIDATION_MESSAGES = {
|
|||||||
'title': 'The address block is empty',
|
'title': 'The address block is empty',
|
||||||
'detail': (
|
'detail': (
|
||||||
'You need to add a recipient address.<br>'
|
'You need to add a recipient address.<br>'
|
||||||
'Files must meet our <a href="{letter_spec}" target="_blank">letter specification</a>.'
|
'Files must meet our <a href="{letter_spec_guidance}" target="_blank">letter specification</a>.'
|
||||||
),
|
),
|
||||||
'summary': (
|
'summary': (
|
||||||
'Validation failed because the address block is empty.<br>'
|
'Validation failed because the address block is empty.<br>'
|
||||||
@@ -650,7 +650,7 @@ def get_letter_validation_error(validation_message, invalid_pages=None, page_cou
|
|||||||
invalid_pages=invalid_pages,
|
invalid_pages=invalid_pages,
|
||||||
invalid_pages_are_or_is=invalid_pages_are_or_is,
|
invalid_pages_are_or_is=invalid_pages_are_or_is,
|
||||||
page_count=page_count,
|
page_count=page_count,
|
||||||
letter_spec=url_for('.letter_spec'),
|
letter_spec_guidance=url_for('.upload_a_letter')
|
||||||
),
|
),
|
||||||
'summary': LETTER_VALIDATION_MESSAGES[validation_message]['summary'].format(
|
'summary': LETTER_VALIDATION_MESSAGES[validation_message]['summary'].format(
|
||||||
invalid_pages=invalid_pages,
|
invalid_pages=invalid_pages,
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ def test_get_letter_validation_error_for_known_errors(
|
|||||||
|
|
||||||
assert detail.text == expected_content
|
assert detail.text == expected_content
|
||||||
if detail.select_one('a'):
|
if detail.select_one('a'):
|
||||||
assert detail.select_one('a')['href'] == url_for('.letter_spec')
|
assert detail.select_one('a')['href'] == url_for('.upload_a_letter')
|
||||||
assert detail.select_one('a')['target'] == '_blank'
|
assert detail.select_one('a')['target'] == '_blank'
|
||||||
|
|
||||||
assert summary.text == expected_summary
|
assert summary.text == expected_summary
|
||||||
|
|||||||
Reference in New Issue
Block a user