From ae602ef0c2f48a30aa8a4d75e4460a4dfd07fe3b Mon Sep 17 00:00:00 2001 From: lisaq Date: Tue, 25 Oct 2016 21:26:30 +0200 Subject: [PATCH] login: add support link to disabled password reset page --- rhodecode/templates/login.html | 9 +++++++-- rhodecode/templates/password_reset.html | 11 +++++++++-- rhodecode/tests/functional/test_login.py | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/rhodecode/templates/login.html b/rhodecode/templates/login.html index e72f2e03..5f74ba10 100644 --- a/rhodecode/templates/login.html +++ b/rhodecode/templates/login.html @@ -62,9 +62,14 @@

%elif h.HasPermissionAny('hg.password_reset.hidden')():

- ${_('Contact an administrator if you have forgotten your password.')} + ${_('Password reset is disabled. Please contact ')} + % if c.visual.rhodecode_support_url: + ${_('Support')} + ${_('or')} + % endif + ${_('an administrator if you need help.')}

- %endif + %endif ${h.submit('sign_in', _('Sign In'), class_="btn sign-in")} diff --git a/rhodecode/templates/password_reset.html b/rhodecode/templates/password_reset.html index a48a27c6..8bc60850 100644 --- a/rhodecode/templates/password_reset.html +++ b/rhodecode/templates/password_reset.html @@ -2,7 +2,7 @@ <%inherit file="base/root.html"/> <%def name="title()"> - ${_('Create an Account')} + ${_('Reset Password')} %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif @@ -30,7 +30,14 @@ %if h.HasPermissionAny('hg.password_reset.disabled')():
-

${_('Password reset has been disabled.')}

+

+ ${_('Password reset is disabled. Please contact ')} + % if c.visual.rhodecode_support_url: + ${_('Support')} + ${_('or')} + % endif + ${_('an administrator if you need help.')} +

%else:
diff --git a/rhodecode/tests/functional/test_login.py b/rhodecode/tests/functional/test_login.py index b50cf012..b48a8285 100644 --- a/rhodecode/tests/functional/test_login.py +++ b/rhodecode/tests/functional/test_login.py @@ -564,7 +564,7 @@ class TestPasswordReset(TestController): asr_reset.one_element_exists('#email') asr_reset.one_element_exists('#send') else: - assert 'Password reset has been disabled.' in pwdreset_page + assert 'Password reset is disabled.' in pwdreset_page asr_reset.no_element_exists('#email') asr_reset.no_element_exists('#send') @@ -585,4 +585,4 @@ class TestPasswordReset(TestController): pwd_reset_url, {'email': 'lisa@rhodecode.com',} ) - assert 'Password reset has been disabled.' in pwdreset_page + assert 'Password reset is disabled.' in pwdreset_page