login: add support link to disabled password reset page

This commit is contained in:
lisaq 2016-10-25 21:26:30 +02:00
parent 9a0c6ac006
commit ae602ef0c2
3 changed files with 18 additions and 6 deletions

View file

@ -62,9 +62,14 @@
</p>
%elif h.HasPermissionAny('hg.password_reset.hidden')():
<p class="help-block">
${_('Contact an administrator if you have forgotten your password.')}
${_('Password reset is disabled. Please contact ')}
% if c.visual.rhodecode_support_url:
<a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
${_('or')}
% endif
${_('an administrator if you need help.')}
</p>
%endif
%endif
${h.submit('sign_in', _('Sign In'), class_="btn sign-in")}

View file

@ -2,7 +2,7 @@
<%inherit file="base/root.html"/>
<%def name="title()">
${_('Create an Account')}
${_('Reset Password')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
@ -30,7 +30,14 @@
%if h.HasPermissionAny('hg.password_reset.disabled')():
<div class="right-column">
<p>${_('Password reset has been disabled.')}</p>
<p>
${_('Password reset is disabled. Please contact ')}
% if c.visual.rhodecode_support_url:
<a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
${_('or')}
% endif
${_('an administrator if you need help.')}
</p>
</div>
%else:
<div id="register" class="right-column">

View file

@ -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