diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-24 08:52:06 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-24 08:52:06 +0000 |
| commit | d96e93e81f98d18aa84f701b578f4239020652c3 (patch) | |
| tree | 836059ba6a7c45ba549f7c860b741382c6ec1015 /views | |
| parent | ba43bb22a514a5100ae65ebbdd2d9c5581b2c01d (diff) | |
Implemented the password reset function
Diffstat (limited to 'views')
| -rw-r--r-- | views/password_edit.hbs | 50 | ||||
| -rw-r--r-- | views/reset_password.hbs | 12 |
2 files changed, 54 insertions, 8 deletions
diff --git a/views/password_edit.hbs b/views/password_edit.hbs new file mode 100644 index 0000000..903388a --- /dev/null +++ b/views/password_edit.hbs @@ -0,0 +1,50 @@ +<main id="solutions-main"> + <div class="row"> + <div class="slate signin-page col-sm-4 col-sm-offset-4 col-md-4 col-md-offset-4"> + <div class="container"> + {{# if success }} + <section class="alert alert-success"> + <!-- Change those to banners later --> + <h4>{{success}}</h4> + </section> + {{ else }} + {{# if errors }} + <section class="alert alert-danger"> + <h4>{{errors}}</h4> + </section> + {{/if}} + {{/if}} + {{#if flashMsg}} + <section class="alert alert-danger"> + {{flashMsg}} + </section> + {{/if}} + + <h3 class="signin"><hr><i class="fa fa-key" aria-hidden="true"></i> Reset Password<hr></h3> + <form action="/user/password/change" method="post"> + <div class="form-group signin-group"> + <div class="input-group input-group-lg"> + <div class="input-group-addon addon-username"> + <i class="fa fa-lock" aria-hidden="true"></i> + </div> + <input type="text" class="form-control input-username" placeholder="password" name="password" required> + </div> + <div class="input-group input-group-lg"> + <div class="input-group-addon addon-password"> + <i class="fa fa-unlock-alt" aria-hidden="true"></i> + </div> + <input type="password" class="form-control input-lg input-password" placeholder="password" name="passwordConfirm" required> + </div> + </div> + <input type="hidden" name="_email" value="{{ email}}"> + <input type="hidden" name="_csrf" value="{{ csrfToken }}"> + + <button class="signin-btn signin-insite btn-lg btn btn-primary btn-block"><span>Submit</span></button> + </form> + + </div> + + </div> + </div> + +</main>
\ No newline at end of file diff --git a/views/reset_password.hbs b/views/reset_password.hbs index 754c65d..5526123 100644 --- a/views/reset_password.hbs +++ b/views/reset_password.hbs @@ -5,16 +5,12 @@ {{# if success }} <section class="alert alert-success"> <!-- Change those to banners later --> - <h2>Signup Successful!</h2> + <h4>{{success}}</h4> </section> {{ else }} {{# if errors }} <section class="alert alert-danger"> - <ul> - {{# each errors }} - <li>{{ this.msg }}</li> - {{/each}} - </ul> + <h4>{{errors}}</h4> </section> {{/if}} {{/if}} @@ -25,13 +21,13 @@ {{/if}} <h3 class="signin"><hr><i class="fa fa-unlock-alt" aria-hidden="true"></i> Reset Password<hr></h3> - <form action="/user/" method="post"> + <form action="/user/sendReset" method="post"> <div class="form-group reset-group"> <div class="input-group input-group-lg"> <div class="input-group-addon addon-email-reset"> <i class="fa fa-at" aria-hidden="true"></i> </div> - <input type="text" class="form-control input-email-reset" placeholder="email" name="email-reset" required> + <input type="text" class="form-control input-email-reset" placeholder="email" name="email" required> </div> </div> <input type="hidden" name="_csrf" value="{{ csrfToken }}"> |
