Skip to content

Commit 2a6a71d

Browse files
committed
added name and email of signer to the document in Document Visibility
1 parent a8e626e commit 2a6a71d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

public/demo_documents/doc_1.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
color: darkblue;">Order Processing Division</h2>
1212
<h4>Ordered by {USER_FULLNAME}</h4>
1313
<p style="margin-top:0em; margin-bottom:0em;">Email: {USER_EMAIL}</p>
14+
<p style="margin-top:0em; margin-bottom:0em;">Copy to: {CC_NAME}, {CC_EMAIL}</p>
1415
<p style="margin-top:3em;">
1516
Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
1617
</p>

src/Services/Examples/eSignature/SetDocumentsVisibilityService.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ private static function makeEnvelope(
9898
[
9999
'email_subject' => "Please sign this document set",
100100
'documents' => SetDocumentsVisibilityService::_prepareDocuments(
101+
$signer1Email,
102+
$signer1Name,
103+
$ccEmail,
104+
$ccName,
101105
$docPdf,
102106
$docDocx,
103107
$docHTML,
@@ -179,6 +183,10 @@ private static function _prepareSigners(
179183
}
180184

181185
private static function _prepareDocuments(
186+
string $signer1Email,
187+
string $signer1Name,
188+
string $ccEmail,
189+
string $ccName,
182190
string $docPdf,
183191
string $docDocx,
184192
string $docHTML,
@@ -187,6 +195,10 @@ private static function _prepareDocuments(
187195
$contentBytesPdf = file_get_contents($demoPath . $docPdf);
188196
$contentBytesDocx = file_get_contents($demoPath . $docDocx);
189197
$contentBytesHtml = file_get_contents($demoPath . $docHTML);
198+
$contentBytesHtml = str_replace("{USER_EMAIL}", $signer1Email, $contentBytesHtml);
199+
$contentBytesHtml = str_replace("{USER_FULLNAME}", $signer1Name, $contentBytesHtml);
200+
$contentBytesHtml = str_replace("{CC_EMAIL}", $ccEmail, $contentBytesHtml);
201+
$contentBytesHtml = str_replace("{CC_NAME}", $ccName, $contentBytesHtml);
190202

191203
$documentHTML = new Document(
192204
[

0 commit comments

Comments
 (0)