-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_user.html
206 lines (153 loc) · 7.09 KB
/
add_user.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="stylesheet" href="imtiredofthis.css">
</head>
<body>
<div class="top">
<a href="#" class="notification">
<span>Inbox</span>
<span class="badge">3</span>
</a>
<div class="dropdown-admin">
<button onclick="myFunction()" class="dropbtn-admin">Hi, Admin</button>
<div id="myDropdownAdmin" class="dropdown-content-admin">
<a href="#home">Account</a>
<a href="#about">Setting</a>
<a href="#contact">Logout</a>
</div>
</div>
</div>
<div class="sidenav">
<div class="sidebar-header" style="height: 50px;margin-top: 30px">
<i class="fa fa-users text-success me-4"></i>
<span>ELMS</span>
</div>
<a href="index.html">Dashboard</a>
<button class="dropdown-btn">Department
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
<a href="#">Add Department</a>
<a href="#">Manage Department</a>
</div>
<button class="dropdown-btn">Employee
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
<a href="add_employee.html">Add Employee</a>
<a href="manage_employee.html">Manage employee</a>
</div>
<button class="dropdown-btn">Leaves
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
<a href="manage_leave.html">Manage Leaves</a>
<a href="#">All Leaves</a>
<a href="#">Pending Leaves</a>
<a href="#">Approve Leaves</a>
<a href="#">Not Approve Leaves</a>
</div>
<button class="dropdown-btn">Users
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
<a href="add_user.html">Add User</a>
<a href="#">Manage User</a>
</div>
</div>
<div class="main" for="manage_employee">
<div class="employeedata">
<h3>Add User</h3>
<div class="card-body">
<div class="form-body">
<form action="/action_page.php">
<table class="add-user-table" width="100%">
<tr class="user-table">
<td colspan="2">
<label for="id-number">Full Name</label><br>
<input type="text" id="formpage" name="fname" required>
</td>
</tr>
<tr class="user-table">
<td>
<label for="phone">Contact</label>
<input type="tel" id="formpage" name="phone" placeholder="011-123456789"
pattern="[0-9]{3}-[0-9]{9}" required><br>
</td>
<td colspan="1">
<label for="user-category">User Category</label>
<select id="formpage" name="user-category" required>
<option value="none">Select</option>
<option value="manager">Manager</option>
<option value="admin">Admin</option>
<option value="staff">Staff</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<label for="email">Email</label><br>
<input type="email" id="formpage" name="email" required>
</td>
</tr>
<tr>
<td colspan="1">
<label for="username">Username:</label><br>
<input type="text" id="formpage" name="username" width="100%" required>
</td>
<td>
<label for="pwd">Password:</label>
<input type="password" id="formpage" name="pwd" required>
</td>
<tr>
<td></td>
<td>
<input type="submit" value="Submit" required>
</td>
</tr>
</table>
</div>
</div>
</div>
<script>
/* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content - This allows the user to have multiple dropdowns without any conflict */
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function () {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdownAdmin").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function (event) {
if (!event.target.matches('.dropbtn-admin')) {
var dropdowns = document.getElementsByClassName("dropdown-content-admin");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
</html>