Lines 88-116
Link Here
|
88 |
[% INCLUDE 'csrf-token.inc' %] |
88 |
[% INCLUDE 'csrf-token.inc' %] |
89 |
<legend class="sr-only">Password recovery</legend> |
89 |
<legend class="sr-only">Password recovery</legend> |
90 |
<input type="hidden" name="koha_login_context" value="opac" /> |
90 |
<input type="hidden" name="koha_login_context" value="opac" /> |
91 |
<p>To reset your password, enter your login or your email address.</p> |
91 |
[% UNLESS ( errMultipleAccountsForEmail ) %] |
|
|
92 |
<p id="password_recovery_msg">To reset your password, enter your login or your email address.</p> |
93 |
[% END %] |
92 |
<fieldset class="brief"> |
94 |
<fieldset class="brief"> |
93 |
|
95 |
|
94 |
<div id="password_recovery_options"> |
96 |
<div id="password_recovery_options"> |
95 |
<div id="use_login"> |
97 |
<a id="use_login" href="#"><i class="fa fa-user" aria-hidden="true"></i> I know my login</a> |
96 |
<a href="#"><i class="fa fa-user" aria-hidden="true"></i> I know my login</a> |
98 |
<a id="use_email" href="#"><i class="fa fa-envelope" aria-hidden="true"></i> I know my email address</a> |
97 |
</div> |
|
|
98 |
<div id="use_email"> |
99 |
<a href="#"><i class="fa fa-envelope" aria-hidden="true"></i> I know my email address</a> |
100 |
</div> |
101 |
</div> |
99 |
</div> |
102 |
|
100 |
|
103 |
<div class="form-row" id="password_recovery_login" style="display:none"> |
101 |
<div class="form-row" id="password_recovery_login" style="display:none"> |
104 |
<div class="col-md-6"> |
102 |
<div class="col-md-6"> |
105 |
<label for="username">Login:</label> |
103 |
[% IF ( errMultipleAccountsForEmail ) %] |
106 |
<input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> |
104 |
<label for="username" class="required">Login:</label> |
|
|
105 |
<input class="form-control required" required="required" type="text" id="username" size="40" name="username" value="[% username | html %]" /> |
106 |
<div class="required_label required">Required</div> |
107 |
[% ELSE %] |
108 |
<label for="username">Login:</label> |
109 |
<input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> |
110 |
[% END %] |
107 |
</div> |
111 |
</div> |
108 |
</div> |
112 |
</div> |
109 |
|
113 |
|
110 |
<div class="form-row" id="password_recovery_email" style="display:none"> |
114 |
<div class="form-row" id="password_recovery_email" style="display:none"> |
111 |
<div class="col-md-6"> |
115 |
<div class="col-md-6"> |
112 |
<label for="email">Email:</label> |
116 |
[% IF ( errMultipleAccountsForEmail ) %] |
113 |
<input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> |
117 |
<label for="email" class="required">Email:</label> |
|
|
118 |
<input class="form-control required" required="required" type="text" id="email" size="40" name="email" value="[% email | html %]" /> |
119 |
<div class="required_label required">Required</div> |
120 |
[% ELSE %] |
121 |
<label for="email">Email:</label> |
122 |
<input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> |
123 |
[% END %] |
114 |
</div> |
124 |
</div> |
115 |
</div> |
125 |
</div> |
116 |
<fieldset class="action" id="password_recovery_submit" style="display:none"> |
126 |
<fieldset class="action" id="password_recovery_submit" style="display:none"> |
Lines 209-229
Link Here
|
209 |
[% END %] |
219 |
[% END %] |
210 |
|
220 |
|
211 |
$("#use_email").on("click", function(){ |
221 |
$("#use_email").on("click", function(){ |
|
|
222 |
$("#use_login").removeClass("select-login-active"); |
223 |
$(this).addClass("select-login-active"); |
212 |
$("#username").val(""); |
224 |
$("#username").val(""); |
213 |
$("#password_recovery_login").hide(); |
225 |
$("#password_recovery_login, #password_recovery_msg").hide(); |
214 |
$("#password_recovery_email, #password_recovery_submit").show(); |
226 |
$("#password_recovery_email, #password_recovery_submit").show(); |
215 |
$("#email").focus(); |
227 |
$("#email").focus(); |
216 |
}); |
228 |
}); |
217 |
|
229 |
|
218 |
$("#use_login").on("click", function(){ |
230 |
$("#use_login").on("click", function(){ |
|
|
231 |
$("#use_email").removeClass("select-login-active"); |
232 |
$(this).addClass("select-login-active"); |
219 |
$("#email").val(""); |
233 |
$("#email").val(""); |
220 |
$("#password_recovery_email").hide(); |
234 |
$("#password_recovery_email, #password_recovery_msg").hide(); |
221 |
$("#password_recovery_login, #password_recovery_submit").show(); |
235 |
$("#password_recovery_login, #password_recovery_submit").show(); |
222 |
$("#username").focus(); |
236 |
$("#username").focus(); |
223 |
}); |
237 |
}); |
224 |
|
238 |
|
225 |
$(".password_recovery_cancel").on("click", function(){ |
239 |
$(".password_recovery_cancel").on("click", function(){ |
226 |
$("#password_recovery_options").show(); |
240 |
$("#password_recovery_options, #password_recovery_msg").show(); |
227 |
$("#password_recovery_login, #password_recovery_email, #password_recovery_submit").hide(); |
241 |
$("#password_recovery_login, #password_recovery_email, #password_recovery_submit").hide(); |
228 |
}); |
242 |
}); |
229 |
}) |
243 |
}) |
230 |
- |
|
|