Skip to content

Instantly share code, notes, and snippets.

@eprugh
Created August 12, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eprugh/ab038b4ac4669d12a7bd075b9b021126 to your computer and use it in GitHub Desktop.
Save eprugh/ab038b4ac4669d12a7bd075b9b021126 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/skeleton.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
(function(w,d,s,c,n,a,b){w['PactSafeObject']=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)}, w[n].on=function(){(w[n].e=w[n].e||[]).push(arguments)},w[n].once=function(){(w[n].eo=w[n].eo||[]).push(arguments)},w[n].off=function(){(w[n].o=w[n].o||[]).push(arguments)},w[n].t=1*new Date(); a=d.createElement(s),b=d.getElementsByTagName(s)[0];a.async=1;a.src=c;b.parentNode.insertBefore(a,b) })(window,document,'script','//vault.pactsafe.io/ps.min.js','_ps');
_ps('create', '25b2b173-632a-4227-9877-31d2109d8c98', {
dynamic: true,
signer_id: 'eric@pactsafe.com',
test_mode: true
});
// Don't forget to replace 'group-key' with your own key
_ps('load', 'dynamic-contract', {
container_selector: 'contracts',
render_data: {
first_name: "Eric",
last_name: "Prugh",
company_name: "PactSafe",
title: "Co-founder",
amount: "6,000",
additional_terms: [
{
term: "Term 1!"
},
{
term: "Term 2!"
}
]
}
});
_ps.on('valid', function(e){
console.log(arguments);
console.log("Do whatever you like after they accept");
//OPTIONAL, disables the checkbox from being unchecked
$('.ps-checkbox').prop('disabled', true);
console.log(_ps.getByKey('dynamic-contract').allChecked());
});
</script>
</head>
<body>
<div id="contracts"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment