4 [% USE AdditionalContents %]
5 [% PROCESS 'html_helpers.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
10 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% BLOCK cssinclude %][% END %]
15 [% INCLUDE 'bodytag.inc' bodyid='opac-login-page' bodyclass='scrollto' %]
16 [% INCLUDE 'masthead.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
20 <ol class="breadcrumb">
21 <li class="breadcrumb-item">
22 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
24 <li class="breadcrumb-item active">
25 <a href="#" aria-current="page">Reset your password</a>
28 </nav> <!-- /#breadcrumbs -->
30 <div class="container-fluid">
31 <div class="row justify-content-center">
32 <div class="col-md-10 col-lg-6">
33 <div id="opac-auth" class="maincontent">
34 [% IF Koha.Preference( 'opacuserlogin' ) && Koha.Preference('EnableExpiredPasswordReset') %]
36 <div class="alert alert-warning">
37 <h2>There was a problem with your submission</h2>
40 [% CASE 'no_change' %]
41 New password must not be the same as old password.
42 [% CASE 'passwords_mismatch' %]
43 Passwords do not match. Please re-type your new password.
44 [% CASE 'password_too_short' %]
45 Password must be at least [% minPasswordLength | html %] characters long.
46 [% CASE 'password_too_weak' %]
47 Password must contain at least one digit, one lowercase and one uppercase.
48 [% CASE 'password_has_whitespaces' %]
49 Password must not contain leading or trailing whitespaces.
50 [% CASE 'invalid_credentials' %]
51 You entered an incorrect username or password. Please try again! But note that passwords are case sensitive[% IF Koha.Preference('FailedLoginAttempts') %] and that your account will be locked out after a fixed number of failed login attempts[% END %]. Please contact a library staff member if you continue to have problems.
52 [% CASE 'no_expire' %]
53 Please log-in to account to update your password.</br>
54 <a href="/cgi-bin/koha/opac-user.pl" class="nav-link login-link loginModal-trigger"><i class="fa fa-user fa-icon-black fa-fw" aria-hidden="true"></i> <span class="userlabel">Log in to your account</span></a>.
55 [% CASE 'account_locked' %]
56 This account has been locked!
57 [% IF Categories.can_any_reset_password && Koha.Preference('OpacBaseURL') %]
58 <a href="[% Koha.Preference('OpacBaseURL') | url %]/cgi-bin/koha/opac-password-recovery.pl">You must reset your password via e-mail</a>.
60 You must contact the library for assistance.
63 An unknown error occurred. Please try again or contact the library for assistance.
68 [% IF ( password_updated ) %]
69 <div class="alert dialog-alert">
70 <h2>Your password has successfully been updated</h2>
71 <a href="/cgi-bin/koha/opac-main.pl" class="btn btn-primary">Go to OPAC</a>
72 [% IF ( Koha.Preference('staffClientBaseURL') && staff_access ) %]
73 <a href="[% Koha.Preference('staffClientBaseURL') | url %]" class="btn btn-primary">Go to Staff client</a>
77 <form action="/cgi-bin/koha/opac-reset-password.pl" name="mainform" id="mainform" method="post" autocomplete="off">
78 <legend class="sr-only">Reset your password</legend>
80 <fieldset class="brief">
81 <div class="form-group">
82 <label for="userid">Login:</label>
83 <input class="form-control" type="text" size="25" id="userid" name="userid" />
85 <div class="form-group">
86 <label for="currentpassword">Current password:</label>
87 <input class="form-control" autocomplete="off" type="password" size="25" id="currentpassword" name="currentpassword" />
89 <div class="form-group">
90 <label for="newpassword">New password:</label>
91 <input class="form-control" autocomplete="off" type="password" size="25" id="newpassword" name="newpassword" />
93 <div class="form-group">
94 <label for="confirmpassword">Confirm new password:</label>
95 <input class="form-control" autocomplete="off" type="password" size="25" id="confirmpassword" name="confirmpassword" />
97 <fieldset class="action">
98 <input type="submit" value="Update password" class="btn btn-primary" />
100 <input type="hidden" name="op" value="update" />
102 [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
103 <div id="resetpassword">
104 <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
108 [% END # /IF Error_messages %]
111 <h1>Resetting your password has not been enabled by the library.</h1>
112 [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %]
113 <div id="resetpassword">
114 <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
117 <p>You must contact the library to reset your password</p>
119 [% END # / IF opacuserlogin %]
121 </div> <!-- /.opac-auth -->
122 </div> <!-- /.col-md-10 col-lg-6 -->
123 </div> <!-- /.row -->
124 </div> <!-- /.container-fluid -->
125 </div> <!-- /.main -->
127 [% INCLUDE 'opac-bottom.inc' %]
128 [% BLOCK jsinclude %]
129 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
131 jQuery.validator.addMethod("password_no_spaces", function(value, element){
132 return ( this.optional(element) || !value.match(/^\s/) && !value.match(/\s$/) );
133 }, _("Password contains leading and/or trailing spaces"));
134 jQuery.validator.addMethod("password_match", function(value, element){
135 var new_password_node = $("input[name='newpassword']:first");
136 return value == $(new_password_node).val();
137 }, _("Please enter the same password as above"));
139 $(document).ready(function() {
140 $("#mainform").validate({
147 password_no_spaces: true