mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 04:00:47 +00:00
5141f7b452
[web] Improve a11y of form-messages GitOrigin-RevId: 36360bc188f9a582e891d50328a6f27b414dce2a
66 lines
1.8 KiB
Text
66 lines
1.8 KiB
Text
extends ../layout-marketing
|
|
|
|
block content
|
|
main.content.content-alt#main-content
|
|
.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(
|
|
data-ol-async-form,
|
|
name="passwordResetForm",
|
|
action="/user/password/set",
|
|
method="POST",
|
|
)
|
|
div(data-ol-not-sent)
|
|
+formMessages()
|
|
|
|
+customFormMessage('token-expired', 'danger')
|
|
| #{translate('password_reset_token_expired')}
|
|
br
|
|
a(href="/user/password/reset")
|
|
| #{translate('request_new_password_reset_email')}
|
|
|
|
+customFormMessage('invalid-password', 'danger')
|
|
| #{translate('invalid_password')}
|
|
|
|
div.alert.alert-success(
|
|
hidden
|
|
role="alert"
|
|
aria-live="assertive"
|
|
data-ol-sent
|
|
)
|
|
| #{translate("password_has_been_reset")}.
|
|
br
|
|
a(href='/login') #{translate("login_here")}
|
|
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
|
|
.form-group
|
|
input.form-control#passwordField(
|
|
type='password',
|
|
name='password',
|
|
placeholder='new password',
|
|
autocomplete="new-password",
|
|
autofocus,
|
|
required,
|
|
minlength=settings.passwordStrengthOptions.length.min,
|
|
maxlength=settings.passwordStrengthOptions.length.max
|
|
)
|
|
input(
|
|
type="hidden",
|
|
name="passwordResetToken",
|
|
value=passwordResetToken
|
|
)
|
|
.actions
|
|
button.btn.btn-primary(
|
|
type='submit',
|
|
data-ol-disabled-inflight
|
|
aria-label=translate('set_new_password')
|
|
)
|
|
span(data-ol-inflight="idle")
|
|
| #{translate('set_new_password')}
|
|
span(hidden data-ol-inflight="pending")
|
|
| #{translate('set_new_password')}…
|