Skip to content

Commit 705d869

Browse files
committed
small comment updates and HTML clean up
1 parent daacf16 commit 705d869

File tree

3 files changed

+45
-53
lines changed

3 files changed

+45
-53
lines changed

launcher-csharp/eSignature/Examples/FocusedView.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public static (string, string) SendEnvelopeWithFocusedView(
5555
//ds-snippet-start:eSign44Step5
5656
RecipientViewRequest viewRequest = MakeRecipientViewRequest(signerEmail, signerName, returnUrl, signerClientId, pingUrl);
5757

58-
// call the CreateRecipientView endpoint
58+
// Call the CreateRecipientView endpoint
5959
ViewUrl results1 = envelopesApi.CreateRecipientView(accountId, envelopeId, viewRequest);
6060

6161
// State can be stored/recovered using the framework's session or a
6262
// query parameter on the returnUrl (see the makeRecipientViewRequest method)
6363
string redirectUrl = results1.Url;
6464

65-
// returning both the envelopeId as well as the url to be used for embedded signing
65+
// Returning both the envelopeId as well as the URL to be used for embedded signing
6666
return (envelopeId, redirectUrl);
6767
//ds-snippet-end:eSign44Step5
6868
}
@@ -78,33 +78,33 @@ public static RecipientViewRequest MakeRecipientViewRequest(string signerEmail,
7878
// dsReturnUrl -- class global
7979
RecipientViewRequest viewRequest = new RecipientViewRequest();
8080

81-
// Set the url where you want the recipient to go once they are done signing
82-
// should typically be a callback route somewhere in your app.
81+
// Set the URL where you want the recipient to go once they're done signing
82+
// It should typically be a callback route somewhere in your app
8383
// The query parameter is included as an example of how
8484
// to save/recover state information during the redirect to
85-
// the DocuSign signing ceremony. It's usually better to use
85+
// the DocuSign signing session. It's usually better to use
8686
// the session mechanism of your web framework. Query parameters
87-
// can be changed/spoofed very easily.
87+
// can be changed or spoofed very easily.
8888
viewRequest.ReturnUrl = returnUrl + "?state=123";
8989

9090
// How does your app verify the user's authentication? Additionally,
9191
// you can integrate authentication steps from DocuSign alongside
92-
// your app's own authentication process.
92+
// your app's own authentication process
9393
// Eg, SMS authentication
9494
viewRequest.AuthenticationMethod = "none";
9595

9696
// Recipient information must match embedded recipient info
97-
// we used to create the envelope.
97+
// we used to create the envelope
9898
viewRequest.Email = signerEmail;
9999
viewRequest.UserName = signerName;
100100
viewRequest.ClientUserId = signerClientId;
101101

102102
// DocuSign recommends that you redirect to DocuSign for the
103-
// Signing Ceremony. There are multiple ways to save state.
103+
// signing session. There are multiple ways to save state.
104104
// To maintain your application's session, use the pingUrl
105-
// parameter. It causes the DocuSign Signing Ceremony web page
105+
// parameter. It causes the DocuSign signing session web page
106106
// (not the DocuSign server) to send pings via AJAX to your
107-
// app,
107+
// app.
108108
// NOTE: The pings will only be sent if the pingUrl is an https address
109109
if (pingUrl != null)
110110
{
@@ -117,7 +117,7 @@ public static RecipientViewRequest MakeRecipientViewRequest(string signerEmail,
117117
// and the site where the document should be embedded.
118118
// The site must have a valid SSL protocol for the embed to work.
119119
// MessageOrigins includes the demo or prod link and only
120-
// takes a single string.
120+
// takes a single string
121121
viewRequest.FrameAncestors = new List<string> { "https://localhost:44333", "https://apps-d.docusign.com" };
122122
viewRequest.MessageOrigins = new List<string> { "https://apps-d.docusign.com" };
123123

@@ -128,7 +128,7 @@ public static RecipientViewRequest MakeRecipientViewRequest(string signerEmail,
128128
//ds-snippet-start:eSign44Step2
129129
public static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerName, string signerClientId, string docPdf)
130130
{
131-
// Data for this method
131+
// Data for this method:
132132
// signerEmail
133133
// signerName
134134
// signerClientId -- class global
@@ -142,7 +142,7 @@ public static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerN
142142
string doc1b64 = Convert.ToBase64String(buffer);
143143

144144
doc1.DocumentBase64 = doc1b64;
145-
doc1.Name = "Lorem Ipsum"; // can be different from actual file name
145+
doc1.Name = "Lorem Ipsum"; // Can be different from the actual file name
146146
doc1.FileExtension = "pdf";
147147
doc1.DocumentId = "3";
148148

@@ -164,7 +164,7 @@ public static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerN
164164
// We're using anchor (autoPlace) positioning
165165
//
166166
// The DocuSign platform searches throughout your envelope's
167-
// documents for matching anchor strings.
167+
// documents for matching anchor strings
168168
SignHere signHere1 = new SignHere
169169
{
170170
AnchorString = "/sn1/",
@@ -187,7 +187,7 @@ public static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerN
187187
};
188188
envelopeDefinition.Recipients = recipients;
189189

190-
// Request that the envelope be sent by setting |status| to "sent".
190+
// Request that the envelope be sent by setting |status| to "sent"
191191
// To request that the envelope be created as a draft, set to "created"
192192
envelopeDefinition.Status = "sent";
193193

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
1-
1+
<br />
2+
<h2>The document has been embedded using focused view.</h2>
23
<br />
3-
<h2>Embedded document using focused view</h2>
4-
<br />
5-
6-
<!--//ds-snippet-start:eSign44Step6-->
7-
<div id="agreement" class="docusign-agreement"></div>
8-
9-
<p><a href="/">@Html.Raw(ViewBag.SupportingTexts.ContinueButton)</a></p>
10-
114
@{
125
//ds-snippet-start:eSign44Step6
136
}
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: 0;
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 id="agreement" class="docusign-agreement"></div>
28+
<script src="script.js"></script>
29+
</body>
30+
</html>
1431

32+
<p><a href="/">@Html.Raw(ViewBag.SupportingTexts.ContinueButton)</a></p>
1533
@Html.Raw("<script src='https://js.docusign.com/bundle.js'></script>")
1634

1735
<script>
@@ -53,32 +71,6 @@
5371
.catch((ex) => {
5472
// Any configuration or API limits will be caught here
5573
});</script>
56-
57-
<!DOCTYPE html>
58-
<html>
59-
<head>
60-
<meta charset="utf-8" />
61-
<title>Signing</title>
62-
<style>
63-
html,
64-
body {
65-
padding: 0;
66-
margin: 0;
67-
font: 13px Helvetica, Arial, sans-serif;
68-
}
69-
70-
.docusign-agreement {
71-
width: 75%;
72-
height: 800px;
73-
}
74-
</style>
75-
</head>
76-
<body>
77-
<div class="docusign-agreement" id="docusign"></div>
78-
<script src="script.js"></script>
79-
</body>
80-
</html>
81-
8274
@{
83-
//ds-snippet-end:eSign44Step6
75+
//ds-snippet-end:eSign44Step6
8476
}

manifest/CodeExamplesManifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
]
404404
}
405405
],
406-
"ResultsPageText": "",
406+
"ResultsPageText": "The document has been embedded with focused view.",
407407
"SkipForLanguages": "bash;java;node;php;powershell;python;ruby"
408408
},
409409
{

0 commit comments

Comments
 (0)