From 4fc54f12bc8c0d6b3c57ae9e33985d221b1725c3 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 11 Oct 2023 22:32:32 +0100 Subject: [PATCH] Remove optional banner from set password page --- app/blueprints/users/account.py | 2 +- app/templates/users/change_set_password.html | 12 ------------ app/utils/user.py | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/app/blueprints/users/account.py b/app/blueprints/users/account.py index ecc248d9..548039d7 100644 --- a/app/blueprints/users/account.py +++ b/app/blueprints/users/account.py @@ -308,7 +308,7 @@ def set_password(): if ret: return ret - return render_template("users/change_set_password.html", form=form, optional=request.args.get("optional")) + return render_template("users/change_set_password.html", form=form) @bp.route("/user/verify/") diff --git a/app/templates/users/change_set_password.html b/app/templates/users/change_set_password.html index 0db3e02d..26c647a0 100644 --- a/app/templates/users/change_set_password.html +++ b/app/templates/users/change_set_password.html @@ -5,18 +5,6 @@ {% endblock %} {% block content %} - -{% if optional %} -
- {{ _("It is recommended that you set a password for your account.") }} - - - {{ _("Skip") }} - -
-{% endif %} - -

{{ _("Set Password") }}

{% from "macros/forms.html" import render_field, render_submit_field %} diff --git a/app/utils/user.py b/app/utils/user.py index c7b34098..f2b15407 100644 --- a/app/utils/user.py +++ b/app/utils/user.py @@ -42,7 +42,7 @@ def post_login(user: User, next_url): return redirect(next_url) if not current_user.password: - return redirect(url_for("users.set_password", optional=True)) + return redirect(url_for("users.set_password")) notif_count = len(user.notifications) if notif_count > 0: