overleaf/services/web/app/views/user/setPassword.pug

64 lines
2.4 KiB
Text
Raw Normal View History

extends ../layout
block content
2014-06-09 05:25:38 -04:00
.content.content-alt
.container
.row
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.card
.page-header
2014-07-31 09:01:37 -04:00
h1 #{translate("reset_your_password")}
2014-06-17 11:19:40 -04:00
form(
async-form="password-reset",
2014-06-18 10:23:00 -04:00
name="passwordResetForm",
action="/user/password/set",
2014-11-17 10:19:11 -05:00
method="POST",
ng-cloak
2014-06-17 11:19:40 -04:00
)
2014-06-09 05:25:38 -04:00
input(type="hidden", name="_csrf", value=csrfToken)
.alert.alert-success(ng-show="passwordResetForm.response.success")
| #{translate("password_has_been_reset")}.
a(href='/login') #{translate("login_here")}
div(ng-show="passwordResetForm.response.error == true")
.alert.alert-danger(ng-show="passwordResetForm.response.data == 'NotFoundError'")
| #{translate('password_reset_token_expired')}
br
a(href="/user/password/reset" style="text-decoration: underline;")
| Request a new password reset email
.alert.alert-danger(ng-show="passwordResetForm.response.data == 'SLInV2Error'")
a(href=settings.accountMerge.sharelatexHost + "/user/password/reset")
| Please go to ShareLaTeX to reset your password
.alert.alert-danger(ng-show="passwordResetForm.response.data == 'NotInV2Error'")
a(href=settings.accountMerge.betaHost + "/user/password/reset" style="text-decoration: underline;")
| Please go to Overleaf to reset your password
.alert.alert-danger(ng-show="passwordResetForm.response.status == 500")
| #{translate('error_performing_request')}
2014-06-17 11:19:40 -04:00
2014-06-09 05:25:38 -04:00
.form-group
input.form-control#passwordField(
2014-06-17 11:19:40 -04:00
type='password',
name='password',
2014-06-18 10:23:00 -04:00
placeholder='new password',
required,
ng-model="password",
autofocus,
complex-password
2014-06-17 11:19:40 -04:00
)
span.small.text-primary(ng-show="passwordResetForm.password.$error.complexPassword", ng-bind-html="complexPasswordErrorMessage")
2014-06-17 11:19:40 -04:00
input(
type="hidden",
name="passwordResetToken",
value=passwordResetToken
)
2014-06-09 05:25:38 -04:00
.actions
2014-06-18 10:23:00 -04:00
button.btn.btn-primary(
type='submit',
ng-disabled="passwordResetForm.$invalid"
2014-11-17 10:19:11 -05:00
) #{translate("set_new_password")}
script(type='text/javascript').
window.usersEmail = "#{getReqQueryParam('email')}"
window.passwordStrengthOptions = !{JSON.stringify(settings.passwordStrengthOptions || {})}