-
Notifications
You must be signed in to change notification settings - Fork 7
/
bulk_checkin.html
80 lines (76 loc) · 2.38 KB
/
bulk_checkin.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
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
label {
font-weight: bold;
}
#confirm {
background: MediumSeaGreen;
margin-right: 40px;
}
#cancel {
background: FireBrick;
}
#confirm,
#cancel {
color: white;
border: 1px solid black;
font-size: 12px;
border-radius: 5px;
}
</style>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons.css">
<script>
function processForm() {
var form = document.getElementById('status');
google.script.run
.withSuccessHandler(closeWindow)
.runBulkCheckin(form);
}
function closeWindow() {
google.script.host.close();
}
</script>
</head>
<body>
<h1>Bulk Checkin Assets</h1>
<p>Select a status for the checked-in devices. Optionally specify a location as well.</p>
<form id="status">
<table width="100%">
<fieldset>
<p>
<label>Select Status</label>
<select id = "myList" name="status_name">
<option value = "Storage">Storage</option>
<option value = "Lab">Lab</option>
<option value = "Departmental">Departmental</option>
<option value = "Recycle">Recycle</option>
</select>
</p>
</fieldset>
<tr>
<td><label>Location:</label></td>
<td>
<input type="text" list="locations" name="location" placeholder="Start typing a location" value="" />
<datalist id="locations">
<? var options = getLocations()
for (var i = 0; i < options.length; i++) { ?>
<option value=<?= options[i] ?>></option>
<? } ?>
</datalist>
</td>
</tr>
<tr>
<td><label>Selected Device Tags:</label></td><td><input type="text" name="tags" size="40" disabled=true style="color: grey;" value="<?= tags ?>" /></td>
</tr>
</table>
<div align="Center">
<input type="button" id="confirm" value="Confirm" onclick="processForm()" /> <input type="button" id="cancel" value="Cancel" onclick="google.script.host.close()" />
</div>
<p id="result"></p>
<p><em>Window will close upon completion unless errors occur.</em></p>
</form>
</body>
</html>