From d7c6be08657163cea993c51d2cf4b3f0131fbdbf Mon Sep 17 00:00:00 2001 From: lian Date: Thu, 12 Aug 2021 15:31:34 +0800 Subject: [PATCH] hide "Forgot password?" when not ENABLE_CHANGE_PASSWORD --- seahub/auth/views.py | 1 + seahub/templates/registration/login.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/seahub/auth/views.py b/seahub/auth/views.py index 72976231c6..d946b60be6 100644 --- a/seahub/auth/views.py +++ b/seahub/auth/views.py @@ -203,6 +203,7 @@ def login(request, template_name='registration/login.html', 'signup_url': signup_url, 'enable_sso': enable_sso, 'login_bg_image_path': login_bg_image_path, + 'enable_change_password': settings.ENABLE_CHANGE_PASSWORD, }) def login_simple_check(request): diff --git a/seahub/templates/registration/login.html b/seahub/templates/registration/login.html index 2aa2287d78..8586f61f52 100644 --- a/seahub/templates/registration/login.html +++ b/seahub/templates/registration/login.html @@ -65,7 +65,9 @@ html, body, #wrapper { height:100%; } {% blocktrans %}Remember me for {{remember_days}} days {% endblocktrans %} + {% if enable_change_password %} {% trans "Forgot password?" %} + {% endif %}