33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
extends ../../../templates/base.pug
|
|
block content
|
|
.row
|
|
.col
|
|
.col
|
|
form(method="POST", action=getUrl("resetPasswordTarget"))
|
|
input(style="display:none;", type="text", name="activationKey", value=user.activationKey)
|
|
.form-group
|
|
input#pass1.form-control(type='password', name='password', placeholder='Password')
|
|
.form-group
|
|
input#pass2.form-control(type='password', placeholder='Retype your password')
|
|
.form-group
|
|
input.btn.btn-primary.form-control(type='submit', value='Change your password')
|
|
.col
|
|
|
|
block extrajs
|
|
script.
|
|
var mail = document.getElementById('email'),
|
|
pass = document.getElementById('pass1'),
|
|
pass2 = document.getElementById('pass2');
|
|
|
|
function validatePasswords() {
|
|
if (pass1.value === pass2.value) {
|
|
pass2.setCustomValidity('');
|
|
} else {
|
|
pass2.setCustomValidity("Passwords don't match");
|
|
}
|
|
}
|
|
|
|
pass1.addEventListener('change', validatePasswords);
|
|
pass2.addEventListener('keyup', validatePasswords);
|
|
|