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