Remove optional banner from set password page

This commit is contained in:
rubenwardy
2023-10-11 22:32:32 +01:00
parent 0b7febae5d
commit 4fc54f12bc
3 changed files with 2 additions and 14 deletions

View File

@ -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/")

View File

@ -5,18 +5,6 @@
{% endblock %}
{% block content %}
{% if optional %}
<div class="alert alert-primary">
{{ _("It is recommended that you set a password for your account.") }}
<a class="alert_right button" href="{{ url_for('homepage.home') }}">
{{ _("Skip") }}
</a>
</div>
{% endif %}
<h1>{{ _("Set Password") }}</h1>
{% from "macros/forms.html" import render_field, render_submit_field %}

View File

@ -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: