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
 | 
					 | 
				
			||||||
    .row
 | 
					 | 
				
			||||||
  .col-sm-6.col-sm-offset-3
 | 
					  .col-sm-6.col-sm-offset-3
 | 
				
			||||||
        .page-header
 | 
					 | 
				
			||||||
          h1 Reset Your Password
 | 
					 | 
				
			||||||
    form(method='POST')
 | 
					    form(method='POST')
 | 
				
			||||||
 | 
					      legend Reset Password
 | 
				
			||||||
      input(type='hidden', name='_csrf', value=token)
 | 
					      input(type='hidden', name='_csrf', value=token)
 | 
				
			||||||
      .form-group
 | 
					      .form-group
 | 
				
			||||||
            label.sr-only(for='password') New Password:
 | 
					        label(for='password') New Password
 | 
				
			||||||
            input.form-control(type='password', name='password', value='', placeholder='New password', autofocus=true, required)
 | 
					        input.form-control(type='password', name='password', value='', placeholder='New password', autofocus=true)
 | 
				
			||||||
      .form-group
 | 
					      .form-group
 | 
				
			||||||
            label.sr-only(for='confirm') Confirm Password:
 | 
					        label(for='confirm') Confirm Password
 | 
				
			||||||
            input.form-control(type='password', name='confirm', value='', placeholder='Confirm your new password', required)
 | 
					        input.form-control(type='password', name='confirm', value='', placeholder='Confirm password')
 | 
				
			||||||
      .form-group
 | 
					      .form-group
 | 
				
			||||||
            button.btn.btn-primary.btn-reset(type='submit') Set Password
 | 
					        button.btn.btn-primary.btn-reset(type='submit') Update 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