-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtesting.html
More file actions
127 lines (91 loc) · 4.15 KB
/
testing.html
File metadata and controls
127 lines (91 loc) · 4.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/admin-css.css">
<title>Admin Panel</title>
</head>
<body>
<div class="body-div">
<h1>Applications</h2>
<div class="sections-wrapper">
<section class="section accepted-section">
<h2>Accepted List</h2>
<div class="section-list">
<div>Accepted Application No: 2019</div>
</div>
</section>
<section class="section pending-section">
<h2>Pending List</h2>
<div class="section-list-pending">
<div>
<a href="default-url/applic_id" id="pending-application-btn" class="pending-application-btn">Edit the Application No: 1234</a>
</div>
<!-- this below commented code should render in the redirected page -->
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<button class="accept-btn modal-btn" id="accept-btn">Accept</button>
<div id="reg-num-input" class="modal-div">
<input type="number" placeholder="Registration Number" class="modal-input" name="registration-number">
<input type="submit" class="modal-btn">
</div>
<button class="reject-btn modal-btn" id="reject-btn">Reject</button>
<div id="rej-reason-input" class="modal-div">
<input type="text" name="reject-reason" placeholder="Reason for Rejection" class="modal-input" name="reject-reason">
<input type="submit" class="modal-btn">
</div>
</div>
</div>
</div>
</section>
<section class="section rejected-section">
<h2>Rejected List</h2>
<div class="section-list">
<div>Rejected Application No: 2020</div>
</div>
</section>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
var btn = document.getElementById("pending-application-btn");
var span = document.getElementsByClassName("close")[0];
var acc_btn = document.getElementById("accept-btn");
var rej_btn = document.getElementById("reject-btn");
var accept_div = document.getElementById("reg-num-input");
var reject_div = document.getElementById("rej-reason-input");
btn.onclick = function() {
modal.style.display = "block";
}
span.onclick = function() {
modal.style.display = "none";
rej_btn.style.display = "inline-block";
acc_btn.style.display = "inline-block";
accept_div.style.display = "none";
reject_div.style.display = "none";
}
acc_btn.onclick = function() {
accept_div.style.display = "block";
rej_btn.style.display = "none";
acc_btn.style.display = "none";
}
rej_btn.onclick = function() {
reject_div.style.display = "block";
acc_btn.style.display = "none";
rej_btn.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
accept_div.style.display = "none";
reject_div.style.display = "none";
rej_btn.style.display = "inline-block";
acc_btn.style.display = "inline-block";
modal.style.display = "none";
}
}
</script>
</body>
</html>