-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.html
More file actions
354 lines (346 loc) · 12 KB
/
view.html
File metadata and controls
354 lines (346 loc) · 12 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
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>View Students</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="styles/style.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"
/>
</head>
<body>
<div class="sideBar position-fixed z-3">
<div
class="d-flex flex-column flex-shrink-0 bg-dark position-static vh-100"
style="width: 4.5rem"
>
<a
href=""
class="d-block p-3 link-dark text-decoration-none mb-5"
title=""
data-bs-toggle="tooltip"
data-bs-placement="right"
data-bs-original-title="Icon-only"
>
<i
class="bi bi-kanban-fill text-light d-flex justify-content-center h2"
></i>
<span class="visually-hidden">Icon-only</span>
</a>
<ul class="nav nav-pills nav-flush flex-column mb-auto text-center">
<li class="my-3">
<a
href="./index.html"
class="nav-link py-3"
title=""
data-bs-toggle="tooltip"
data-bs-placement="right"
data-bs-original-title="Orders"
>
<i class="bi bi-house-fill h3"></i>
</a>
</li>
<li class="nav-item my-3">
<a
href="./add.html"
class="nav-link py-3"
aria-current="page"
title=""
data-bs-toggle="tooltip"
data-bs-placement="right"
data-bs-original-title="Home"
>
<i class="bi bi-person-plus-fill h3"></i>
</a>
</li>
<li class="my-3">
<div
class="nav-link active py-3"
title=""
data-bs-toggle="tooltip"
data-bs-placement="right"
data-bs-original-title="Dashboard"
>
<i class="bi bi-person-lines-fill h3"></i>
</div>
</li>
</ul>
<div class="border-top">
<a
href="https://github.com/Tharush2002"
class="d-flex align-items-center justify-content-center p-3 link-dark text-decoration-none"
>
<i class="bi bi-github text-light h2"></i>
</a>
</div>
</div>
</div>
<div class="content">
<div class="title bg-primary p-3 rounded-4 mb-5">
<div class="h2 fw-bolder m-0 py-2">STUDENT MANAGEMENT SYSTEM</div>
</div>
<div class="mx-lg-5 px-md-3" id="update-contact-container">
<div
class="update-contact-pane bg-secondary-subtle rounded-3 p-md-4 p-3 mb-5 mx-lg-3"
id="update-contact-pane"
>
<div
class="d-flex flex-wrap justify-content-md-around justify-content-between"
>
<div
class="d-flex flex-column align-items-center justify-content-center"
id="profilePic"
>
<div
class="border border-dark border-1 img-fluid"
id="profilePictureContainer"
>
<img
src="./img/profile-pic.jpg"
width="100%"
height="100%"
alt=""
id="profilePicture"
/>
</div>
<form id="inputFile">
<i
class="bi bi-cloud-arrow-up-fill h4 me-2"
style="position: relative; top: 2px"
></i>
<input
id="file-input"
type="file"
style="max-width: 65%"
accept="image/*"
disabled
/>
</form>
<p
class="text-danger fw-bolder"
style="font-size: small"
id="errorMessage"
></p>
</div>
<div
class="d-flex flex-column rounded-5 d-none d-md-block"
id="divider"
></div>
<div class="d-flex flex-column py-3" id="profileContent">
<div
class="div d-flex justify-content-center align-items-center h3 fw-bolder"
id="formTitle"
>
Update Students Form
</div>
<form class="mt-4" id="updateForm">
<div class="row">
<div class="form-group col-md-6 mt-3">
<label for="inputName">Full Name :</label>
<input
type="text"
class="form-control"
id="inputName"
placeholder="Abcd Efgh"
disabled
required
/>
</div>
<div class="form-group col-md-6 mt-3">
<label for="inputEmail">Email :</label>
<input
type="email"
class="form-control"
id="inputEmail"
placeholder="someone@example.com"
disabled
required
/>
</div>
</div>
<div class="form-group mt-3">
<label for="inputAddress">Address :</label>
<input
type="text"
class="form-control"
id="inputAddress"
placeholder="1234 Main St"
disabled
required
/>
</div>
<div class="row">
<div class="form-group col-10 mt-3">
<label for="inputPhoneNumber">Primary Phone Number :</label>
<input
type="tel"
class="form-control"
pattern="^(\d{10}|(\+\d{11,15}))$"
id="inputPrimaryPhoneNumber"
placeholder="xxxxxxxxxx or +xxxxxxxxxx"
disabled
required
/>
</div>
<div
class="col-2 mt-2 d-flex align-items-end justify-content-end"
>
<button
class="btn btn-success rounded-3 border border-success border-2"
id="btnAddSecondaryNumber"
onclick="addSecondaryNumber()"
disabled
>
<i class="bi bi-plus-square-fill text-light h4"></i>
</button>
</div>
</div>
<div class="row" id="secondaryNumber"></div>
<div class="row">
<div class="form-group col-md-5 mt-3">
<label for="inputDOB">Date of Birth :</label>
<input
type="date"
class="form-control"
id="inputDOB"
disabled
required
/>
</div>
<div class="form-group col-md-4 mt-3">
<label for="inputState">Gender :</label>
<select id="inputGender" class="form-control" disabled>
<option selected>Male</option>
<option>Female</option>
</select>
</div>
<div class="form-group col-md-3 mt-3">
<label for="inputAge">Age :</label>
<input
type="number"
min="18"
max="75"
class="form-control"
id="inputAge"
disabled
readonly
/>
</div>
</div>
<div class="d-flex flex-row-reverse">
<button
class="btn btn-danger mt-5 ms-4"
id="btnDeleteStudent"
onclick="btnDeleteStudentFromDatabase(event)"
>
Delete
</button>
<button class="btn btn-success mt-5" id="btnEditStudent" onclick="editOnAction(event)">
Edit
</button>
</div>
</form>
</div>
</div>
</div>
<table
class="table table-responsive table-hover table-bordered"
>
<thead class="table-dark">
<tr class="text-center h5">
<th class="fw-bolder" scope="col">Name</th>
<th class="fw-bolder" scope="col">Age</th>
<th class="fw-bolder" scope="col">Email</th>
<th class="fw-bolder" scope="col">Address</th>
<th class="fw-bolder" scope="col">Gender</th>
<th class="fw-bolder" scope="col">Date of Birth</th>
<th class="fw-bolder" scope="col">Contact Number</th>
</tr>
</thead>
<tbody id="tableBody" class="table-secondary">
</tbody>
</table>
<div style="visibility: hidden;" class="text-danger h4 fw-bolder mt-4 p-3 text-center" id="noStudents">No students Available in the Database..</div>
</div>
</div>
<!-- LOADING SCREEN -->
<div
class="position-absolute"
id="loadingScreen"
>
<div class="d-flex flex-column justify-content-center text-center">
<div class="spinner-grow text-light" style="width: 9rem; height: 9rem;" role="status">
</div>
<div class="mt-4 text-white h5 fw-bolder">LOADING...</div>
</div>
</div>
<!-- EDIT TOAST -->
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div
id="editToast"
class="toast border border-1 border-dark"
role="alert"
aria-live="assertive"
aria-atomic="true"
data-bs-delay="7500"
>
<div class="toast-header bg-success text-white h5">
<strong class="me-auto">Success !</strong>
<button
type="button"
class="btn-close"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
<div class="toast-body fw-bolder">
Student edited successfully...
</div>
</div>
</div>
<!-- DELETE TOAST -->
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div
id="deleteToast"
class="toast border border-1 border-dark"
role="alert"
aria-live="assertive"
aria-atomic="true"
data-bs-delay="7500"
>
<div class="toast-header bg-danger text-white h5">
<strong class="me-auto">Success !</strong>
<button
type="button"
class="btn-close"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
<div class="toast-body fw-bolder">
Student removed from the databse successfully...
</div>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
<script src="./js/app.js"></script>
<script>
document.addEventListener("DOMContentLoaded", async () => {
document.getElementById("file-input").value = "";
await loadStudents();
});
</script>
</body>
</html>