-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbugsignerpage1.php
More file actions
36 lines (34 loc) · 1.7 KB
/
bugsignerpage1.php
File metadata and controls
36 lines (34 loc) · 1.7 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
<script>
HelloSign.init("<?php echo $client_id ?>");
HelloSign.open({
url: "<?php echo $sign_url ?>",
uxVersion: 2,
allowCancel: true,
skipDomainVerification: true,
debug: true,
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("Event 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) {
window.alert("Template id <?php echo $template_id ?> created!");
console.log(eventData);
window.location = "index.php";
}
}
});
</script>