From 92d9cad6cbb330055fe93e9c104ad8eba8d46662 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sat, 24 Jun 2023 00:23:54 +0200 Subject: Applied patch from "B. Stack" --- newspipe/templates/login.html | 2 +- newspipe/web/views/session_mgmt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/newspipe/templates/login.html b/newspipe/templates/login.html index 5d936d18..b9952309 100644 --- a/newspipe/templates/login.html +++ b/newspipe/templates/login.html @@ -19,7 +19,7 @@ {% endfor %} {{ form.submit(class_="btn btn-primary") }} - {{ _('Sign up') }} + {% if self_registration %}{{ _('Sign up') }}{% endif %} diff --git a/newspipe/web/views/session_mgmt.py b/newspipe/web/views/session_mgmt.py index 0e8329e5..0154503a 100644 --- a/newspipe/web/views/session_mgmt.py +++ b/newspipe/web/views/session_mgmt.py @@ -84,7 +84,7 @@ def login(): if request.method == "POST" and form.validate(): # fixes an issue in flask-wtf login_user_bundle(form.user) return form.redirect("home") - return render_template("login.html", form=form) + return render_template("login.html", form=form, self_registration=application.config["SELF_REGISTRATION"]) @current_app.route("/logout") -- cgit