aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-06-16 08:54:55 -0400
committerB. Stack <bgstack15@gmail.com>2023-06-16 08:54:55 -0400
commit93cee70a27a1ea8dc33ae367a9968fcbf1f7cb2b (patch)
treeed2dde5e9b63e3f59efd04ac3957c3b759697597
parentchg: [dependencies] Updated Python dependencies. (diff)
downloadnewspipe-hide-registration-button.tar.gz
newspipe-hide-registration-button.tar.bz2
newspipe-hide-registration-button.zip
hide registration button, fix #11hide-registration-button
-rw-r--r--newspipe/templates/login.html2
-rw-r--r--newspipe/web/views/session_mgmt.py2
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 @@
<div class="alert alert-warning" role="alert">{{ message }}</div>
{% endfor %}
{{ form.submit(class_="btn btn-primary") }}
- <a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a>
+ {% if self_registration %}<a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a>{% endif %}
</form>
</div>
</div>
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")
bgstack15