mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
9d00c351a8
[misc] add captcha on password reset requests GitOrigin-RevId: 9a23b9c9dee2c56345e9c1846861c05c25126802
63 lines
2.1 KiB
Text
63 lines
2.1 KiB
Text
extends ../layout
|
|
|
|
block append meta
|
|
meta(name="ol-passwordStrengthOptions" data-type="json" content=settings.passwordStrengthOptions)
|
|
|
|
block content
|
|
main.content.content-alt
|
|
.container
|
|
.row
|
|
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
|
|
.card
|
|
.page-header
|
|
h1 #{translate("reset_your_password")}
|
|
form(
|
|
async-form="password-reset",
|
|
name="passwordResetForm",
|
|
action="/user/password/set",
|
|
method="POST",
|
|
ng-cloak
|
|
)
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
.alert.alert-success(ng-show="passwordResetForm.response.success")
|
|
| #{translate("password_has_been_reset")}.
|
|
br
|
|
a(href='/login') #{translate("login_here")}
|
|
div(ng-show="passwordResetForm.response.error == true")
|
|
div(ng-switch="passwordResetForm.response.status")
|
|
.alert.alert-danger(ng-switch-when="404")
|
|
| #{translate('password_reset_token_expired')}
|
|
br
|
|
a(href="/user/password/reset")
|
|
| Request a new password reset email
|
|
.alert.alert-danger(ng-switch-when="400")
|
|
| #{translate('invalid_password')}
|
|
.alert.alert-danger(ng-switch-when="429")
|
|
| #{translate('rate_limit_hit_wait')}
|
|
.alert.alert-danger(ng-switch-default)
|
|
| #{translate('error_performing_request')}
|
|
|
|
|
|
.form-group
|
|
input.form-control#passwordField(
|
|
type='password',
|
|
name='password',
|
|
placeholder='new password',
|
|
required,
|
|
autocomplete="new-password",
|
|
ng-model="password",
|
|
autofocus,
|
|
complex-password
|
|
)
|
|
span.small.text-primary(ng-show="passwordResetForm.password.$error.complexPassword", ng-bind-html="complexPasswordErrorMessage")
|
|
input(
|
|
type="hidden",
|
|
name="passwordResetToken",
|
|
value=passwordResetToken
|
|
ng-non-bindable
|
|
)
|
|
.actions
|
|
button.btn.btn-primary(
|
|
type='submit',
|
|
ng-disabled="passwordResetForm.$invalid"
|
|
) #{translate("set_new_password")}
|