-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added example * updates for webforms * using correct base path * changing docusign js events * adding web forms SDK --------- Co-authored-by: Paige Rossi <paige.rossi@docusign.com>
- Loading branch information
1 parent
1ec2c7c
commit f16bb73
Showing
18 changed files
with
423 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- extend base layout --> {% extends "base.html" %} {% block content %} | ||
|
||
{% include 'example_info.html' %} | ||
|
||
<form class="eg" action="" method="post" data-busy="form"> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> | ||
{% include 'continue_button.html' %} | ||
</form> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- extend base layout --> {% extends "base.html" %} {% block content %} | ||
|
||
<h4>{{ title }}</h4> | ||
<p>{{ description | safe }}</p> | ||
|
||
<form class="eg" action="" method="post" data-busy="form"> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> | ||
{% include 'continue_button.html' %} | ||
</form> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<!-- extend base layout --> {% extends "base.html" %} {% block content %} | ||
|
||
<!-- | ||
#ds-snippet-start:eSign44Step6 | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<div id="webform-customer-app-area"> | ||
<h1 id="webforms-heading">Embedded Webform Example</h1> | ||
<div id="docusign" class="webform-iframe-container"> | ||
<p>Web Form will render here</p> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
<p><a href="/">Continue</a></p> | ||
|
||
<script src="https://js.docusign.com/bundle.js"></script> | ||
<script> | ||
async function loadWebform() { | ||
const { loadDocuSign } = window.DocuSign | ||
const docusign = await loadDocuSign('{{ integration_key }}'); | ||
const webFormOptions = { | ||
//Used with the runtime API workflow, for private webforms this is needed to render anything | ||
instanceToken: '{{ instance_token }}', | ||
//Controls whether the progress bar is shown or not | ||
hideProgressBar: false, | ||
//Right now this parameter doesn't do anything but in the future | ||
//it will be used to customize visual elements of the form experience | ||
//such as the font color and other things | ||
styles: { | ||
fontColor: "black", | ||
}, | ||
//These styles get passed directly to the iframe that is rendered | ||
iframeStyles: { | ||
minHeight: "1500px", | ||
}, | ||
//Controls the auto resize behavior of the iframe | ||
autoResizeHeight: true | ||
}; | ||
|
||
const webFormWidget = docusign.webforms({ | ||
url: '{{ form_url }}', | ||
options: webFormOptions, | ||
}); | ||
|
||
//Basic milestones in this workflow | ||
webFormWidget.on('ready', (event) => { | ||
// event = { type: 'ready' }; | ||
console.log('debug form loaded', event); | ||
}); | ||
|
||
webFormWidget.on('submitted', (event) => { | ||
// event = { type: 'submitted', envelopeId: 'abcd1234' }; | ||
console.log('debug form submitted', event); | ||
}); | ||
|
||
webFormWidget.on('signingReady', (event) => { | ||
// event = { type: 'submitted', envelopeId: 'abcd1234' }; | ||
console.log('debug form signingReady', event); | ||
}); | ||
|
||
webFormWidget.on('sessionEnd', (event) => { | ||
//There are 3 sessionEnd types sessionTimeout, remoteSigningInitiated, signingResult | ||
|
||
// event = { type: 'sessionEnd', sessionEndType: 'sessionTimeout' }; | ||
// event = { | ||
// type: 'sessionEnd', | ||
// sessionEndType: 'signingResult', | ||
// signingResultType: 'signing_complete', | ||
// returnUrl: 'bigcorp.com', | ||
// envelopeId: 'abcd1234', | ||
// }; | ||
// event = { type: 'sessionEnd', sessionEndType: 'remoteSigningInitiated', envelopeId: 'abcd1234' }; | ||
console.log('debug form signingResult', event); | ||
}); | ||
|
||
//Less commonly used events | ||
webFormWidget.on('userActivity', (event) => { | ||
// event = { type: 'userActivity', activityType: 'click' | 'keydown' }; | ||
console.log('debug form userActivity', event); | ||
}); | ||
|
||
webFormWidget.mount("#docusign"); | ||
} | ||
loadWebform(); | ||
</script> | ||
|
||
|
||
<!-- | ||
#ds-snippet-end:eSign44Step6 | ||
--> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .views import weg001 |
Oops, something went wrong.