Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions README.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ This app turns a Frappe web form into a signing page. You send the signer a link
- A **Send for eSign** button on the document, with a dialog that sends the link using an eSign email template.
- A signature dialog with three ways to sign: draw, type in one of four script fonts, or upload an image.
- A signed PDF in the web form's print format, attached to the document with its SHA-256 hash.
- An audit trail in the document timeline: the signer's name and email, IP address and browser, the time, the fields signed and the PDF hash. Guest signers are named by what they type into the form's signer name and email fields.
- An audit trail in the document timeline: the signer's name and email, IP address and browser, the time, the fields signed, the consent they gave and the PDF hash. Guest signers are named by what they type into the form's signer name and email fields.
- Recipient-bound links: a link emailed to one recipient carries a signed binding of their address, so the audit trail records the email as verified via the recipient link. **Require Verified Email** signs only through such links and locks the email field to the bound address. The binding stays in the email to the recipient: the Communication on the document and the link the sender gets back leave it out.
- A required "I agree to sign this document electronically" consent checkbox, with text you can change per web form.
- Optional actions after signing: set a field, submit the document, and send a notification with the signed PDF attached.

## Setting it up

1. Give the DocType a **Signature** field.
2. Create a **Web Form** for it, tick **Enable eSign**, and add the Signature field and anything else the signer fills in, such as their name and email. In the **Signer** section, pick those fields as the **Signer Name Field** and **Signer Email Field** so the audit trail names the signer.
2. Create a **Web Form** for it, tick **Enable eSign**, and add the Signature field and anything else the signer fills in, such as their name and email. In the **Signer** section, pick those fields as the **Signer Name Field** and **Signer Email Field** so the audit trail names the signer. Tick **Require Verified Email** to sign only through links emailed to each signer, and set **Consent Text** to replace the default consent.
3. Create an **Email Template** with **eSign Request** ticked.
4. Open a document and click **Send for eSign**.

Expand Down
Binary file modified docs/screenshots/audit-trail-dark.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/audit-trail-light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions docs/screenshots/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
{
"name": "audit-trail",
"theme": "dark",
"alt": "A signed agreement's timeline: the eSign card naming the signer, with the PDF's SHA-256 hash, the signer's email, IP address, web form, signed fields and browser",
"alt": "A signed agreement's timeline: the eSign card naming the signer, with the PDF's SHA-256 hash, the signer's email verified via the recipient link, IP address, web form, signed fields, the consent they gave and their browser",
"featured": true,
"readme": "feature",
"width": 2880,
"height": 1800,
"sha256": "98f589f2a6959029e303ac189efc2a188adab504c42521b4708ff032366ad624"
"sha256": "5d2f4e87994ac946b46404a0b8d9674d10adc4d22782a5506eba32f0551fc24a"
},
{
"name": "audit-trail",
"theme": "light",
"alt": "A signed agreement's timeline: the eSign card naming the signer, with the PDF's SHA-256 hash, the signer's email, IP address, web form, signed fields and browser",
"alt": "A signed agreement's timeline: the eSign card naming the signer, with the PDF's SHA-256 hash, the signer's email verified via the recipient link, IP address, web form, signed fields, the consent they gave and their browser",
"featured": true,
"readme": "feature",
"width": 2880,
"height": 1800,
"sha256": "5efc1116a089533a39a51dbb8fa5ce0ba5765c8d8f2d26c42e023dd1d12e5eb8"
"sha256": "9bb1ac88c670c30261f09b3dfb133fd5b6c3be8fc84c9e65d8635ed72769cb7b"
},
{
"name": "send-for-esign",
Expand Down Expand Up @@ -47,36 +47,36 @@
"readme": "feature",
"width": 2880,
"height": 1800,
"sha256": "603ff331d5a97039835ad75ba8ec0eb0d2159b943cc324bd112d9f098456d615"
"sha256": "7026bc844d96102e6e4876861fc1085293c3254ee3604b17c86854b3f7ac7375"
},
{
"name": "signer-settings",
"theme": "dark",
"alt": "The eSign web form's settings: Submit on Response, Set Property After Response, and the Signer Name Field and Signer Email Field that name the form fields the audit trail records",
"alt": "The eSign web form's settings: Submit on Response, Set Property After Response, the Signer Name Field and Signer Email Field that name the form fields the audit trail records, Require Verified Email and the Consent Text",
"featured": false,
"readme": "feature",
"width": 2880,
"height": 1800,
"sha256": "73c89ccda81ba499cc663a196e2207d29c82bef378399ea5867be9d269c04445"
"sha256": "05376313cf29c36c41140e6d4b0c3c6f608560c4fe686f06685d4e7f96e76b33"
},
{
"name": "signer-settings",
"theme": "light",
"alt": "The eSign web form's settings: Submit on Response, Set Property After Response, and the Signer Name Field and Signer Email Field that name the form fields the audit trail records",
"alt": "The eSign web form's settings: Submit on Response, Set Property After Response, the Signer Name Field and Signer Email Field that name the form fields the audit trail records, Require Verified Email and the Consent Text",
"featured": false,
"readme": "feature",
"width": 2880,
"height": 1800,
"sha256": "c65e2399ef5c33db0982a7501a25966c6666530bb38dadc5949bd53b8706e3b0"
"sha256": "546f0a7ad679e901565ba94365e28abde6417ed73b406040bb470b8dd840d409"
},
{
"name": "signing-page",
"theme": "light",
"alt": "The signing page: the agreement in its print format, and the signer's name, email and typed signature in the form beside it",
"alt": "The signing page: the agreement in its print format, and the signer's name, email, typed signature and the ticked consent to sign electronically in the form beside it",
"featured": true,
"readme": "hero",
"width": 2880,
"height": 1800,
"sha256": "ad6b040f312549de8ea5c5684fc65849c887b8c7202825cadb339658f3ddf584"
"sha256": "84408b76e1c636252a09178dcc086067c03875fd295899957179c7445438b989"
}
]
Binary file modified docs/screenshots/signature-pad-light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/signer-settings-dark.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/signer-settings-light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/signing-page-light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 16 additions & 4 deletions esign_webforms/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
from frappe.utils.pdf import get_pdf
from PIL import Image, ImageDraw

from esign_webforms.esign.custom.web_form import AuditData, RequestData, record_signature
from esign_webforms.esign.custom.web_form import (
DEFAULT_CONSENT_TEXT,
VERIFIED_VIA_LINK,
AuditData,
RequestData,
record_signature,
)

DOCTYPE = "Service Agreement"
PRINT_FORMAT = "Service Agreement"
Expand Down Expand Up @@ -82,9 +88,9 @@
<p>Use the button below to read it and sign it on any device.</p>"""

# The signing request and signer the signed agreement's audit record describes: a guest,
# named by what they typed into the web form's Signer Name and Signer Email fields. The values
# are the ones the signing page records (_collect_audit_data); 203.0.113.0/24 is a
# documentation range.
# named by what they typed into the web form's Signer Name field, with the email the signing
# link was bound to. The values are the ones the signing page records (_collect_audit_data);
# 203.0.113.0/24 is a documentation range.
SIGNER_EMAIL = "dana.whitfield@example.com"
SIGNER_AGENT = (
"Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 "
Expand Down Expand Up @@ -420,6 +426,12 @@ def _sign(name: str, today: datetime.date) -> None:
"user_agent": SIGNER_AGENT,
"signer_email": SIGNER_EMAIL,
"signer_name": "Dana Whitfield",
# Dana opened the link Send for eSign emailed to her alone, which bound her address.
"signer_email_verified": True,
"verified_via": VERIFIED_VIA_LINK,
"verified_email": SIGNER_EMAIL,
"consent_text": DEFAULT_CONSENT_TEXT,
"consent_timestamp": f"{today.isoformat()} 10:42:09",
"web_form": "Service Agreement",
"print_format": PRINT_FORMAT,
"signed_fields": ["Signature"],
Expand Down
Loading
Loading