Cleaned up and refactored reset password template
This commit is contained in:
@ -1,36 +1,15 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.container
|
.col-sm-6.col-sm-offset-3
|
||||||
.row
|
form(method='POST')
|
||||||
.col-sm-6.col-sm-offset-3
|
legend Reset Password
|
||||||
.page-header
|
input(type='hidden', name='_csrf', value=token)
|
||||||
h1 Reset Your Password
|
.form-group
|
||||||
form(method='POST')
|
label(for='password') New Password
|
||||||
input(type='hidden', name='_csrf', value=token)
|
input.form-control(type='password', name='password', value='', placeholder='New password', autofocus=true)
|
||||||
.form-group
|
.form-group
|
||||||
label.sr-only(for='password') New Password:
|
label(for='confirm') Confirm Password
|
||||||
input.form-control(type='password', name='password', value='', placeholder='New password', autofocus=true, required)
|
input.form-control(type='password', name='confirm', value='', placeholder='Confirm password')
|
||||||
.form-group
|
.form-group
|
||||||
label.sr-only(for='confirm') Confirm Password:
|
button.btn.btn-primary.btn-reset(type='submit') Update Password
|
||||||
input.form-control(type='password', name='confirm', value='', placeholder='Confirm your new password', required)
|
|
||||||
.form-group
|
|
||||||
button.btn.btn-primary.btn-reset(type='submit') Set Password
|
|
||||||
hr
|
|
||||||
p Need to try again?
|
|
||||||
a(href='/forgot') <strong> Forgot my password</strong>
|
|
||||||
script.
|
|
||||||
$(document).ready(function() {
|
|
||||||
if ( #{validToken} === false ) {
|
|
||||||
$("input").prop('disabled', true);
|
|
||||||
$("button").prop('disabled', true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//- Form Notes
|
|
||||||
//- ===========================================
|
|
||||||
//- 1) Always add labels!
|
|
||||||
//- Screen readers will have trouble with your forms if you don't include a label for every input.
|
|
||||||
//- NOTE: you can hide the labels using the .sr-only class.
|
|
||||||
//- 2) Use proper HTML5 input types (email, password, date, etc.) This adds some HTML5 validation as
|
|
||||||
//- well as the correct keyboard on mobile devices.
|
|
||||||
|
Reference in New Issue
Block a user