mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Add letter upload form which redirects to blank preview page
Added a form to upload a single letter. Currently this only uses the form to validate that a file is submitted and that the file is a PDF. If either of these validations fail, the form will display an error. Otherwise, we redirect to a new preview page which just has the filename as the heading for now.
This commit is contained in:
@@ -1109,9 +1109,9 @@ class ServiceLetterBrandingDetails(StripWhitespaceForm):
|
||||
|
||||
class PDFUploadForm(StripWhitespaceForm):
|
||||
file = FileField_wtf(
|
||||
'Upload a letter in PDF format to check if it fits in the printable area',
|
||||
'Upload a letter in PDF format',
|
||||
validators=[
|
||||
FileAllowed(['pdf'], 'PDF documents only!'),
|
||||
FileAllowed(['pdf'], 'Letters must be saved as a PDF'),
|
||||
DataRequired(message="You need to upload a file to submit")
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user