Skip to content

Commit

Permalink
added show Decline action
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryKlugerDS committed Sep 2, 2024
1 parent 9848d62 commit 9b00d72
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
5 changes: 5 additions & 0 deletions app-examples/embedded-signing/click2agree.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class Click2Agree {
this.outputStyle = args.outputStyle;
this.useIframe = args.useIframe;
this.useModal = args.useModal;
this.showDecline = args.showDecline;


// supplemental = [{include: true, signerMustAcknowledge: "view"},
// {include: true, signerMustAcknowledge: "accept"}];
Expand Down Expand Up @@ -123,6 +125,9 @@ class Click2Agree {
color: $(`#${this.modelButtonId} span`).css('color'),
}
},
signingDeclineButton: {
show: this.showDecline
},
/**
* signingNavigationButton object is NOT used when the view is Click to Agree
*
Expand Down
7 changes: 6 additions & 1 deletion app-examples/embedded-signing/focusedViewSigning.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class FocusedViewSigning {
this.signing = false;
this.document = args.document;
this.padding = args.padding;
this.showDecline = args.showDecline;

this.documentChoice = { // response means generic "document" responsive
default: {responsive: false, request: this.envelopes.createTemplateRequest.bind(this.envelopes)},
htmlRegResp: {responsive: true, request: this.envelopes.createHtmlRegRequest.bind(this.envelopes)},
Expand Down Expand Up @@ -159,7 +161,10 @@ class FocusedViewSigning {
finishText: $(`#${this.modelButtonId} span`).text(), // default is Submit
// 'bottom-left'|'bottom-center'|'bottom-right', default: bottom-right
position: $(`#${this.modelButtonPosition}`).val()
}
},
signingDeclineButton: {
show: this.showDecline
},
}
}

Expand Down
9 changes: 7 additions & 2 deletions app-examples/embedded-signing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ <h5>Account</h5>
<option value="default">Default account</option>
</select>
</div>
<h5>Output</h5>
<h5 class="mt-3">Output</h5>
<div>
<label for="outputStyle" class="form-label">Output style:</label>
<select id="outputStyle" class="ms-2 form-select display-inline w19"
Expand All @@ -877,7 +877,12 @@ <h5>Output</h5>
<p>
For docusign.js signing ceremonies, if «iframe» is off, a zero GUI chrome iframe is used.
</p>
<h5>Authentication</h5>
<h5>Signer User Experience</h5>
<div>
<label for="showDecline" class="">Show Decline option?</label>
<input id="showDecline" class="form-check-input baseline ms-1" type="checkbox">
</div>
<h5 class="mt-3">Authentication</h5>
<p>Optional: Docusign can include authentication checks as part of the signing ceremony</p>
<p>
<label for="authStyle" class="form-label">Additional Authentication:</label>
Expand Down
10 changes: 7 additions & 3 deletions app-examples/embedded-signing/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ $(async function () {
document3: "default",
outputStyle: "openUrl",
useIframe: true,
showDecline: false,
gatewayId: "",
authStyle: "none",
idvConfigId: "",
Expand All @@ -109,6 +110,7 @@ $(async function () {
supp32include: true,
useSigningCeremonyDefaultUx: true,
useIframe: true,
showDecline: true,
useErsd: true,
useModal: true,
}
Expand Down Expand Up @@ -146,7 +148,7 @@ $(async function () {
];

/***
* signClickToAgree -- start the signing process
* signClickToAgree
*/
let signClickToAgree = async function signClickToAgreeF (e) {
e.preventDefault();
Expand All @@ -168,11 +170,12 @@ $(async function () {
outputStyle: configuration.outputStyle,
useIframe: configuration.useIframe,
useModal: configuration.useModal,
showDecline: configuration.showDecline,
})
}.bind(this)

/***
* signFocusView -- Focus View example
* signFocusView
*/
let signFocusView = async function signFocusViewF (e) {
e.preventDefault();
Expand All @@ -199,11 +202,12 @@ $(async function () {
idvConfigId: configuration.idvConfigId,
smsNational: configuration.smsNational,
smsCc: configuration.smsCc,
showDecline: configuration.showDecline,
});
}.bind(this)

/***
* dsjsDefault -- Focus View example
* dsjsDefault
*/
let dsjsDefault = async function dsjsDefaultF (e) {
e.preventDefault();
Expand Down

0 comments on commit 9b00d72

Please sign in to comment.