-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (98 loc) · 2.41 KB
/
index.html
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Grispi Plugin Showcase</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="index.css?1" />
<!-- Ensure that grispi-plugin.js is loaded before your own scripts -->
<script type="text/javascript" src="https://grispi.app/grispi-plugin-sdk/grispi-app.js"></script>
</head>
<body>
<main>
<h1>Plugin Showcase</h1>
<fieldset>
<label>Current Agent</label>
<div>
<label>User ID</label>
<input readonly name="user-id">
</div>
<div>
<label >Name</label>
<input readonly name="user-full-name">
</div>
<div>
<label>Email</label>
<input readonly name="user-email">
</div>
<div>
<label>Phone</label>
<input readonly name="user-phone">
</div>
</fieldset>
<br>
<fieldset>
<label>Ticket's Requester</label>
<div>
<label>User ID</label>
<input readonly name="requester-id">
</div>
<div>
<label >Name</label>
<input readonly name="requester-full-name">
</div>
<div>
<label>Email</label>
<input readonly name="requester-email">
</div>
<div>
<label>Phone</label>
<input readonly name="requester-phone">
</div>
</fieldset>
<br>
<fieldset>
<label>Current Ticket</label>
<div>
<label>Current Ticket Key</label>
<input readonly name="ticket-key">
</div>
<div>
<label>Fields</label><br>
<textarea readonly name="ticket-fields" rows="20"></textarea>
</div>
</fieldset>
<br>
<fieldset>
<label>Update Ticket</label>
<div>
<label>Set Field Value</label>
<select>
<optgroup label="System Fields">
<option>Subject</option>
<option>Comment</option>
<option>Requester</option>
</optgroup>
<optgroup label="Custom Fields">
<option>Location [tu.field1]</option>
<option>VIP user priority [tu.field2]</option>
<option>City [tu.field3]</option>
</optgroup>
</select>
<input name="ticket-field-value">
</div>
<button>Update</button>
</fieldset>
<br>
<fieldset>
<h3>Console</h3>
<div id="log"></div>
</fieldset>
</main>
<script>
document.getElementById('log').innerText += `${new Date().toLocaleTimeString()} Rendered.`
</script>
<!-- Ensure your script is loaded after grispi-plugin.js -->
<script type="text/javascript" src="plugin-implementation.js"></script>
</body>
</html>