-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f87f39a
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<!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"> | ||
<title>Registration Page</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="registration.css"> | ||
<!-- <style> | ||
.login-btn1 { | ||
width: 300%; | ||
padding: 10px; | ||
color: white; | ||
background: linear-gradient(to right, #ff966d, #fa538d, #89379c); | ||
border: none; | ||
border-radius: 20px; | ||
cursor: pointer; | ||
margin-top: 10px; | ||
} | ||
</style> --> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div class="design"> | ||
<div class="pill-1 rotate-45"></div> | ||
<div class="pill-2 rotate-45"></div> | ||
<div class="pill-3 rotate-45"></div> | ||
<div class="pill-4 rotate-45"></div> | ||
</div> | ||
|
||
<div class="login"> | ||
<h3 class="title">Admin Registration</h3> | ||
|
||
<div class="text-input"> | ||
<i class="ri-lock-fill"></i> | ||
<input type="name" class="form-control" id="name" name="name" placeholder="Full Name"> | ||
</div> | ||
|
||
<div class="text-input"> | ||
<i class="ri-lock-fill"></i> | ||
<input type="email" class="form-control" id="email" name="email" placeholder="Enter Email"> | ||
</div> | ||
|
||
<div class="text-input"> | ||
<i class="ri-lock-fill"></i> | ||
<input type="password" class="form-control" id="password" name="password" placeholder="Enter Password"> | ||
</div> | ||
|
||
<!-- <button class="login-btn">LOGIN</button> --> | ||
<!-- <a href="#" class="forgot">Forgot Username/Password?</a> --> | ||
<button type="button" onclick="saveData()" class="login-btn" id="save_btn">Register</button> | ||
|
||
<div class="create"> | ||
<p style="font-size: 12px; margin-right: 5px;">already have an account</p><a href="login.html">LOGIN</a> | ||
<i class="ri-arrow-right-fill"></i> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
<script> | ||
function saveData() { | ||
let name, email, password; | ||
name = document.getElementById("name").value; | ||
email = document.getElementById("email").value; | ||
password = document.getElementById("password").value; | ||
|
||
// localStorage.setItem("name",name); | ||
// localStorage.setItem("email",email); | ||
// localStorage.setItem("password",password); | ||
|
||
let user_records = new Array(); | ||
user_records = JSON.parse(localStorage.getItem("users")) ? JSON.parse(localStorage.getItem("users")) : [] | ||
if (user_records.some((v) => { | ||
return v.email == email | ||
})) { | ||
alert("Duplicate Data"); | ||
} | ||
//SAVE MULTIPLE REGISTRATION DATA | ||
|
||
//FINALLY WE ADD THE RESET BUTTON ON LOGIN AND REGISTRATION PAGE | ||
else { | ||
user_records.push({ | ||
"name": name, | ||
"email": email, | ||
"password": password | ||
}) | ||
localStorage.setItem("users", JSON.stringify(user_records)); | ||
window.location.href = "login.html" | ||
} | ||
|
||
} | ||
</script> | ||
|
||
</html> |