Fixed UI issues
This commit is contained in:
parent
4d1abaf9aa
commit
41f5eff4d7
|
|
@ -1,15 +1,35 @@
|
|||
|
||||
<div class="container">
|
||||
<h2>DocTracker</h2>
|
||||
<div class="logo">
|
||||
<img id="logo-img" src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
|
||||
</div>
|
||||
<form class="card">
|
||||
<h2>Reset your password</h2>
|
||||
<input type="email" placeholder="Enter your email address*" required />
|
||||
<button type="submit">Send password reset code</button>
|
||||
<a href="/">Go back to login</a>
|
||||
<a href="/client/login">Go back to login</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const root = document.documentElement;
|
||||
|
||||
function setTheme(theme) {
|
||||
document.getElementById("logo-img").src =
|
||||
theme === "dark"
|
||||
? "/public/images/logo-white-vertical.svg"
|
||||
: "/public/images/logo-colored-vertical.svg";
|
||||
root.setAttribute("data-theme", theme);
|
||||
}
|
||||
|
||||
function getSystemTheme() {
|
||||
return window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? "dark"
|
||||
: "light";
|
||||
}
|
||||
|
||||
setTheme(getSystemTheme());
|
||||
|
||||
function validateEmail(email) {
|
||||
const emailRegex = /^[a-zA-Z0-9](?:[a-zA-Z0-9]*[._-]?[a-zA-Z0-9]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9]*[-]?[a-zA-Z0-9]+)*\.[a-zA-Z]{2,}$/;
|
||||
return emailRegex.test(email);
|
||||
|
|
@ -64,7 +84,7 @@
|
|||
if (response.ok) {
|
||||
if(response.success) {
|
||||
if(confirm('Please Check your mail inbox for password reset link')) {
|
||||
window.location.href = "/"; // Redirect to reset password page
|
||||
window.location.href = "/client/login"; // Redirect to reset password page
|
||||
// console.log(response)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/public/images/favicon.svg" sizes="any">
|
||||
<title>DocVA | Reset Password</title>
|
||||
|
||||
<style>
|
||||
|
|
@ -112,6 +113,17 @@
|
|||
opacity: 1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 170px;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/public/images/favicon.svg" sizes="any">
|
||||
<title>Client Registration</title>
|
||||
|
||||
<link href="/public/css/va-register.css" rel="stylesheet">
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/public/images/favicon.svg" sizes="any">
|
||||
<title>Virtual Assistant Registration</title>
|
||||
|
||||
<link href="/public/css/va-register.css" rel="stylesheet">
|
||||
|
|
|
|||
Loading…
Reference in New Issue