├── .bowerrc ├── .gitignore ├── DSAuthCodeGrant.js ├── LICENSE ├── Procfile ├── README.md ├── bower.json ├── config.js ├── helpers.js ├── models └── index.js ├── package-lock.json ├── package.json ├── pdfs ├── LoanAuto.docx ├── LoanPersonal.docx ├── LoanSailboat.docx ├── LoanSailboatAppraiser.docx ├── PurchaseLand.docx └── template-auto-loan.json ├── public ├── LoanCo_OG.png ├── bower_components │ ├── bootstrap-validator │ │ ├── .bower.json │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ │ ├── validator.js │ │ │ └── validator.min.js │ │ ├── docs │ │ │ ├── LICENSE │ │ │ ├── assets │ │ │ │ ├── css │ │ │ │ │ ├── docs.css │ │ │ │ │ └── pygments-manni.css │ │ │ │ ├── ico │ │ │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ │ │ └── favicon.png │ │ │ │ └── js │ │ │ │ │ └── application.js │ │ │ └── dist │ │ │ │ ├── validator.js │ │ │ │ └── validator.min.js │ │ └── js │ │ │ └── validator.js │ └── jquery │ │ ├── .bower.json │ │ ├── AUTHORS.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ ├── core.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ │ ├── external │ │ └── sizzle │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── sizzle.js │ │ │ ├── sizzle.min.js │ │ │ └── sizzle.min.map │ │ └── src │ │ ├── .eslintrc │ │ ├── ajax.js │ │ ├── ajax │ │ ├── jsonp.js │ │ ├── load.js │ │ ├── parseXML.js │ │ ├── script.js │ │ ├── var │ │ │ ├── location.js │ │ │ ├── nonce.js │ │ │ └── rquery.js │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── attributes │ │ ├── attr.js │ │ ├── classes.js │ │ ├── prop.js │ │ ├── support.js │ │ └── val.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── core │ │ ├── DOMEval.js │ │ ├── access.js │ │ ├── init.js │ │ ├── parseHTML.js │ │ ├── ready-no-deferred.js │ │ ├── ready.js │ │ ├── readyException.js │ │ ├── support.js │ │ └── var │ │ │ └── rsingleTag.js │ │ ├── css.js │ │ ├── css │ │ ├── addGetHookIf.js │ │ ├── adjustCSS.js │ │ ├── curCSS.js │ │ ├── hiddenVisibleSelectors.js │ │ ├── showHide.js │ │ ├── support.js │ │ └── var │ │ │ ├── cssExpand.js │ │ │ ├── getStyles.js │ │ │ ├── isHiddenWithinTree.js │ │ │ ├── rmargin.js │ │ │ ├── rnumnonpx.js │ │ │ └── swap.js │ │ ├── data.js │ │ ├── data │ │ ├── Data.js │ │ └── var │ │ │ ├── acceptData.js │ │ │ ├── dataPriv.js │ │ │ └── dataUser.js │ │ ├── deferred.js │ │ ├── deferred │ │ └── exceptionHook.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── effects │ │ ├── Tween.js │ │ └── animatedSelector.js │ │ ├── event.js │ │ ├── event │ │ ├── ajax.js │ │ ├── alias.js │ │ ├── focusin.js │ │ ├── support.js │ │ └── trigger.js │ │ ├── exports │ │ ├── amd.js │ │ └── global.js │ │ ├── jquery.js │ │ ├── manipulation.js │ │ ├── manipulation │ │ ├── _evalUrl.js │ │ ├── buildFragment.js │ │ ├── getAll.js │ │ ├── setGlobalEval.js │ │ ├── support.js │ │ ├── var │ │ │ ├── rcheckableType.js │ │ │ ├── rscriptType.js │ │ │ └── rtagName.js │ │ └── wrapMap.js │ │ ├── offset.js │ │ ├── queue.js │ │ ├── queue │ │ └── delay.js │ │ ├── selector-native.js │ │ ├── selector-sizzle.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── traversing.js │ │ ├── traversing │ │ ├── findFilter.js │ │ └── var │ │ │ ├── dir.js │ │ │ ├── rneedsContext.js │ │ │ └── siblings.js │ │ ├── var │ │ ├── ObjectFunctionString.js │ │ ├── arr.js │ │ ├── class2type.js │ │ ├── concat.js │ │ ├── document.js │ │ ├── documentElement.js │ │ ├── fnToString.js │ │ ├── getProto.js │ │ ├── hasOwn.js │ │ ├── indexOf.js │ │ ├── pnum.js │ │ ├── push.js │ │ ├── rcssNum.js │ │ ├── rnotwhite.js │ │ ├── slice.js │ │ ├── support.js │ │ └── toString.js │ │ └── wrap.js ├── favicon.ico ├── images │ └── LoanCo.jpg ├── javascripts │ └── app.js └── stylesheets │ ├── modern-business.css │ └── style.css ├── routes ├── ds-callback.js ├── envelopes.js ├── index.js ├── loan-auto.js ├── loan-personal.js ├── loan-sailboat.js ├── purchase-land.js ├── sign.js └── webhooks.js ├── server.js ├── setup.js └── views ├── embeddedsign.hbs ├── envelopes.hbs ├── error.hbs ├── index.hbs ├── layouts └── main.hbs ├── loan-auto.hbs ├── loan-personal.hbs ├── loan-sailboat.hbs ├── markdown └── about-us.md ├── partials ├── footer.hbs └── header.hbs ├── pop.hbs ├── purchase-land.hbs ├── remotesign.hbs ├── signingreturn.hbs └── static.hbs /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "public/bower_components" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | ~$* 4 | .DS_STORE 5 | .idea 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2023- DocuSign, Inc. (https://www.docusign.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node server.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ⚠️ Archived Repository Notice ⚠️ 2 | This repository has been **archived** and is no longer actively maintained. 3 | ## For alternatives or further development 4 | [MyWebForms](https://mywebforms.sampleapps.docusign.com/) is an updated and actively maintained version of this application and is also available on [GitHub](https://github.com/docusign/sample-app-mywebforms-csharp/). The new version includes additional Docusign features, such as support for web forms, and continues to receive updates and improvements. 5 | ## Explore More 6 | Be sure to check out the [Docusign Developer Center](https://developers.docusign.com/sample-apps/) for a full list of supported sample apps. 7 | Thank you for your interest and support! 8 | 9 | 10 | # DocuSign LoanCo Sample App 11 | 12 | LoanCo is a sample loan app that shows some common ways an application might interact with the DocuSign eSignature API. Various switches (authentication, focused view, templates) can be changed to show additional platform and API features and how easy they are to add to your own solution. LoanCo offers three (3) different loan workflows that demonstrate various features and workflows available through the platform. 13 | 14 | #### Requirements 15 | 16 | - [Free Developer Account](https://go.docusign.com/o/sandbox) 17 | - [Node.js](https://nodejs.org/en/) 18 | 19 | 20 | #### Installation 21 | 22 | git clone 23 | cd 24 | npm install 25 | 26 | #### Running 27 | 28 | npm start 29 | 30 | 31 | #### Configuration 32 | 33 | > DocuSign has multiple ways of authenticating your app. This example is using Code Grant, which requires us to store a ClientSecret in addition to the Integration Key. read more about different authentication methods at https://developers.docusign.com/platform/auth/ 34 | 35 | 36 | We use environment variables to setup our configuration. You can store these variables in a `.env` file at the root (`dotenv` package is used) 37 | 38 | DOCUSIGN_ENVIRONMENT=demo // use "www" for production 39 | DOCUSIGN_IK= // Integration Key 40 | DOCUSIGN_CLIENT_SECRET= // Client Secret 41 | EMPLOYEE_EMAIL= // used for final recipient of Personal Loan 42 | EMPLOYEE_NAME= // used for final recipient of Personal Loan 43 | LOCAL_RETURN_URL=http://localhost/ // change to the correct return url, with a trailing slash 44 | BRAND_ID= // not required, use to show a different Brand for the Sailboat example 45 | GOOGLE_MAPS_API_KEY= // required for Sailboat example to work 46 | GOOGLE_TAG_MANAGER= // GTM-XYZ 47 | DEFAULT_EMAIL= // for autofilling email input fields 48 | FORCE_HTTPS= // force https by setting to true 49 | SESSION_SECRET= // used to compute the hash value of the session, any number would do. 50 | 51 | #### Using an https server 52 | *Optional* 53 | 1. Follow [these instructions](https://devcenter.heroku.com/articles/ssl-certificate-self) to generate a private key, certificate signing request, and SSL certificate. These should be stored in the root directory in files named server.key, server.csr, and server.crt respectively. 54 | 55 | #### Templates 56 | 57 | Templates are not currently automatically created. To create the Auto Loan template, follow these steps: 58 | 59 | 1. Visit your Templates tab: https://appdemo.docusign.com/templates 60 | 1. Click "New" and "Upload Template" 61 | 1. Upload the file "pdfs/template-auto-loan.json" and click on the newly-created Template 62 | 1. Copy the Template ID by clicking the "(I)" or information icon next to the Template title 63 | 1. Paste the Template ID into the "pdfs/template-auto-loan.json" file, replacing the existing templateId value 64 | 1. Restart the sample using `npm start` 65 | 66 | > Todo: When initially run, the app will attempt to create a Template for the Auto Loan Application. This template is defined at `pdfs/template-auto-loan.json`. 67 | 68 | 69 | #### Deploy to Heroku 70 | 71 | A few requirements: 72 | 73 | - Make sure you have the heroku toolbelt/CLI installed locally 74 | - Fill out the fields in the `.env` file after cloning 75 | - Install heroku-config to send your local env variables in .env to heroku (`heroku plugins:install heroku-config`) 76 | 77 | 78 | Code: 79 | 80 | git clone 81 | cd 82 | 83 | # 84 | 85 | # create heroku app 86 | heroku create 87 | 88 | # test locally 89 | heroku local 90 | 91 | # push up .env file to heroku config (heroku plugins:install heroku-config) 92 | heroku config:push 93 | 94 | # push repo up to heroku 95 | git push heroku master 96 | 97 | # view online 98 | heroku open 99 | 100 | 101 | 102 | #### Errors you may encounter 103 | 104 | { 105 | errorCode: 'ACCOUNT_LACKS_PERMISSIONS', 106 | message: 'This Account lacks sufficient permissions. Document Visibility has been specified. This account does not have document visibility turned on.' 107 | } 108 | 109 | Note: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents. Important: You must enable document visibility in your account to complete this how-to. In [Sending Settings](https://admindemo.docusign.com/authenticate?goTo=sending), “Document Visibility” must be set to one of the following: 110 | 'Sender can set "must sign to view, unless a member of sending account"', or 111 | 'Sender can set "must sign to view unless sender"' 112 | 113 | See the Document Visibility section in [Fields and Properties](https://support.docusign.com/s/document-item?language=en_US&rsc_301&bundleId=pik1583277475390&topicId=xgg1583277350154.html&%3Ci%3ELANG=enus) for details about document visibility options. 114 | 115 | 116 | 117 | { 118 | errorCode: 'PLAN_ITEM_NOT_ENABLED', 119 | message: 'A requested plan item is not enabled for this account. Plan item: AllowRequireWetSign' 120 | } 121 | 122 | Contact Support (https://support.docusign.com/s/contactSupport?language=en_US) and request "Allow Require Wet Sign" to be enabled on your account, and then change this on https://admindemo.docusign.com/authenticate?goTo=sending. Go to **Signing Settings** and find this option under **Recipients**. 123 | 124 | 125 | 126 | #### Additional Resources 127 | 128 | * [DocuSign Developer Center](https://developers.docusign.com) 129 | * [DocuSign API on Twitter](https://twitter.com/docusignapi) 130 | * [DocuSign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/) 131 | * [DocuSign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ) 132 | 133 | 134 | 135 | 136 | #### License 137 | 138 | The DocuSign LoanCo Sample App is licensed under the MIT [License](LICENSE). 139 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docusign-sampleapp-loanco-nodejs", 3 | "description": "", 4 | "main": "", 5 | "authors": [ 6 | "DocuSign DevCenter " 7 | ], 8 | "license": "MIT", 9 | "homepage": "", 10 | "private": true, 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests" 17 | ], 18 | "dependencies": { 19 | "bootstrap-validator": "^0.11.5", 20 | "jquery": "3.5.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | 2 | var docusign = require('docusign-esign'); 3 | var _ = require('lodash'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | 7 | var config = {}; 8 | 9 | // Load .env if exists 10 | try { 11 | if(fs.statSync(path.join(__dirname,'.env')).isFile()){ 12 | require('dotenv').config(); 13 | } 14 | }catch(err){ 15 | console.info('Not including .env'); 16 | } 17 | 18 | var docusignEnv = process.env.DOCUSIGN_ENVIRONMENT; 19 | var docusignBaseUrl = 'https://' + docusignEnv + '.docusign.net/restapi'; 20 | 21 | config.auth = { 22 | IntegrationKey: process.env.DOCUSIGN_IK, 23 | ClientSecret: process.env.DOCUSIGN_CLIENT_SECRET, 24 | RSAKey: fs.readFileSync("./rsa.txt"), 25 | AccountId: process.env.DOCUSIGN_ACCOUNT_ID, 26 | UserId: process.env.DOCUSIGN_USER_ID, 27 | EmployeeEmail: process.env.EMPLOYEE_EMAIL, 28 | EmployeeName: process.env.EMPLOYEE_NAME, 29 | LocalReturnUrl: process.env.LOCAL_RETURN_URL 30 | }; 31 | 32 | config.brand_id = process.env.BRAND_ID; 33 | config.google_maps_api_key = process.env.GOOGLE_MAPS_API_KEY; 34 | config.default_email = process.env.DEFAULT_EMAIL; 35 | config.session_secret = process.env.SESSION_SECRET; 36 | 37 | app.locals.googletag = process.env.GOOGLE_TAG_MANAGER; 38 | 39 | config.templates = [ 40 | { 41 | key: 'cosigner_on_auto_loan', 42 | name: 'Auto Loan with Cosigner', 43 | json: require('./pdfs/template-auto-loan.json') // import the name of the template, see if one exists already 44 | } 45 | ]; 46 | config.templatesByKey = {}; 47 | _.each(config.templates, function(template){ 48 | config.templatesByKey[template.key] = template; // app.config.templatesByKey.cosigner_on_auto_loan = {...} 49 | }); 50 | 51 | config.ApiClient = null; // will be created in a moment 52 | 53 | module.exports = config; 54 | -------------------------------------------------------------------------------- /models/index.js: -------------------------------------------------------------------------------- 1 | // Type 1: In-memory only datastore (no need to load the database) 2 | var Datastore = require('nedb'); 3 | var models = {}; 4 | 5 | models.Envelope = new Datastore(); 6 | 7 | module.exports = models; 8 | 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docusign-sample-app-loanco-nodejs", 3 | "version": "0.0.0", 4 | "engines": { 5 | "node": "~16.15.0" 6 | }, 7 | "private": true, 8 | "scripts": { 9 | "start": "node server.js" 10 | }, 11 | "dependencies": { 12 | "async": "3.2.4", 13 | "body-parser": "^1.20.2", 14 | "cookie-parser": "1.4.6", 15 | "debug": "4.3.4", 16 | "docusign-esign": "6.4.0", 17 | "dotenv": "16.3.1", 18 | "express": "^4.18.2", 19 | "express-handlebars": "6.0.7", 20 | "express-session": "^1.17.3", 21 | "guid": "0.0.12", 22 | "helmet": "^3.23.3", 23 | "jsonfile": "6.1.0", 24 | "lodash": "^4.17.21", 25 | "marked": "^5.1.0", 26 | "memorystore": "^1.6.7", 27 | "moment": "^2.29.4", 28 | "morgan": "^1.10.0", 29 | "nedb": "1.8.0", 30 | "passport": "^0.6.0", 31 | "passport-docusign": "^1.3.0", 32 | "path": "^0.12.7", 33 | "q": "1.5.1", 34 | "request": "^2.88.2", 35 | "request-promise-native": "^1.0.9", 36 | "serve-favicon": "^2.5.0", 37 | "static-google-map": "0.0.5", 38 | "stream": "0.0.2", 39 | "validator": "^13.9.0" 40 | }, 41 | "overrides": { 42 | "underscore": "^1.13.6" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /pdfs/LoanAuto.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/pdfs/LoanAuto.docx -------------------------------------------------------------------------------- /pdfs/LoanPersonal.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/pdfs/LoanPersonal.docx -------------------------------------------------------------------------------- /pdfs/LoanSailboat.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/pdfs/LoanSailboat.docx -------------------------------------------------------------------------------- /pdfs/LoanSailboatAppraiser.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/pdfs/LoanSailboatAppraiser.docx -------------------------------------------------------------------------------- /pdfs/PurchaseLand.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/pdfs/PurchaseLand.docx -------------------------------------------------------------------------------- /public/LoanCo_OG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/public/LoanCo_OG.png -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-validator", 3 | "homepage": "https://github.com/1000hz/bootstrap-validator", 4 | "authors": [ 5 | "Cina Saffary " 6 | ], 7 | "description": "A user-friendly HTML5 Form validator for Bootstrap 3", 8 | "main": "dist/validator.js", 9 | "keywords": [ 10 | "bootstrap", 11 | "bootstrap3", 12 | "jquery", 13 | "form", 14 | "validator", 15 | "validation", 16 | "plugin" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", 21 | "_*", 22 | "docs-assets", 23 | "js/tests", 24 | "DOCS-LICENSE", 25 | "Gruntfile.js", 26 | "package.json", 27 | "*.html" 28 | ], 29 | "dependencies": { 30 | "jquery": ">= 1.8.3" 31 | }, 32 | "version": "0.11.5", 33 | "_release": "0.11.5", 34 | "_resolution": { 35 | "type": "version", 36 | "tag": "v0.11.5", 37 | "commit": "c98abe601cf5be270a303743708b5e4f08a1d127" 38 | }, 39 | "_source": "https://github.com/1000hz/bootstrap-validator.git", 40 | "_target": "^0.11.5", 41 | "_originalSource": "bootstrap-validator" 42 | } -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Cina Saffary 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/README.md: -------------------------------------------------------------------------------- 1 | # Validator, for Bootstrap 3 2 | The Validator plugin offers automatic form validation configurable via mostly HTML5 standard attributes. 3 | It also provides an unobtrusive user experience, because nobody likes a naggy form. 4 | 5 | ## Features 6 | - Configurable via data-api and standard HTML5 attributes 7 | - Patient to inform user of errors and eager to let them know the errors have been resolved 8 | - Submit is disabled until the form is valid and all required fields are complete 9 | - Customizable error messages 10 | - Custom validator functions 11 | - Validation of an input field via AJAX 12 | 13 | ## Installation 14 | * CDN on [CDNJS](https://cdnjs.com): https://cdnjs.com/libraries/1000hz-bootstrap-validator 15 | * Clone the repo: `git clone https://github.com/1000hz/bootstrap-validator.git`. 16 | * Install with [Bower](http://bower.io): `bower install bootstrap-validator`. 17 | * Install with [npm](https://www.npmjs.com): `npm install bootstrap-validator`. 18 | 19 | ## Documentation 20 | 21 | See the project docs at http://1000hz.github.io/bootstrap-validator 22 | 23 | ## Contributing 24 | #### Found an issue? 25 | Be sure to include a reproducible test case on JSbin with your report. 26 | #### Submitting a pull request? 27 | Fork this repo and create a new branch for your patch. 28 | Try to adhere to the code style of Bootstrap 3's JS as much as possible. 29 | Be sure to add any relevant unit tests. 30 | Make sure everything's still ok by running `grunt test`. 31 | Lastly, don't pollute your patch branch with any unrelated changes. 32 | 33 | ## Author 34 | 35 | **Cina Saffary** 36 | - http://twitter.com/1000hz 37 | - http://github.com/1000hz 38 | 39 | Thanks to [@mdo](https://github.com/mdo) and [@fat](https://github.com/fat) for [Bootstrap](http://getbootstrap.com). <3 40 | 41 | ## Copyright and license 42 | Copyright 2016 Cina Saffary under the MIT license. 43 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-validator", 3 | "homepage": "https://github.com/1000hz/bootstrap-validator", 4 | "authors": [ 5 | "Cina Saffary " 6 | ], 7 | "description": "A user-friendly HTML5 Form validator for Bootstrap 3", 8 | "main": "dist/validator.js", 9 | "keywords": [ 10 | "bootstrap", 11 | "bootstrap3", 12 | "jquery", 13 | "form", 14 | "validator", 15 | "validation", 16 | "plugin" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", 21 | "_*", 22 | "docs-assets", 23 | "js/tests", 24 | "DOCS-LICENSE", 25 | "Gruntfile.js", 26 | "package.json", 27 | "*.html" 28 | ], 29 | "dependencies": { 30 | "jquery": ">= 1.8.3" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/dist/validator.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Validator v0.11.5 for Bootstrap 3, by @1000hz 3 | * Copyright 2016 Cina Saffary 4 | * Licensed under http://opensource.org/licenses/MIT 5 | * 6 | * https://github.com/1000hz/bootstrap-validator 7 | */ 8 | 9 | +function(a){"use strict";function b(b){return b.is('[type="checkbox"]')?b.prop("checked"):b.is('[type="radio"]')?!!a('[name="'+b.attr("name")+'"]:checked').length:b.val()}function c(b){return this.each(function(){var c=a(this),e=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b),f=c.data("bs.validator");(f||"destroy"!=b)&&(f||c.data("bs.validator",f=new d(this,e)),"string"==typeof b&&f[b]())})}var d=function(c,e){this.options=e,this.validators=a.extend({},d.VALIDATORS,e.custom),this.$element=a(c),this.$btn=a('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr("id")+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]')),this.update(),this.$element.on("input.bs.validator change.bs.validator focusout.bs.validator",a.proxy(this.onInput,this)),this.$element.on("submit.bs.validator",a.proxy(this.onSubmit,this)),this.$element.on("reset.bs.validator",a.proxy(this.reset,this)),this.$element.find("[data-match]").each(function(){var c=a(this),d=c.data("match");a(d).on("input.bs.validator",function(){b(c)&&c.trigger("input.bs.validator")})}),this.$inputs.filter(function(){return b(a(this))}).trigger("focusout"),this.$element.attr("novalidate",!0),this.toggleSubmit()};d.VERSION="0.11.5",d.INPUT_SELECTOR=':input:not([type="hidden"], [type="submit"], [type="reset"], button)',d.FOCUS_OFFSET=20,d.DEFAULTS={delay:500,html:!1,disable:!0,focus:!0,custom:{},errors:{match:"Does not match",minlength:"Not long enough"},feedback:{success:"glyphicon-ok",error:"glyphicon-remove"}},d.VALIDATORS={"native":function(a){var b=a[0];return b.checkValidity?!b.checkValidity()&&!b.validity.valid&&(b.validationMessage||"error!"):void 0},match:function(b){var c=b.data("match");return b.val()!==a(c).val()&&d.DEFAULTS.errors.match},minlength:function(a){var b=a.data("minlength");return a.val().length").addClass("list-unstyled").append(a.map(d,function(b){return a("
  • ")[c](b)})),void 0===f.data("bs.validator.originalContent")&&f.data("bs.validator.originalContent",f.html()),f.empty().append(d),e.addClass("has-error has-danger"),e.hasClass("has-feedback")&&g.removeClass(this.options.feedback.success)&&g.addClass(this.options.feedback.error)&&e.removeClass("has-success"))},d.prototype.clearErrors=function(a){var c=a.closest(".form-group"),d=c.find(".help-block.with-errors"),e=c.find(".form-control-feedback");d.html(d.data("bs.validator.originalContent")),c.removeClass("has-error has-danger has-success"),c.hasClass("has-feedback")&&e.removeClass(this.options.feedback.error)&&e.removeClass(this.options.feedback.success)&&b(a)&&e.addClass(this.options.feedback.success)&&c.addClass("has-success")},d.prototype.hasErrors=function(){function b(){return!!(a(this).data("bs.validator.errors")||[]).length}return!!this.$inputs.filter(b).length},d.prototype.isIncomplete=function(){function c(){var c=b(a(this));return!("string"==typeof c?a.trim(c):c)}return!!this.$inputs.filter("[required]").filter(c).length},d.prototype.onSubmit=function(a){this.validate(),(this.isIncomplete()||this.hasErrors())&&a.preventDefault()},d.prototype.toggleSubmit=function(){this.options.disable&&this.$btn.toggleClass("disabled",this.isIncomplete()||this.hasErrors())},d.prototype.defer=function(b,c){return c=a.proxy(c,this,b),this.options.delay?(window.clearTimeout(b.data("bs.validator.timeout")),void b.data("bs.validator.timeout",window.setTimeout(c,this.options.delay))):c()},d.prototype.reset=function(){return this.$element.find(".form-control-feedback").removeClass(this.options.feedback.error).removeClass(this.options.feedback.success),this.$inputs.removeData(["bs.validator.errors","bs.validator.deferred"]).each(function(){var b=a(this),c=b.data("bs.validator.timeout");window.clearTimeout(c)&&b.removeData("bs.validator.timeout")}),this.$element.find(".help-block.with-errors").each(function(){var b=a(this),c=b.data("bs.validator.originalContent");b.removeData("bs.validator.originalContent").html(c)}),this.$btn.removeClass("disabled"),this.$element.find(".has-error, .has-danger, .has-success").removeClass("has-error has-danger has-success"),this},d.prototype.destroy=function(){return this.reset(),this.$element.removeAttr("novalidate").removeData("bs.validator").off(".bs.validator"),this.$inputs.off(".bs.validator"),this.options=null,this.validators=null,this.$element=null,this.$btn=null,this};var e=a.fn.validator;a.fn.validator=c,a.fn.validator.Constructor=d,a.fn.validator.noConflict=function(){return a.fn.validator=e,this},a(window).on("load",function(){a('form[data-toggle="validator"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery); -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/docs/assets/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/docs/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/public/bower_components/bootstrap-validator/docs/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/docs/assets/ico/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/sample-app-loanco-nodejs/6779d90b8dd8f0a7c4222521e9239fad0c567418/public/bower_components/bootstrap-validator/docs/assets/ico/favicon.png -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/docs/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * Copyright 2013 Twitter, Inc. 7 | * 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function(){ 16 | 17 | var $window = $(window) 18 | var $body = $(document.body) 19 | 20 | var navHeight = $('.navbar').outerHeight(true) + 10 21 | 22 | $.fn.validator.Constructor.FOCUS_OFFSET = navHeight 23 | 24 | $body.scrollspy({ 25 | target: '.bs-sidebar', 26 | offset: navHeight 27 | }) 28 | 29 | $window.on('load', function () { 30 | $body.scrollspy('refresh') 31 | }) 32 | 33 | $('.bs-docs-container [href=#]').click(function (e) { 34 | e.preventDefault() 35 | }) 36 | 37 | // back to top 38 | setTimeout(function () { 39 | var $sideBar = $('.bs-sidebar') 40 | 41 | $sideBar.affix({ 42 | offset: { 43 | top: function () { 44 | var offsetTop = $sideBar.offset().top 45 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 46 | var navOuterHeight = $('.bs-docs-nav').height() 47 | 48 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 49 | } 50 | , bottom: function () { 51 | return (this.bottom = $('.bs-footer').outerHeight(true)) 52 | } 53 | } 54 | }) 55 | }, 100) 56 | 57 | }) 58 | 59 | }(window.jQuery) 60 | -------------------------------------------------------------------------------- /public/bower_components/bootstrap-validator/docs/dist/validator.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Validator v0.11.5 for Bootstrap 3, by @1000hz 3 | * Copyright 2016 Cina Saffary 4 | * Licensed under http://opensource.org/licenses/MIT 5 | * 6 | * https://github.com/1000hz/bootstrap-validator 7 | */ 8 | 9 | +function(a){"use strict";function b(b){return b.is('[type="checkbox"]')?b.prop("checked"):b.is('[type="radio"]')?!!a('[name="'+b.attr("name")+'"]:checked').length:b.val()}function c(b){return this.each(function(){var c=a(this),e=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b),f=c.data("bs.validator");(f||"destroy"!=b)&&(f||c.data("bs.validator",f=new d(this,e)),"string"==typeof b&&f[b]())})}var d=function(c,e){this.options=e,this.validators=a.extend({},d.VALIDATORS,e.custom),this.$element=a(c),this.$btn=a('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr("id")+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]')),this.update(),this.$element.on("input.bs.validator change.bs.validator focusout.bs.validator",a.proxy(this.onInput,this)),this.$element.on("submit.bs.validator",a.proxy(this.onSubmit,this)),this.$element.on("reset.bs.validator",a.proxy(this.reset,this)),this.$element.find("[data-match]").each(function(){var c=a(this),d=c.data("match");a(d).on("input.bs.validator",function(){b(c)&&c.trigger("input.bs.validator")})}),this.$inputs.filter(function(){return b(a(this))}).trigger("focusout"),this.$element.attr("novalidate",!0),this.toggleSubmit()};d.VERSION="0.11.5",d.INPUT_SELECTOR=':input:not([type="hidden"], [type="submit"], [type="reset"], button)',d.FOCUS_OFFSET=20,d.DEFAULTS={delay:500,html:!1,disable:!0,focus:!0,custom:{},errors:{match:"Does not match",minlength:"Not long enough"},feedback:{success:"glyphicon-ok",error:"glyphicon-remove"}},d.VALIDATORS={"native":function(a){var b=a[0];return b.checkValidity?!b.checkValidity()&&!b.validity.valid&&(b.validationMessage||"error!"):void 0},match:function(b){var c=b.data("match");return b.val()!==a(c).val()&&d.DEFAULTS.errors.match},minlength:function(a){var b=a.data("minlength");return a.val().length").addClass("list-unstyled").append(a.map(d,function(b){return a("
  • ")[c](b)})),void 0===f.data("bs.validator.originalContent")&&f.data("bs.validator.originalContent",f.html()),f.empty().append(d),e.addClass("has-error has-danger"),e.hasClass("has-feedback")&&g.removeClass(this.options.feedback.success)&&g.addClass(this.options.feedback.error)&&e.removeClass("has-success"))},d.prototype.clearErrors=function(a){var c=a.closest(".form-group"),d=c.find(".help-block.with-errors"),e=c.find(".form-control-feedback");d.html(d.data("bs.validator.originalContent")),c.removeClass("has-error has-danger has-success"),c.hasClass("has-feedback")&&e.removeClass(this.options.feedback.error)&&e.removeClass(this.options.feedback.success)&&b(a)&&e.addClass(this.options.feedback.success)&&c.addClass("has-success")},d.prototype.hasErrors=function(){function b(){return!!(a(this).data("bs.validator.errors")||[]).length}return!!this.$inputs.filter(b).length},d.prototype.isIncomplete=function(){function c(){var c=b(a(this));return!("string"==typeof c?a.trim(c):c)}return!!this.$inputs.filter("[required]").filter(c).length},d.prototype.onSubmit=function(a){this.validate(),(this.isIncomplete()||this.hasErrors())&&a.preventDefault()},d.prototype.toggleSubmit=function(){this.options.disable&&this.$btn.toggleClass("disabled",this.isIncomplete()||this.hasErrors())},d.prototype.defer=function(b,c){return c=a.proxy(c,this,b),this.options.delay?(window.clearTimeout(b.data("bs.validator.timeout")),void b.data("bs.validator.timeout",window.setTimeout(c,this.options.delay))):c()},d.prototype.reset=function(){return this.$element.find(".form-control-feedback").removeClass(this.options.feedback.error).removeClass(this.options.feedback.success),this.$inputs.removeData(["bs.validator.errors","bs.validator.deferred"]).each(function(){var b=a(this),c=b.data("bs.validator.timeout");window.clearTimeout(c)&&b.removeData("bs.validator.timeout")}),this.$element.find(".help-block.with-errors").each(function(){var b=a(this),c=b.data("bs.validator.originalContent");b.removeData("bs.validator.originalContent").html(c)}),this.$btn.removeClass("disabled"),this.$element.find(".has-error, .has-danger, .has-success").removeClass("has-error has-danger has-success"),this},d.prototype.destroy=function(){return this.reset(),this.$element.removeAttr("novalidate").removeData("bs.validator").off(".bs.validator"),this.$inputs.off(".bs.validator"),this.options=null,this.validators=null,this.$element=null,this.$btn=null,this};var e=a.fn.validator;a.fn.validator=c,a.fn.validator.Constructor=d,a.fn.validator.noConflict=function(){return a.fn.validator=e,this},a(window).on("load",function(){a('form[data-toggle="validator"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery); -------------------------------------------------------------------------------- /public/bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.1.0", 16 | "_release": "3.1.0", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.1.0", 20 | "commit": "6f02bc382c0529d3b4f68f6b2ad21876642dbbfe" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": ">= 1.8.3", 24 | "_originalSource": "jquery" 25 | } -------------------------------------------------------------------------------- /public/bower_components/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/bower_components/jquery/README.md: -------------------------------------------------------------------------------- 1 | # jQuery 2 | 3 | > jQuery is a fast, small, and feature-rich JavaScript library. 4 | 5 | For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/). 6 | For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery). 7 | 8 | ## Including jQuery 9 | 10 | Below are some of the most common ways to include jQuery. 11 | 12 | ### Browser 13 | 14 | #### Script tag 15 | 16 | ```html 17 | 18 | ``` 19 | 20 | #### Babel 21 | 22 | [Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. 23 | 24 | ```js 25 | import $ from "jquery"; 26 | ``` 27 | 28 | #### Browserify/Webpack 29 | 30 | There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this... 31 | 32 | ```js 33 | var $ = require("jquery"); 34 | ``` 35 | 36 | #### AMD (Asynchronous Module Definition) 37 | 38 | AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html). 39 | 40 | ```js 41 | define(["jquery"], function($) { 42 | 43 | }); 44 | ``` 45 | 46 | ### Node 47 | 48 | To include jQuery in [Node](nodejs.org), first install with npm. 49 | 50 | ```sh 51 | npm install jquery 52 | ``` 53 | 54 | For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes. 55 | 56 | ```js 57 | require("jsdom").env("", function(err, window) { 58 | if (err) { 59 | console.error(err); 60 | return; 61 | } 62 | 63 | var $ = require("jquery")(window); 64 | }); 65 | ``` 66 | -------------------------------------------------------------------------------- /public/bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /public/bower_components/jquery/external/sizzle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/sizzle 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | // Support: IE <=9 only, Android <=4.0 only 3 | // The above browsers are failing a lot of tests in the ES5 4 | // test suite at http://test262.ecmascript.org. 5 | "parserOptions": { 6 | "ecmaVersion": 3 7 | }, 8 | "globals": { 9 | "window": true, 10 | "jQuery": true, 11 | "define": true, 12 | "module": true, 13 | "noGlobal": true 14 | }, 15 | "rules": { 16 | "strict": ["error", "function"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/jsonp.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "./var/nonce", 4 | "./var/rquery", 5 | "../ajax" 6 | ], function( jQuery, nonce, rquery ) { 7 | 8 | "use strict"; 9 | 10 | var oldCallbacks = [], 11 | rjsonp = /(=)\?(?=&|$)|\?\?/; 12 | 13 | // Default jsonp settings 14 | jQuery.ajaxSetup( { 15 | jsonp: "callback", 16 | jsonpCallback: function() { 17 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 18 | this[ callback ] = true; 19 | return callback; 20 | } 21 | } ); 22 | 23 | // Detect, normalize options and install callbacks for jsonp requests 24 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 25 | 26 | var callbackName, overwritten, responseContainer, 27 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 28 | "url" : 29 | typeof s.data === "string" && 30 | ( s.contentType || "" ) 31 | .indexOf( "application/x-www-form-urlencoded" ) === 0 && 32 | rjsonp.test( s.data ) && "data" 33 | ); 34 | 35 | // Handle iff the expected data type is "jsonp" or we have a parameter to set 36 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 37 | 38 | // Get callback name, remembering preexisting value associated with it 39 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 40 | s.jsonpCallback() : 41 | s.jsonpCallback; 42 | 43 | // Insert callback into url or form data 44 | if ( jsonProp ) { 45 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 46 | } else if ( s.jsonp !== false ) { 47 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 48 | } 49 | 50 | // Use data converter to retrieve json after script execution 51 | s.converters[ "script json" ] = function() { 52 | if ( !responseContainer ) { 53 | jQuery.error( callbackName + " was not called" ); 54 | } 55 | return responseContainer[ 0 ]; 56 | }; 57 | 58 | // Force json dataType 59 | s.dataTypes[ 0 ] = "json"; 60 | 61 | // Install callback 62 | overwritten = window[ callbackName ]; 63 | window[ callbackName ] = function() { 64 | responseContainer = arguments; 65 | }; 66 | 67 | // Clean-up function (fires after converters) 68 | jqXHR.always( function() { 69 | 70 | // If previous value didn't exist - remove it 71 | if ( overwritten === undefined ) { 72 | jQuery( window ).removeProp( callbackName ); 73 | 74 | // Otherwise restore preexisting value 75 | } else { 76 | window[ callbackName ] = overwritten; 77 | } 78 | 79 | // Save back as free 80 | if ( s[ callbackName ] ) { 81 | 82 | // Make sure that re-using the options doesn't screw things around 83 | s.jsonpCallback = originalSettings.jsonpCallback; 84 | 85 | // Save the callback name for future use 86 | oldCallbacks.push( callbackName ); 87 | } 88 | 89 | // Call if it was a function and we have a response 90 | if ( responseContainer && jQuery.isFunction( overwritten ) ) { 91 | overwritten( responseContainer[ 0 ] ); 92 | } 93 | 94 | responseContainer = overwritten = undefined; 95 | } ); 96 | 97 | // Delegate to script 98 | return "script"; 99 | } 100 | } ); 101 | 102 | } ); 103 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/parseHTML", 4 | "../ajax", 5 | "../traversing", 6 | "../manipulation", 7 | "../selector" 8 | ], function( jQuery ) { 9 | 10 | "use strict"; 11 | 12 | /** 13 | * Load a url into a page 14 | */ 15 | jQuery.fn.load = function( url, params, callback ) { 16 | var selector, type, response, 17 | self = this, 18 | off = url.indexOf( " " ); 19 | 20 | if ( off > -1 ) { 21 | selector = jQuery.trim( url.slice( off ) ); 22 | url = url.slice( 0, off ); 23 | } 24 | 25 | // If it's a function 26 | if ( jQuery.isFunction( params ) ) { 27 | 28 | // We assume that it's the callback 29 | callback = params; 30 | params = undefined; 31 | 32 | // Otherwise, build a param string 33 | } else if ( params && typeof params === "object" ) { 34 | type = "POST"; 35 | } 36 | 37 | // If we have elements to modify, make the request 38 | if ( self.length > 0 ) { 39 | jQuery.ajax( { 40 | url: url, 41 | 42 | // If "type" variable is undefined, then "GET" method will be used. 43 | // Make value of this field explicit since 44 | // user can override it through ajaxSetup method 45 | type: type || "GET", 46 | dataType: "html", 47 | data: params 48 | } ).done( function( responseText ) { 49 | 50 | // Save response for use in complete callback 51 | response = arguments; 52 | 53 | self.html( selector ? 54 | 55 | // If a selector was specified, locate the right elements in a dummy div 56 | // Exclude scripts to avoid IE 'Permission Denied' errors 57 | jQuery( "
    " ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 58 | 59 | // Otherwise use the full result 60 | responseText ); 61 | 62 | // If the request succeeds, this function gets "data", "status", "jqXHR" 63 | // but they are ignored because response was set above. 64 | // If it fails, this function gets "jqXHR", "status", "error" 65 | } ).always( callback && function( jqXHR, status ) { 66 | self.each( function() { 67 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 68 | } ); 69 | } ); 70 | } 71 | 72 | return this; 73 | }; 74 | 75 | } ); 76 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Cross-browser xml parsing 8 | jQuery.parseXML = function( data ) { 9 | var xml; 10 | if ( !data || typeof data !== "string" ) { 11 | return null; 12 | } 13 | 14 | // Support: IE 9 - 11 only 15 | // IE throws on parseFromString with invalid input. 16 | try { 17 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18 | } catch ( e ) { 19 | xml = undefined; 20 | } 21 | 22 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 23 | jQuery.error( "Invalid XML: " + data ); 24 | } 25 | return xml; 26 | }; 27 | 28 | return jQuery.parseXML; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /public/bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../ajax" 5 | ], function( jQuery, document ) { 6 | 7 | "use strict"; 8 | 9 | // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10 | jQuery.ajaxPrefilter( function( s ) { 11 | if ( s.crossDomain ) { 12 | s.contents.script = false; 13 | } 14 | } ); 15 | 16 | // Install script dataType 17 | jQuery.ajaxSetup( { 18 | accepts: { 19 | script: "text/javascript, application/javascript, " + 20 | "application/ecmascript, application/x-ecmascript" 21 | }, 22 | contents: { 23 | script: /\b(?:java|ecma)script\b/ 24 | }, 25 | converters: { 26 | "text script": function( text ) { 27 | jQuery.globalEval( text ); 28 | return text; 29 | } 30 | } 31 | } ); 32 | 33 | // Handle cache's special case and crossDomain 34 | jQuery.ajaxPrefilter( "script", function( s ) { 35 | if ( s.cache === undefined ) { 36 | s.cache = false; 37 | } 38 | if ( s.crossDomain ) { 39 | s.type = "GET"; 40 | } 41 | } ); 42 | 43 | // Bind script tag hack transport 44 | jQuery.ajaxTransport( "script", function( s ) { 45 | 46 | // This transport only deals with cross domain requests 47 | if ( s.crossDomain ) { 48 | var script, callback; 49 | return { 50 | send: function( _, complete ) { 51 | script = jQuery( " 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {{{body}}} 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 91 | 92 | -------------------------------------------------------------------------------- /views/markdown/about-us.md: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | ### LoanCo Sample App 5 | 6 | > A sample loan application that demonstrates some common DocuSign API workflows including requesting signatures, focused view, forms and data, and real-time status. 7 | 8 |
    9 | 10 |
    11 | 12 | __Source on GitHub: https://github.com/DocuSign/sample-app-loanco-nodejs__ 13 | 14 |
    15 |
    16 | 17 |

    LoanCo features:

    18 | 19 |
      20 |
    • Send document for signature
    • 21 |
    • Send from template
    • 22 |
    • Focused view
    • 23 |
    • Forms and form-field Data
    • 24 |
    • Real-time status
    • 25 |
    • Custom Branding
    • 26 |
    • Document visibility
    • 27 |
    • Signer Attachment Tabs
    • 28 |
    • Calculated (formula) fields
    • 29 |
    • Download documents and audit trails
    • 30 |
    31 |
    32 | 33 |
    34 |
    35 |

    API Tools and Links

    36 | 37 |
    Developer Center
    38 | https://developers.docusign.com 39 | 40 |
    DocuSign eSignature API Code Examples
    41 | hhttps://developers.docusign.com/docs/esign-rest-api/how-to/ 42 | 43 |
    DocuSign eSignature API Documentation
    44 | https://developers.docusign.com/docs/esign-rest-api/reference/ 45 | 46 |
    Developer Community
    47 | https://stackoverflow.com/questions/tagged/docusignapi 48 | 49 |
    50 | 51 | ### About DocuSign 52 | 53 | * More than __600 million users__ in __188 countries__ 54 | * More than 300,000 companies 55 | * More than 300,000 new unique users join The DocuSign Global Trust Network every day 56 | * More than 64% of documents are completed within one hour 57 | * DocuSign is available in 43 languages 58 | 59 |
    60 | 61 | [DocuSign.com](http://www.docusign.com/) 62 | -------------------------------------------------------------------------------- /views/partials/footer.hbs: -------------------------------------------------------------------------------- 1 | 2 |
    3 |

    © 2023 DocuSign Inc.

    4 |
    -------------------------------------------------------------------------------- /views/partials/header.hbs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /views/pop.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DocuSign SDK - Frame Pop 5 | 6 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /views/remotesign.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{> header}} 3 | 4 |
    5 |

    6 |

    7 |
    8 |
    9 | 10 | The Envelope has been sent. Please check your email inbox for an invitation to sign from DocuSign. 11 | 12 |
    13 |
    14 |
    15 |

    16 | 17 | {{> footer}} 18 |
    -------------------------------------------------------------------------------- /views/signingreturn.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{> header}} 3 | 4 |
    5 | 6 |
    7 |
    8 | 9 |
    10 | {{#ifCond event "==" "signing_complete"}} 11 |

    12 | Signing Complete! 13 |

    14 |

    15 | {{msg}} 16 |

    17 | {{else}} 18 |

    19 | {{#if event}} 20 | Return Event: {{event}} 21 | {{/if}} 22 |

    23 |

    24 | {{msg}} 25 |

    26 | 27 | {{/ifCond}} 28 | 29 |
    30 |
    31 | {{#if waitingForRemote}} 32 |
    33 | 34 | Your application has been completed and is pending review. We will be in touch soon! 35 | 36 |
    37 | {{else}} 38 | {{#if nextUrl}} 39 |
    40 | 41 | Click to go to the next Signer 42 | 43 |
    44 | {{else}} 45 |
    46 | Back to Home 47 |
    48 | {{/if}} 49 | {{/if}} 50 | 51 | 52 |
    53 |

    54 |
    55 | View My Submissions 56 |

    57 |
    58 | 59 |
    60 |
    61 | 62 |
    63 | 64 |
    65 | 66 | 67 | 68 |
    69 |
    70 |
    71 |

    72 | Get Started with the DocuSign API Today 73 |

    74 |
    75 |
    76 |
    77 | 84 |
    85 |
    86 |

    87 |
    88 | With a Developer Account you can test our APIs for free! Developer Accounts do not expire and have Enterprise level features enabled. 89 |

    90 |
    91 |
    92 |
    93 | 94 |
    95 |
    96 | 97 |
    98 | 99 |

    100 | Possible Signing Return Events 101 |

    102 | 103 |
    104 | 105 |

    106 | When a signer returns from an focused view experience, your application receives one of the following events in the query string: 107 |

    108 | 109 |
    110 |

    111 | signing_complete 112 |
    113 | The recipient has signed the document! The document will be securely stored on the DocuSign, Inc. servers. 114 |

    115 | 116 |

    117 | cancel 118 |
    119 | The recipient decides to finish later. The clicked 'Finish Later' instead of 'Decline to Sign' 120 |

    121 | 122 |

    123 | decline 124 |
    125 | The recipient declined to sign the document. This has VOIDED the document. 126 |

    127 | 128 |

    129 | exception 130 |
    131 | An exception has occurred on the server during the signing session. Please check the parameters passed to the Web Service Methods. 132 |

    133 | 134 |

    135 | fax_pending 136 |
    137 | Recipient has a fax pending. 138 |

    139 | 140 |

    141 | session_timeout 142 |
    143 | The recipient did not sign the document in time. The timeout is set to 20 minutes. 144 |

    145 | 146 |

    147 | ttl_expired 148 |
    149 | The token was not used within the timeout period or the token was already accessed. 150 |

    151 | 152 |

    153 | viewing_complete 154 |
    155 | The recipient did not need to sign but has completed the viewing ceremony. 156 |

    157 | 158 |

    159 | Learn more about focused view 160 |

    161 | 162 |
    163 | 164 | 165 |
    166 | 167 |
    168 |
    169 | 170 | {{> footer}} 171 |
    -------------------------------------------------------------------------------- /views/static.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{> header}} 3 | 4 |
    5 | 6 | {{{content}}} 7 | 8 |
    9 | 10 | {{> footer}} 11 | 12 |
    13 | --------------------------------------------------------------------------------