Commit bb909eae authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1250354: The "Forgot password" link should not be displayed if users are…

Bug 1250354: The "Forgot password" link should not be displayed if users are not allowed to change it r/a=dkl
parent b241244b
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
<a id="login_link[% qs_suffix %]" href="[% script_url FILTER html %]" <a id="login_link[% qs_suffix %]" href="[% script_url FILTER html %]"
onclick="return show_mini_login_form('[% qs_suffix %]')">Log In</a> onclick="return show_mini_login_form('[% qs_suffix %]')">Log In</a>
[% Hook.process('additional_methods') %]
<form action="[% login_target FILTER html %]" method="POST" <form action="[% login_target FILTER html %]" method="POST"
class="mini_login bz_default_hidden" class="mini_login bz_default_hidden"
id="mini_login[% qs_suffix FILTER html %]"> id="mini_login[% qs_suffix FILTER html %]">
...@@ -56,24 +54,28 @@ ...@@ -56,24 +54,28 @@
<a href="#" onclick="return hide_mini_login_form('[% qs_suffix %]')">[x]</a> <a href="#" onclick="return hide_mini_login_form('[% qs_suffix %]')">[x]</a>
</form> </form>
</li> </li>
<li id="forgot_container[% qs_suffix %]">
<span class="separator">| </span> [% Hook.process('additional_methods') %]
<a id="forgot_link[% qs_suffix %]" href="[% script_url FILTER html %]#forgot"
onclick="return show_forgot_form('[% qs_suffix %]')">Forgot Password</a> [% IF user.authorizer.can_change_password %]
<form action="token.cgi" method="post" id="forgot_form[% qs_suffix %]" <li id="forgot_container[% qs_suffix %]">
class="mini_forgot bz_default_hidden"> <span class="separator">| </span>
<label for="login[% qs_suffix FILTER html %]">Login:</label> <a id="forgot_link[% qs_suffix %]" href="[% script_url FILTER html %]#forgot"
<input name="loginname" size="20" id="login[% qs_suffix FILTER html %]" required onclick="return show_forgot_form('[% qs_suffix %]')">Forgot Password</a>
[% IF login_not_email %] <form action="token.cgi" method="post" id="forgot_form[% qs_suffix %]"
placeholder="Your Login" class="mini_forgot bz_default_hidden">
[% ELSE %] <label for="login[% qs_suffix FILTER html %]">Login:</label>
type="email" placeholder="Your Email Address" <input name="loginname" size="20" id="login[% qs_suffix FILTER html %]" required
[% END %]> [% IF login_not_email %]
<input id="forgot_button[% qs_suffix %]" value="Reset Password" placeholder="Your Login"
type="submit"> [% ELSE %]
<input type="hidden" name="a" value="reqpw"> type="email" placeholder="Your Email Address"
<input type="hidden" id="token[% qs_suffix FILTER html %]" name="token" [% END %]>
value="[% issue_hash_token(['reqpw']) FILTER html %]"> <input id="forgot_button[% qs_suffix %]" value="Reset Password" type="submit">
<a href="#" onclick="return hide_forgot_form('[% qs_suffix %]')">[x]</a> <input type="hidden" name="a" value="reqpw">
</form> <input type="hidden" id="token[% qs_suffix FILTER html %]" name="token"
</li> value="[% issue_hash_token(['reqpw']) FILTER html %]">
<a href="#" onclick="return hide_forgot_form('[% qs_suffix %]')">[x]</a>
</form>
</li>
[% END %]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment