Use the new error messages when uploading a letter

We now use the pattern of showing a box at the top of the page with the
error. The error message has a heading and can have additional details.
Error messages and the invalid pages get stored in the S3 metadata.
This commit is contained in:
Katie Smith
2019-10-15 15:56:06 +01:00
parent 3223956ba2
commit 3b3f74bbf0
7 changed files with 122 additions and 43 deletions

View File

@@ -1111,8 +1111,8 @@ class PDFUploadForm(StripWhitespaceForm):
file = FileField_wtf(
'Upload a letter in PDF format',
validators=[
FileAllowed(['pdf'], 'Letters must be saved as a PDF'),
DataRequired(message="You need to upload a file to submit")
FileAllowed(['pdf'], 'Save your letter as a PDF and try again.'),
DataRequired(message="You need to choose a file to upload")
]
)