-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugsignerpage1.php
More file actions
44 lines (43 loc) · 1.96 KB
/
bugsignerpage1.php
File metadata and controls
44 lines (43 loc) · 1.96 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
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<title>let's test inside html</title>
<script type="text/javascript" src="https://s3.amazonaws.com/cdn.hellosign.com/public/js/hellosign-embedded.LATEST.min.js"></script>
</head>
<body>
<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>
</body>
</html>