Update Demo_Password_Change.html

This commit is contained in:
Zarcolio
2024-01-20 21:23:00 +01:00
committed by GitHub
parent edd003cabe
commit 334aaff3e7
@@ -5,56 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Change</title> <title>Password Change</title>
<style> <style>
body { /* ... (previous CSS code) ... */
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 300px;
}
h1 {
text-align: center;
color: #333;
}
label {
display: block;
margin-bottom: 10px;
color: #555;
}
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 3px;
}
button {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.success {
color: #009900;
}
.error {
color: #ff0000;
}
</style> </style>
</head> </head>
<body> <body>
@@ -80,10 +31,10 @@
if (newPassword === confirmPassword) { if (newPassword === confirmPassword) {
messageDiv.innerHTML = "<p class='success'>Password changed successfully!</p>"; messageDiv.innerHTML = "<p class='success'>Password changed successfully!</p>";
return true; return false; // Prevent form submission
} else { } else {
messageDiv.innerHTML = "<p class='error'>Passwords do not match. Please try again.</p>"; messageDiv.innerHTML = "<p class='error'>Passwords do not match. Please try again.</p>";
return false; return false; // Prevent form submission
} }
} }
</script> </script>