you1996 fd04fb58d0
fix: add hint for password-confirmation (#1863)
* fix:add hint for password-confirmation

* Update internal/ui/login/static/i18n/de.yaml

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
2021-06-17 15:46:32 +02:00

18 lines
616 B
JavaScript

function CheckRegisterPwPolicy() {
let policyElement = document.getElementById("register-password");
let pwNew = policyElement.value;
let pwNewConfirmation = document.getElementById("register-password-confirmation").value;
if (ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) === false) {
policyElement.setAttribute("color", "warn");
return false;
} else {
policyElement.setAttribute("color", "primary");
}
return pwNew == pwNewConfirmation;
}
let button = document.getElementById("register-button");
disableSubmit(CheckRegisterPwPolicy, button);