From 54296bd7a4ee441a91b224cf04804df3d3b16330 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 8 Sep 2023 16:02:45 -0400 Subject: [PATCH] Read pwd reset link from settings --- app/templates/app/registration/login.html | 8 ++++++-- app/templatetags/settings.py | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/templates/app/registration/login.html b/app/templates/app/registration/login.html index a1b9b8d43..c19260f2a 100644 --- a/app/templates/app/registration/login.html +++ b/app/templates/app/registration/login.html @@ -11,6 +11,7 @@ {% is_single_user_mode as autologin %} {% has_external_auth as ext_auth %} + {% reset_password_link as reset_pwd_link %} {% if autologin %} @@ -24,14 +25,17 @@
- -

Forgot your password?

+ {% if reset_pwd_link != '' %} +

{% trans "Forgot your password?" %}

+ {% else %} +

{% trans "Forgot your password?" %}

+ {% endif %}
diff --git a/app/templatetags/settings.py b/app/templatetags/settings.py index d904dd1ec..96efd0e21 100644 --- a/app/templatetags/settings.py +++ b/app/templatetags/settings.py @@ -9,6 +9,10 @@ register = template.Library() logger = logging.getLogger('app.logger') +@register.simple_tag +def reset_password_link(): + return settings.RESET_PASSWORD_LINK + @register.simple_tag def has_external_auth(): return settings.EXTERNAL_AUTH_ENDPOINT != ""