forked from SharmaS1402/Certifica_Authentify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_up.html
237 lines (231 loc) · 7.07 KB
/
sign_up.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sign Up</title>
<link rel="stylesheet" href="/css/login.css" />
<!-- <style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f7f7f7;
}
.container {
width: 400px;
margin: 100px auto;
background-color: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
color: #333;
margin-bottom: 30px;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
font-weight: bold;
margin-bottom: 5px;
color: #555;
}
input[type="text"],
input[type="password"],
select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
transition: border-color 0.3s ease;
}
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
outline: none;
border-color: #4CAF50;
}
select {
cursor: pointer;
}
.secret-key {
display: none;
}
button[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 12px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
width: 100%;
font-size: 16px;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #45a049;
}
</style> -->
</head>
<body>
<div class="container">
<img
src="/images/login-register/image.png"
width="450px"
alt="certificate-bg"
/>
<form class="form" id="signup-form" action="/signup" method="post">
<div style="padding-left: 40px; align-self: start;">
<h2>Welcome to</h2>
<h1>Certificate Authentication</h1>
</div>
<div class="inputFieldsContainer">
<div class="inputBoxFull">
<label>Username </label>
<div class="textBoxImageContainer">
<img
src="/images/login-register/user.png"
width="40px"
alt="user"
class="input-image"
/>
<input
class="inputField"
type="text"
placeholder="Enter your username"
type="text"
id="username"
name="username"
required
/>
</div>
</div>
<div class="inputBoxFull">
<label>Password </label>
<div class="textBoxImageContainer">
<img
id="showPasswordImage"
src="/images/login-register/passwordKey.png"
alt="password"
class="input-image"
style="padding-left: 8px;"
/>
<input
class="inputField"
type="password"
placeholder="Enter your password"
id="password"
name="password"
required
/>
<img
src="/images/login-register/showPassword.png"
alt="password"
class="input-image-show-password"
style="padding-right: 40px; cursor: pointer;"
onclick="togglePassword()"
/>
</div>
</div>
<div class="inputBoxFull">
<label>Account Type </label>
<div class="textBoxImageContainer">
<img
src="/images/login-register/accountType.png"
alt="accountType"
class="input-image"
style="padding-left: 4px;"
/>
<select
class="accountType"
id="accountType"
name="accountType"
onchange="toggleSecretKey()"
>
<option value="admin">Admin user</option>
<option value="user">Normal user</option>
</select>
</div>
</div>
<div class="inputBoxFull" id="secretKeyField">
<label>Passkey </label>
<div class="textBoxImageContainer">
<img
src="/images/login-register/passkey.png"
alt="password"
class="input-image"
style="top: 5%;"
/>
<input
class="inputField"
placeholder="Enter your passkey"
type="password"
id="secretKey"
name="secretKey"
/>
</div>
</div>
</div>
<div class="loginFooter">
<button class="loginButton" type="submit">Sign up</button>
<p>
Already have an account?
<a href="/login"> Login </a>
</p>
</div>
</form>
</div>
<!-- <div class="container">
<h2>Sign Up</h2>
<form id="signup-form" action="/signup" method="post">
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="accountType">Account Type:</label>
<select id="accountType" name="accountType" onchange="toggleSecretKey()">
<option value="issuer" >Issuer</option>
<option value="user">User</option>
</select>
</div>
<div class="form-group secretKey" id="secretKeyField">
<label for="secretKey">Secret Key:</label>
<input type="password" id="secretKey" name="secretKey">
</div>
<div class="form-group">
<button type="submit">Sign Up</button>
</div>
</form>
</div> -->
<script>
function toggleSecretKey() {
var accountType = document.getElementById('accountType').value;
var secretKeyField = document.getElementById('secretKeyField');
if (accountType === 'admin') {
secretKeyField.style.display = 'block';
} else {
secretKeyField.style.display = 'none';
}
}
toggleSecretKey();
function togglePassword(){
console.log("yes")
const passwordField = document.getElementById("password");
if (passwordField.type === 'password') {
passwordField.type = 'text';
} else {
passwordField.type = 'password';
}
};
</script>
</body>
</html>