Skip to content

Commit ad90876

Browse files
fixes for page
1 parent 24b728f commit ad90876

File tree

2 files changed

+36
-35
lines changed

2 files changed

+36
-35
lines changed

lib/eSignature/examples/focusedView.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const sendEnvelope = async (args) => {
1818
// args.accessToken
1919
// args.accountId
2020

21-
//ds-snippet-start:eSign1Step3
21+
//ds-snippet-start:eSign44Step3
2222
let dsApiClient = new docusign.ApiClient();
2323
dsApiClient.setBasePath(args.basePath);
2424
dsApiClient.addDefaultHeader("Authorization", "Bearer " + args.accessToken);
@@ -33,13 +33,13 @@ const sendEnvelope = async (args) => {
3333
results = await envelopesApi.createEnvelope(args.accountId, {
3434
envelopeDefinition: envelope,
3535
});
36-
//ds-snippet-end:eSign1Step3
36+
//ds-snippet-end:eSign44Step3
3737

3838
let envelopeId = results.envelopeId;
3939
console.log(`Envelope was created. EnvelopeId ${envelopeId}`);
4040

4141
// Step 3. create the recipient view, the embedded signing
42-
//ds-snippet-start:eSign1Step5
42+
//ds-snippet-start:eSign44Step5
4343
let viewRequest = makeRecipientViewRequest(args.envelopeArgs);
4444
// Call the CreateRecipientView API
4545
// Exceptions will be caught by the calling function
@@ -49,7 +49,7 @@ const sendEnvelope = async (args) => {
4949

5050
return { envelopeId: envelopeId, redirectUrl: results.url };
5151
};
52-
//ds-snippet-end:eSign1Step5
52+
//ds-snippet-end:eSign44Step5
5353

5454
/**
5555
* Creates envelope
@@ -59,7 +59,7 @@ const sendEnvelope = async (args) => {
5959
* @private
6060
*/
6161

62-
//ds-snippet-start:eSign1Step2
62+
//ds-snippet-start:eSign44Step2
6363
function makeEnvelope(args) {
6464
// Data for this method
6565
// args.signerEmail
@@ -131,9 +131,9 @@ function makeEnvelope(args) {
131131

132132
return env;
133133
}
134-
//ds-snippet-end:eSign1Step2
134+
//ds-snippet-end:eSign44Step2
135135

136-
//ds-snippet-start:eSign1Step4
136+
//ds-snippet-start:eSign44Step4
137137
function makeRecipientViewRequest(args) {
138138
// Data for this method
139139
// args.dsReturnUrl
@@ -173,11 +173,11 @@ function makeRecipientViewRequest(args) {
173173
viewRequest.pingFrequency = 600; // seconds
174174
// NOTE: The pings will only be sent if the pingUrl is an https address
175175
viewRequest.pingUrl = args.dsPingUrl; // optional setting
176-
viewRequest.frameAncestors = ["https://localhost:3000", "https://apps-d.docusign.com"];
176+
viewRequest.frameAncestors = ["http://localhost:3000", "https://apps-d.docusign.com"];
177177
viewRequest.messageOrigins = ["https://apps-d.docusign.com"]
178178

179179
return viewRequest;
180180
}
181-
//ds-snippet-end:eSign1Step4
181+
//ds-snippet-end:eSign44Step4
182182

183183
module.exports = { sendEnvelope, makeEnvelope, makeRecipientViewRequest };

views/pages/examples/eg044Embed.ejs

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
<%- include("../../partials/genericHead") %>
22

33
<br />
4-
<h2>Embedded document using focused view</h2>
4+
<h2>The document has been embedded with focused view.</h2>
55
<br />
66

7-
<div id="agreement"></div>
7+
<!DOCTYPE html>
8+
<html>
9+
<head>
10+
<meta charset="utf-8" />
11+
<title>Signing</title>
12+
<style>
13+
html,
14+
body {
15+
padding: 0;
16+
margin-top: 15px;
17+
font: 13px Helvetica, Arial, sans-serif;
18+
}
19+
20+
.docusign-agreement {
21+
width: 75%;
22+
height: 800px;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<div class="docusign-agreement" id="agreement"></div>
28+
<script src="script.js"></script>
29+
</body>
30+
</html>
831

932
<p><a href="/">Continue</a></p>
1033

@@ -49,30 +72,8 @@
4972
})
5073
.catch((ex) => {
5174
// Any configuration or API limits will be caught here
52-
});</script>
75+
});
76+
</script>
5377

54-
<!DOCTYPE html>
55-
<html>
56-
<head>
57-
<meta charset="utf-8" />
58-
<title>Signing</title>
59-
<style>
60-
html,
61-
body {
62-
padding: 0;
63-
margin-top: 30px;
64-
font: 16px Helvetica, Arial, sans-serif;
65-
}
66-
67-
.docusign-agreement {
68-
width: 50%;
69-
}
70-
</style>
71-
</head>
72-
<body>
73-
<div class="docusign-agreement" id="docusign"></div>
74-
<script src="script.js"></script>
75-
</body>
76-
</html>
7778

7879
<%- include("../../partials/genericFoot") %>

0 commit comments

Comments
 (0)