|
20 | 20 | */ |
21 | 21 | const embedClickwrap = async (args) => { |
22 | 22 | // Step 3. Construct the request Body |
23 | | - // Create display settings model |
24 | | - // const displaySettings = docusignClick.DisplaySettings.constructFromObject({ |
25 | | - // consentButtonText: "I Agree", |
26 | | - // displayName: "Terms of Service", |
27 | | - // downloadable: true, |
28 | | - // format: "modal", |
29 | | - // hasAccept: true, |
30 | | - // mustRead: true, |
31 | | - // requireAccept: true, |
32 | | - // documentDisplay: "document", |
33 | | - // // fullName: args.fullName, |
34 | | - // // email: args.email, |
35 | | - // // company: args.company, |
36 | | - // // title: args.title, |
37 | | - // // date: args.date, |
38 | | - // }); |
39 | | - |
40 | | - // Create document model |
41 | | - // Read and encode file. Put encoded value to Document entity. |
42 | | - // The reads could raise an exception if the file is not available! |
43 | | - // const documentPdfExample = fs.readFileSync(args.docFile); |
44 | | - // const encodedExampleDocument = |
45 | | - // Buffer.from(documentPdfExample).toString("base64"); |
46 | | - // const document = docusignClick.Document.constructFromObject({ |
47 | | - // documentBase64: encodedExampleDocument, |
48 | | - // documentName: "Terms of Service", |
49 | | - // fileExtension: "pdf", |
50 | | - // // fullName: args.fullName, |
51 | | - // // email: args.email, |
52 | | - // // company: args.company, |
53 | | - // // title: args.title, |
54 | | - // // date: args.date, |
55 | | - // order: 0, |
56 | | - |
57 | | - // }); |
58 | | - |
59 | | - // Create clickwrapRequest model |
60 | | - // const clickwrapRequest = docusignClick.ClickwrapRequest.constructFromObject({ |
61 | | - // displaySettings, |
62 | | - // documents: [document], |
63 | | - // name: args.clickwrapName, |
64 | | - // requireReacceptance: true, |
65 | | - // }); |
66 | | - |
67 | 23 | const documentArgs = { |
68 | 24 | fullName: args.documentArgs.fullName, |
69 | 25 | email: args.documentArgs.email, |
|
83 | 39 | title: documentArgs.jobTitle, |
84 | 40 | date: documentArgs.date, |
85 | 41 | }, |
86 | | - // requireReacceptance: true, |
87 | 42 | }); |
88 | 43 |
|
89 | 44 |
|
|
98 | 53 | args.accountId, args.clickwrapId, { |
99 | 54 | userAgreementRequest: userAgreement |
100 | 55 | }); |
101 | | - console.log(`See the embedded clickwrap in the dialog box.`); |
| 56 | + console.log(`See the embedded clickwrap on this page:`); |
102 | 57 | return result; |
103 | 58 | }; |
104 | 59 |
|
|
0 commit comments