Lines 8-55
Link Here
|
8 |
<title>Forgotten password recovery › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> |
8 |
<title>Forgotten password recovery › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% BLOCK cssinclude %][% END %] |
10 |
[% BLOCK cssinclude %][% END %] |
11 |
[% BLOCK jsinclude %] |
|
|
12 |
[% IF (new_password) %] |
13 |
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %] |
14 |
[% PROCESS 'password_check.inc' new_password => 'newPassword', minPasswordLength => minPasswordLength, RequireStrongPassword => RequireStrongPassword %] |
15 |
[% END %] |
16 |
<script> |
17 |
$(function() { |
18 |
$("#CheckAll").click(function(){ |
19 |
$("[name=deleteRequest]").attr('checked', true); |
20 |
return false; |
21 |
}); |
22 |
|
23 |
$("#CheckNone").click(function(){ |
24 |
$("[name=deleteRequest]").attr('checked', false); |
25 |
return false; |
26 |
}); |
27 |
|
28 |
$("select#type").change(function() { |
29 |
$("fieldset#serial, fieldset#book, fieldset#chapter").hide() |
30 |
$("fieldset#" + $(this).val() ).show(); |
31 |
}); |
32 |
$("#resendmail").click(function() { |
33 |
$("#resendform").submit(); |
34 |
}); |
35 |
[% IF (new_password) %] |
36 |
$("#mainform").validate({ |
37 |
rules: { |
38 |
newPassword: { |
39 |
required: true, |
40 |
password_strong: true, |
41 |
password_no_spaces: true |
42 |
}, |
43 |
repeatPassword: { |
44 |
required: true, |
45 |
password_match: true |
46 |
} |
47 |
} |
48 |
}); |
49 |
[% END %] |
50 |
}); |
51 |
</script> |
52 |
[% END %] |
53 |
</head> |
11 |
</head> |
54 |
[% INCLUDE 'bodytag.inc' bodyid='opac-password-recovery' %] |
12 |
[% INCLUDE 'bodytag.inc' bodyid='opac-password-recovery' %] |
55 |
[% INCLUDE 'masthead.inc' %] |
13 |
[% INCLUDE 'masthead.inc' %] |
Lines 63-76
Link Here
|
63 |
|
21 |
|
64 |
<div class="container-fluid"> |
22 |
<div class="container-fluid"> |
65 |
<div class="row"> |
23 |
<div class="row"> |
66 |
<div class="col-lg-2"> |
24 |
<div class="col-sm-12 col-lg-2"> |
67 |
[% IF ( OpacPublic ) %] |
25 |
[% IF ( OpacPublic ) %] |
68 |
<div id="navigation"> |
26 |
<div id="navigation"> |
69 |
[% INCLUDE 'navigation.inc' IsPatronPage=0 %] |
27 |
[% INCLUDE 'navigation.inc' IsPatronPage=0 %] |
70 |
</div> |
28 |
</div> |
71 |
[% END %] |
29 |
[% END %] |
72 |
</div> |
30 |
</div> |
73 |
<div class="col-6 order-first order-md-first order-lg-2 maincontent"> |
31 |
<div class="col-sm-12 col-lg-10 order-first order-lg-2 maincontent"> |
74 |
<h1>Forgotten password recovery</h1> |
32 |
<h1>Forgotten password recovery</h1> |
75 |
[% IF (hasError) %] |
33 |
[% IF (hasError) %] |
76 |
<div class="alert alert-warning"> |
34 |
<div class="alert alert-warning"> |
Lines 125-152
Link Here
|
125 |
[% IF (! Categories.can_any_reset_password ) %] |
83 |
[% IF (! Categories.can_any_reset_password ) %] |
126 |
<div class="alert alert-info">You can't reset your password.</div> |
84 |
<div class="alert alert-info">You can't reset your password.</div> |
127 |
[% ELSIF (password_recovery) %] |
85 |
[% ELSIF (password_recovery) %] |
|
|
86 |
|
128 |
<form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off"> |
87 |
<form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off"> |
129 |
[% INCLUDE 'csrf-token.inc' %] |
88 |
[% INCLUDE 'csrf-token.inc' %] |
130 |
<legend class="sr-only">Password recovery</legend> |
89 |
<legend class="sr-only">Password recovery</legend> |
131 |
<input type="hidden" name="koha_login_context" value="opac" /> |
90 |
<input type="hidden" name="koha_login_context" value="opac" /> |
132 |
<p>To reset your password, enter your login or your email address.</p> |
91 |
<p>To reset your password, enter your login or your email address.</p> |
133 |
<fieldset class="brief"> |
92 |
<fieldset class="brief"> |
134 |
<div class="form-group"> |
93 |
|
135 |
<label for="username">Login:</label> |
94 |
<div id="password_recovery_options"> |
136 |
<input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> |
95 |
<div id="use_login"> |
|
|
96 |
<a href="#"><i class="fa fa-user" aria-hidden="true"></i> I know my login</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> |
137 |
</div> |
101 |
</div> |
138 |
|
102 |
|
139 |
<div class="form-group"> |
103 |
<div class="form-row" id="password_recovery_login" style="display:none"> |
140 |
<label for="email">Email:</label> |
104 |
<div class="col-md-6"> |
141 |
<input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> |
105 |
<label for="username">Login:</label> |
|
|
106 |
<input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" /> |
107 |
</div> |
142 |
</div> |
108 |
</div> |
143 |
|
109 |
|
144 |
<fieldset class="action"> |
110 |
<div class="form-row" id="password_recovery_email" style="display:none"> |
|
|
111 |
<div class="col-md-6"> |
112 |
<label for="email">Email:</label> |
113 |
<input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" /> |
114 |
</div> |
115 |
</div> |
116 |
<fieldset class="action" id="password_recovery_submit" style="display:none"> |
145 |
<input type="hidden" name="op" value="cud-sendEmail" /> |
117 |
<input type="hidden" name="op" value="cud-sendEmail" /> |
146 |
<input type="submit" value="Submit" class="btn btn-primary" name="sendEmail" /> |
118 |
<input type="submit" value="Submit" class="btn btn-primary" name="sendEmail" /> |
|
|
119 |
<a href="#" class="password_recovery_cancel cancel">Cancel</a> |
147 |
</fieldset> |
120 |
</fieldset> |
|
|
121 |
|
148 |
</fieldset> |
122 |
</fieldset> |
149 |
</form> |
123 |
</form> |
|
|
124 |
|
125 |
|
126 |
|
150 |
[% ELSIF (new_password) %] |
127 |
[% ELSIF (new_password) %] |
151 |
[% UNLESS ( errLinkNotValid ) %] |
128 |
[% UNLESS ( errLinkNotValid ) %] |
152 |
<form id="mainform" name="mainform" action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off"> |
129 |
<form id="mainform" name="mainform" action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off"> |
Lines 197-200
Link Here
|
197 |
</div><!-- / .row-fluid --> |
174 |
</div><!-- / .row-fluid --> |
198 |
</div><!-- / .container-fluid --> |
175 |
</div><!-- / .container-fluid --> |
199 |
</div><!-- / .main --> |
176 |
</div><!-- / .main --> |
|
|
177 |
|
200 |
[% INCLUDE 'opac-bottom.inc' %] |
178 |
[% INCLUDE 'opac-bottom.inc' %] |
201 |
- |
179 |
|
|
|
180 |
[% BLOCK jsinclude %] |
181 |
[% IF (new_password) %] |
182 |
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %] |
183 |
[% PROCESS 'password_check.inc' new_password => 'newPassword', minPasswordLength => minPasswordLength, RequireStrongPassword => RequireStrongPassword %] |
184 |
[% END %] |
185 |
<script> |
186 |
$(document).ready(function(){ |
187 |
[% IF ( errMultipleAccountsForEmail ) %] |
188 |
$("#password_recovery_login, #password_recovery_email, #password_recovery_submit").show(); |
189 |
$("#password_recovery_options").hide(); |
190 |
[% END %] |
191 |
$("#resendmail").click(function() { |
192 |
$("#resendform").submit(); |
193 |
}); |
194 |
[% IF (new_password) %] |
195 |
$("#mainform").validate({ |
196 |
rules: { |
197 |
newPassword: { |
198 |
required: true, |
199 |
password_strong: true, |
200 |
password_no_spaces: true |
201 |
}, |
202 |
repeatPassword: { |
203 |
required: true, |
204 |
password_match: true |
205 |
} |
206 |
} |
207 |
}); |
208 |
[% END %] |
209 |
|
210 |
$("#use_email").on("click", function(){ |
211 |
$("#username").val(""); |
212 |
$("#password_recovery_login").hide(); |
213 |
$("#password_recovery_email, #password_recovery_submit").show(); |
214 |
$("#email").focus(); |
215 |
}); |
216 |
|
217 |
$("#use_login").on("click", function(){ |
218 |
$("#email").val(""); |
219 |
$("#password_recovery_email").hide(); |
220 |
$("#password_recovery_login, #password_recovery_submit").show(); |
221 |
$("#username").focus(); |
222 |
}); |
223 |
|
224 |
$(".password_recovery_cancel").on("click", function(){ |
225 |
$("#password_recovery_options").show(); |
226 |
$("#password_recovery_login, #password_recovery_email, #password_recovery_submit").hide(); |
227 |
}); |
228 |
}) |
229 |
</script> |
230 |
[% END %] |