-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
in.html
71 lines (67 loc) · 2.18 KB
/
in.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Entry Management Software</title>
<link rel="stylesheet" href="./stylesheet/form.css" />
</head>
<body
style="overflow: hidden;background: radial-gradient(rgba(51, 210, 57, 1),rgba(49, 128, 23, 1));"
>
<button
id="back"
class="green"
onclick="linker('app')"
title="Back to Main Page"
>
←
</button>
<div id="header" class="green">Check In Form</div>
<form>
<!-- placeholder from summergeek -->
<label>Name: </label><br />
<input id="name" name="name" placeholder="Anant Sharma" /><br /><br />
<label>Email: </label><br />
<input
id="email"
name="email"
placeholder="a.sharma@xyz.com"
/><br /><br />
<label>Phone: </label><br />
<input name="no" id="no" placeholder="9999999999" /><br /><br />
<label>Host: </label><br />
<select id="host"
><br /><br />
<option selected></option> </select
><br /><br />
<center>
<button type="button" class="green" onclick="validate('host')">
Check In
</button>
</center>
</form>
<script>
const { remote } = require("electron");
firebase = remote.getGlobal("firey");
let firebaseRef = firebase.database().ref("host");
//Code for adding options in select tag
firebaseRef.once("value").then(host_list => {
if (host_list.exists()) {
host_list.forEach(host => {
let { name, session } = host.val();
//session can be true(host not available),invalid(host removed) or false(host available)!
if (session == false) {
let temp = document.createElement("option");
temp.innerText = name;
temp.id = host.key;
//adding host that are available
document.getElementById("host").appendChild(temp);
}
});
}
});
</script>
<!-- to send msg -->
<script src="./scripts/messaging.js"></script>
<script src="./scripts/form.js"></script>
</body>
</html>