mirror of
https://github.com/AdrienHallet/HaitiWater.git
synced 2026-10-28 18:36:27 +00:00
18 lines
603 B
JavaScript
18 lines
603 B
JavaScript
/**
|
|
* Handles the forms of the profile modification
|
|
*/
|
|
$(document).ready(function() {
|
|
let password = document.getElementById("input-new-password")
|
|
, confirm_password = document.getElementById("input-new-password-confirm");
|
|
|
|
function validatePassword() {
|
|
if (password.value !== confirm_password.value) {
|
|
confirm_password.setCustomValidity("Les mots de passe ne sont pas identiques !");
|
|
} else {
|
|
confirm_password.setCustomValidity('');
|
|
}
|
|
}
|
|
|
|
password.onchange = validatePassword;
|
|
confirm_password.onkeyup = validatePassword;
|
|
}); |