3 [% USE AdditionalContents %]
4 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
5 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Forgotten password recovery › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% BLOCK cssinclude %][% END %]
11 [% IF (new_password) %]
12 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
13 [% PROCESS 'password_check.inc' new_password => 'newPassword', minPasswordLength => minPasswordLength, RequireStrongPassword => RequireStrongPassword %]
17 $("#CheckAll").click(function(){
18 $("[name=deleteRequest]").attr('checked', true);
22 $("#CheckNone").click(function(){
23 $("[name=deleteRequest]").attr('checked', false);
27 $("select#type").change(function() {
28 $("fieldset#serial, fieldset#book, fieldset#chapter").hide()
29 $("fieldset#" + $(this).val() ).show();
31 [% IF (new_password) %]
32 $("#mainform").validate({
36 password_strong: true,
37 password_no_spaces: true
50 [% INCLUDE 'bodytag.inc' bodyid='opac-password-recovery' %]
51 [% INCLUDE 'masthead.inc' %]
54 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
55 <ol class="breadcrumb">
56 <li class="breadcrumb-item">
57 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
59 <li class="breadcrumb-item active">
60 <a href="#" aria-current="page">Forgotten password recovery</a>
63 </nav> <!-- /#breadcrumbs -->
65 <div class="container-fluid">
67 <div class="col-lg-2">
68 [% IF ( OpacPublic ) %]
70 [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
74 <div class="col-6 order-first order-md-first order-lg-2 maincontent">
75 <h1>Forgotten password recovery</h1>
77 <div class="alert alert-warning">
80 [% IF (sendmailError) %]
81 An error has occurred while sending you the password recovery link.
82 <br/>Please try again later.
83 [% ELSIF (errNoBorrowerFound) %]
84 No account was found with the provided information.
85 [% ELSIF errResetForbidden %]
86 <span id="password-reset-forbidden">Sorry, your password cannot be changed online.</span>
87 [% ELSIF (errMultipleAccountsForEmail) %]
88 Account identification with this email address only is ambiguous.
89 <br />Please use the field 'Login' as well.
90 [% ELSIF (errNoBorrowerEmail) %]
91 This account has no email address we can send the email to.
92 [% ELSIF (errAlreadyStartRecovery) %]
93 The process of password recovery has already been started for this account
95 ("<strong>[% username | html %]</strong>")
97 ("<strong>[% email | html %]</strong>")
99 <br/>You should have received an email with a link to reset your password.
100 <br/>If you did not receive this email, you can request a new one: <a href="/cgi-bin/koha/opac-password-recovery.pl?resendEmail=true&email=[% email | uri %]&username=[% username | uri %]">Get new password recovery link</a>
101 [% ELSIF (errPassNotMatch) %]
102 The passwords do not match.
103 [% ELSIF password_too_short %]
104 <li>Password must be at least [% minPasswordLength | html %] characters long.</li>
105 [% ELSIF password_too_weak %]
106 <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
107 [% ELSIF password_has_whitespaces %]
108 <li>Password must not contain leading or trailing whitespaces.</li>
109 [% ELSIF (errLinkNotValid) %]
110 The link you clicked is either invalid, or expired.
111 <br/>Be sure you used the link from the email, or contact library staff for assistance.
114 <p>Please contact the library if you need further assistance.</p>
115 </div> <!-- /div.alert.alert-warning -->
116 [% END # /IF hasError %]
118 <div id="password-recovery">
119 [% IF (! Categories.can_any_reset_password ) %]
120 <div class="alert alert-info">You can't reset your password.</div>
121 [% ELSIF (password_recovery) %]
122 <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off">
123 <legend class="sr-only">Password recovery</legend>
124 <input type="hidden" name="koha_login_context" value="opac" />
125 <p>To reset your password, enter your login or your email address.</p>
126 <fieldset class="brief">
127 <div class="form-group">
128 <label for="username">Login:</label>
129 <input class="form-control" type="text" id="username" size="40" name="username" value="[% username | html %]" />
132 <div class="form-group">
133 <label for="email">Email:</label>
134 <input class="form-control" type="text" id="email" size="40" name="email" value="[% email | html %]" />
137 <fieldset class="action">
138 <input type="submit" value="Submit" class="btn btn-primary" name="sendEmail" />
142 [% ELSIF (new_password) %]
143 [% UNLESS ( errLinkNotValid ) %]
144 <form id="mainform" name="mainform" action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off">
145 <legend class="sr-only">Password not valid</legend>
146 <input type="hidden" name="koha_login_context" value="opac" />
147 <fieldset class="brief">
148 [% IF ( RequireStrongPassword ) %]
149 <div class="alert alert-info">Your password must contain at least [% minPasswordLength | html %] characters, including UPPERCASE, lowercase and numbers.</div>
151 <div class="alert alert-info">Your password must be at least [% minPasswordLength | html %] characters long.</div>
153 <div class="form-group">
154 <label for="newPassword">New password:</label>
155 <input class="form-control" type="password" id="newPassword" size="40" name="newPassword" />
158 <div class="form-group">
159 <label for="repeatPassword">Confirm new password:</label>
160 <input class="form-control" type="password" id="repeatPassword" size="40" name="repeatPassword" />
163 <fieldset class="action">
164 <input type="hidden" name="username" value="[% username | html %]" />
165 <input type="hidden" name="uniqueKey" value="[% uniqueKey | html %]" />
166 <input type="submit" value="Submit" class="btn btn-primary" name="passwordReset" />
170 [% END # /UNLESS errLinkNotValid %]
171 [% ELSIF (mail_sent) %]
172 <div class="alert alert-info">
174 You will receive an email shortly.
175 <br/>Please click the link in this email to finish the process of resetting your password.
176 <br/>This link is valid for 2 days starting now.
178 <a href="/cgi-bin/koha/opac-main.pl">Return to the main page</a>
180 [% ELSIF (password_reset_done) %]
181 <div class="alert alert-success">
182 <p>The password has been changed for user "[% username | html %]".</p>
183 <a href="/cgi-bin/koha/opac-user.pl">Log in to your account.</a>
185 [% END # /IF (! Categories.can_any_reset_password ) %]
186 </div><!-- / #password-recovery -->
187 </div><!-- / .span10 -->
188 </div><!-- / .row-fluid -->
189 </div><!-- / .container-fluid -->
190 </div><!-- / .main -->
191 [% INCLUDE 'opac-bottom.inc' %]