mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
Add letter validation preview functionality
- add get/post view - create a pdf upload form - add a template where user can upload the file - check boundaries of the letter by calling template-preview - display banner messages with boundaries validation result - display pages of the document, with visible boundaries overlay if the document did not pass validation, and without overlay if they do pass validation
This commit is contained in:
@@ -766,6 +766,13 @@ class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
||||
)
|
||||
|
||||
|
||||
class PDFUploadForm(StripWhitespaceForm):
|
||||
file = FileField_wtf(
|
||||
'Upload a letter in PDF format to check if it fits in the printable area',
|
||||
validators=[FileAllowed(['pdf'], 'PDF documents only!')]
|
||||
)
|
||||
|
||||
|
||||
class CreateOrUpdateOrganisation(StripWhitespaceForm):
|
||||
|
||||
name = StringField('Name', validators=[DataRequired()])
|
||||
|
||||
Reference in New Issue
Block a user