Add Optional Signature Lines to Distribution PDF
Resolves #4312
Description
Some organizations want to include signature fields on their distribution pdf printouts. We want to make this optional for organizations to toggle this setting on or off on their own so they don't have to use comments as a work around.
- Adds a new boolean database field to organizations to add the option to show signature lines on their distribution pdfs (default is false)
- Updates the organization show/edit views to include this new field
- Updates the distribution pdf to append the signature lines based on the value of this flag
Type of change
- New feature (non-breaking change which adds functionality)
How Has This Been Tested?
- I've tested this locally manually by ensuring that I can enable/disable this setting on the organization edit page and that the change is reflected on the pdf
- I've updated the organization request specs in 2 important ways
- I've removed the double for the pdf so it actually renders
- I've added a new case for the print endpoint to ensure it is still successful when the flag is set to true
Screenshots
Organization show view
Organization edit view
PDF with Signature fields included
Alas I spoke too soon -- I didnt initially test the border case where the signatures could potentially span pages. They shouldn't, though. Sample Distribution pdf.pdf
Ah that makes sense. I'll dig into prawn to see if there's a way to ensure this doesn't happen.
@cielf I've gone ahead and addressed the edge case. Here's the results:
Before:
After:
Very nearly there, but it would be good if the signature lines cleared the "Lovingly created" at the bottom in all cases. Pawnee Pregnancy Center 2024-05-08.pdf The failing tests are unrelated. I'm pretty sure they've been fixed on main.
@cielf This should be ready to test again, I've adjusted the margin so it now accounts for the footer
Manual testing looks good -- but it looks to me like you have tests failing that are related to this work...
@cielf Ah yes it looks like a recent merge broke my test. It should be updated now.