Skip to content

Commit

Permalink
Merge pull request #148 from docusign/updating-focused-view
Browse files Browse the repository at this point in the history
updating JS library link, IK variable, and codeDepot markers
  • Loading branch information
raileendr authored Oct 12, 2023
2 parents 9c96f89 + 6c263ac commit 0161d75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
7 changes: 4 additions & 3 deletions launcher-csharp/eSignature/Examples/FocusedView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static (string, string) SendEnvelopeWithFocusedView(
//ds-snippet-start:eSign44Step5
RecipientViewRequest viewRequest = MakeRecipientViewRequest(signerEmail, signerName, returnUrl, signerClientId, pingUrl);

// call the CreateRecipientView API
// call the CreateRecipientView endpoint
ViewUrl results1 = envelopesApi.CreateRecipientView(accountId, envelopeId, viewRequest);

// State can be stored/recovered using the framework's session or a
Expand Down Expand Up @@ -87,8 +87,9 @@ public static RecipientViewRequest MakeRecipientViewRequest(string signerEmail,
// can be changed/spoofed very easily.
viewRequest.ReturnUrl = returnUrl + "?state=123";

// How has your app authenticated the user? In addition to your app's
// authentication, you can include authenticate steps from DocuSign.
// How does your app verify the user's authentication? Additionally,
// you can integrate authentication steps from DocuSign alongside
// your app's own authentication process.
// Eg, SMS authentication
viewRequest.AuthenticationMethod = "none";

Expand Down
17 changes: 12 additions & 5 deletions launcher-csharp/eSignature/Views/FocusedView/Embed.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
<h2>Embedded document using focused view</h2>
<br />

<!--//ds-snippet-start:eSign44Step6-->
<div id="agreement" class="docusign-agreement"></div>

<p><a href="/">@Html.Raw(ViewBag.SupportingTexts.ContinueButton)</a></p>

@Html.Raw("<script src='https://docucdn-a.akamaihd.net/demo/1ds/libs/@embedded-js/core/latest/dist/bundle.js'></script>")
@{
//ds-snippet-start:eSign44Step6
}

@Html.Raw("<script src='https://js.docusign.com/bundle.js'></script>")

<script>
window.DocuSign.loadDocuSign('{INTEGRATION_KEY}')
window.DocuSign.loadDocuSign('@ViewBag.IntegrationKey')
.then((docusign) => {
const signing = docusign.signing({
url: '@ViewBag.Url',
displayFormat: 'focused',
//ds-snippet-start:eSign44Step6
style: {
/** High-level variables that mirror our existing branding APIs. Reusing the branding name here for familiarity. */
branding: {
Expand All @@ -33,7 +37,6 @@
position: 'bottom-center'
}
}
//ds-snippet-end:eSign44Step6
});
signing.on('ready', (event) => {
Expand Down Expand Up @@ -74,4 +77,8 @@
<div class="docusign-agreement" id="docusign"></div>
<script src="script.js"></script>
</body>
</html>
</html>

@{
//ds-snippet-end:eSign44Step6
}

0 comments on commit 0161d75

Please sign in to comment.