-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbugsignerpage.php
More file actions
38 lines (36 loc) · 1.88 KB
/
bugsignerpage.php
File metadata and controls
38 lines (36 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<div class="object">
<script>
HelloSign.init("<?php echo $client_id ?>");
HelloSign.open({
url: "<?php echo $sign_url ?>",
uxVersion: 2,
allowCancel: true,
debug: true,
container: document.getElementById('object'),
messageListener: function (eventData) {
("Got message data: " + JSON.stringify(eventData));
if (eventData.event == HelloSign.EVENT_SIGNED) {
alert("Signature Request Signed And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_CANCELED) {
alert("Signature Request Canceled And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_ERROR) {
alert("There Was An Error And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_SENT) {
alert("Signature Request Sent And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_TEMPLATE_CREATED) {
alert("Template Created And Stuff!");
console.log(eventData);
window.location = "index.php";
}
}
});
</script>
</div>