6d2e5d2ad42fd18d0c1a56715ad55fd241241a89
[koha-equinox.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-password-recovery.tt
1 [% USE Koha %]
2 [% USE Categories %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Forgotten password recovery</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
7 [% BLOCK jsinclude %]
8 <script>
9    $(function() {
10         $("#CheckAll").click(function(){
11                 $("[name=deleteRequest]").attr('checked', true);
12                 return false;
13             });
14
15         $("#CheckNone").click(function(){
16                 $("[name=deleteRequest]").attr('checked', false);
17                 return false;
18             });
19
20         $("select#type").change(function() {
21             $("fieldset#serial, fieldset#book, fieldset#chapter").hide()
22             $("fieldset#" + $(this).val() ).show();
23         });
24    });
25 </script>
26 [% END %]
27 </head>
28 [% INCLUDE 'bodytag.inc' bodyid='opac-password-recovery' %]
29 [% INCLUDE 'masthead.inc' %]
30
31 <div class="main">
32     <ul class="breadcrumb">
33         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
34         <li><a href="#">Forgotten password recovery</a></li>
35     </ul>
36
37     <div class="container-fluid">
38         <div class="row-fluid">
39             <div class="span2">
40                 [% IF ( OpacPublic ) %]
41
42                 <div id="navigation">
43                     [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
44                 </div>
45                 [% END %]
46             </div>
47             <div class="span10">
48                     <h3>Forgotten password recovery</h3>
49             [% IF (hasError) %]
50                 <div class="alert alert-warning">
51                     <h3>Error</h3>
52                     <p>
53                     [% IF (sendmailError) %]
54                         An error has occurred while sending you the password recovery link.
55                         <br/>Please try again later.
56                     [% ELSIF (errNoBorrowerFound) %]
57                         No account was found with the provided information.
58                     [% ELSIF errResetForbidden %]
59                         <span id="password-reset-forbidden">Sorry, your password cannot be changed online.</span>
60                     [% ELSIF (errMultipleAccountsForEmail) %]
61                         Account identification with this email address only is ambiguous.
62                         <br />Please use the field 'Login' as well.
63                     [% ELSIF (errAlreadyStartRecovery) %]
64                         The process of password recovery has already been started for this account
65                         [% IF username %]
66                             ("<strong>[% username | html %]</strong>")
67                         [% ELSIF email %]
68                             ("<strong>[% email | html %]</strong>")
69                         [% END %]
70                         <br/>You should have received an email with a link to reset your password.
71                         <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>
72                     [% ELSIF (errPassNotMatch) %]
73                         The passwords do not match.
74                     [% ELSIF password_too_short %]
75                         <li>Password must be at least [% minPasswordLength | html %] characters long.</li>
76                     [% ELSIF password_too_weak %]
77                         <li>Password must contain at least one digit, one lowercase and one uppercase.</li>
78                     [% ELSIF password_has_whitespaces %]
79                         <li>Password must not contain leading or trailing whitespaces.</li>
80                     [% ELSIF (errLinkNotValid) %]
81                         The link you clicked is either invalid, or expired.
82                         <br/>Be sure you used the link from the email, or contact library staff for assistance.
83                     [% END %]
84                     </p>
85                     <p>Please contact the library if you need further assistance.</p>
86                 </div>
87             [% END %]
88                 <div id="password-recovery">
89 [% IF (! Categories.can_any_reset_password ) %]
90                     <div class="alert alert-info">You can't reset your password.</div>
91 [% ELSIF (password_recovery) %]
92                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off">
93                         <input type="hidden" name="koha_login_context" value="opac" />
94                         <fieldset>
95                             <p>To reset your password, enter your login or your email address.</p>
96                             <label for="username">Login:</label>
97                             <input type="text" id="username" size="40" name="username" value="[% username | html %]" />
98                             <label for="email">Email:</label>
99                             <input type="text" id="email" size="40" name="email" value="[% email | html %]" />
100                             <fieldset class="action">
101                                 <input type="submit" value="Submit" class="btn" name="sendEmail" />
102                             </fieldset>
103                          </fieldset>
104                     </form>
105 [% ELSIF (new_password) %]
106     [% UNLESS ( errLinkNotValid ) %]
107                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off">
108                         <input type="hidden" name="koha_login_context" value="opac" />
109                         <fieldset>
110                             [% IF ( Koha.Preference('RequireStrongPassword') ) %]
111                                 <div class="alert alert-info">Your password must contain at least [% Koha.Preference('minPasswordLength') | html %] characters, including UPPERCASE, lowercase and numbers.</div>
112                             [% ELSE %]
113                                 <div class="alert alert-info">Your password must be at least [% Koha.Preference('minPasswordLength') | html %] characters long.</div>
114                             [% END %]
115                             <label for="password">New password:</label>
116                             <input type="password" id="password" size="40" name="password" />
117                             <label for="repeatPassword">Confirm new password:</label>
118                             <input type="password" id="repeatPassword" size="40" name="repeatPassword" />
119                             <fieldset class="action">
120                                 <input type="hidden" name="username" value="[% username | html %]" />
121                                 <input type="hidden" name="uniqueKey" value="[% uniqueKey | html %]" />
122                                 <input type="submit" value="Submit" class="btn" name="passwordReset" />
123                             </fieldset>
124                          </fieldset>
125                     </form>
126     [% END %]
127 [% ELSIF (mail_sent) %]
128                     <div class="alert alert-info">
129                         <p>
130                             You will receive an email shortly.
131                             <br/>Please click the link in this email to finish the process of resetting your password.
132                             <br/>This link is valid for 2 days starting now.
133                         </p>
134                         <a href="/cgi-bin/koha/opac-main.pl">Return to the main page</a>
135                     </div>
136 [% ELSIF (password_reset_done) %]
137                     <div class="alert alert-success">
138                         <p>The password has been changed for user "[% username | html %]".</p>
139                         <a href="/cgi-bin/koha/opac-user.pl">Click here to login.</a>
140                     </div>
141 [% END %]
142                 </div><!-- / #password-recovery -->
143             </div><!-- / .span10 -->
144         </div><!-- / .row-fluid -->
145     </div><!-- / .container-fluid -->
146 </div><!-- / .main -->
147 [% INCLUDE 'opac-bottom.inc' %]