fix styling

This commit is contained in:
Arthur Lu 2024-01-29 21:49:19 +00:00
parent f6e370db2c
commit 3191927b27
2 changed files with 8 additions and 10 deletions

View File

@ -1,7 +1,6 @@
.input-grid { .input-grid {
display: grid; display: grid;
column-gap: 10px; gap: 5px 10px;
row-gap: 5px;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }

View File

@ -139,14 +139,13 @@ function handlePasswordChangeForm () {
} }
}); });
var password = d.querySelector("#new-password") const password = d.querySelector("#new-password");
var confirm_password = d.querySelector("#confirm-password"); const confirmPassword = d.querySelector("#confirm-password");
function validatePassword(){ function validatePassword () {
confirm_password.setCustomValidity( password.value != confirmPassword.setCustomValidity(password.value !== confirmPassword.value ? "Passwords Don't Match" : "");
confirm_password.value ? "Passwords Don't Match" : '');
} }
password.addEventListener("change", validatePassword); password.addEventListener("change", validatePassword);
confirm_password.addEventListener("keyup", validatePassword); confirmPassword.addEventListener("keyup", validatePassword);
} }