mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Redirect link included in links for password reset
on sign-in page.
This commit is contained in:
@@ -24,6 +24,7 @@ def sign_in():
|
||||
return redirect(url_for('main.show_accounts_or_dashboard'))
|
||||
|
||||
form = LoginForm()
|
||||
password_reset_url = url_for('.forgot_password', next=request.args.get('next'))
|
||||
|
||||
if form.validate_on_submit():
|
||||
|
||||
@@ -51,9 +52,9 @@ def sign_in():
|
||||
# Vague error message for login in case of user not known, locked, inactive or password not verified
|
||||
flash(Markup(
|
||||
(
|
||||
"The email address or password you entered is incorrect."
|
||||
" <a href={password_reset}>Forgotten your password?</a>"
|
||||
).format(password_reset=url_for('.forgot_password'))
|
||||
f"The email address or password you entered is incorrect."
|
||||
f" <a href={password_reset_url}>Forgotten your password?</a>"
|
||||
)
|
||||
))
|
||||
|
||||
other_device = current_user.logged_in_elsewhere()
|
||||
@@ -61,7 +62,8 @@ def sign_in():
|
||||
'views/signin.html',
|
||||
form=form,
|
||||
again=bool(request.args.get('next')),
|
||||
other_device=other_device
|
||||
other_device=other_device,
|
||||
password_reset_url=password_reset_url
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{% call form_wrapper(autocomplete=True) %}
|
||||
{{ form.email_address(param_extensions={"autocomplete": "email"}) }}
|
||||
{{ form.password(param_extensions={"autocomplete": "current-password"}) }}
|
||||
{{ page_footer("Continue", secondary_link=url_for('.forgot_password'), secondary_link_text="Forgotten your password?") }}
|
||||
{{ page_footer("Continue", secondary_link=password_reset_url, secondary_link_text="Forgotten your password?") }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user