Add pending verification note to email settings

This commit is contained in:
rubenwardy
2021-01-24 13:25:17 +00:00
parent 5e255a07f6
commit 6f9c01c375
2 changed files with 8 additions and 4 deletions

View File

@ -120,7 +120,7 @@ def handle_email_notifications(user, prefs: UserNotificationPreferences, is_new,
flash("Check your email to confirm it", "success")
send_verify_email.delay(newEmail, token)
return redirect(url_for("homepage.home"))
return redirect(url_for("users.email_notifications", username=user.username))
db.session.commit()
return redirect(url_for("users.email_notifications", username=user.username))

View File

@ -16,11 +16,15 @@
{{ render_field(form.email, tabindex=100) }}
<p>
Your email is needed to recover your account if you forget your
password, and to send (configurable) notifications.
Your email will never be shared with a third-party.
{{ _("Your email is needed to recover your account if you forget your password, and to send (configurable) notifications.") }}
{{ _("Your email will never be shared with a third-party.") }}
</p>
{% if user.email_verifications.filter_by(is_password_reset=False).count() > 0 %}
<p>
<i>{{ _("There is at least one verification pending.") }}</i>
</p>
{% endif %}
<h3>Notification Settings</h3>