Bug 18653: Possible privacy breach with OPAC password recovery
[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 (errAlreadyStartRecovery) %]
58                         The process of password recovery has already been started for this account ("<strong>[% username %]</strong>")
59                         <br/>You should have received an email with a link to reset your password.
60                         <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>
61                     [% ELSIF (errPassNotMatch) %]
62                         The passwords do not match.
63                     [% ELSIF (errPassTooShort) %]
64                         Your chosen password is too short.
65                         <br/>The password must contain at least [% minPassLength %] characters.
66                     [% ELSIF (errLinkNotValid) %]
67                         The link you clicked is either invalid, or expired.
68                         <br/>Be sure you used the link from the email, or contact library staff for assistance.
69                     [% END %]
70                     </p>
71                     <p>Please contact the library if you need further assistance.</p>
72                 </div>
73             [% END %]
74                 <div id="password-recovery">
75 [% IF (!Koha.Preference('OpacResetPassword')) %]
76                     <div class="alert alert-info">You can't reset your password.</div>
77 [% ELSIF (password_recovery) %]
78                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
79                         <input type="hidden" name="koha_login_context" value="opac" />
80                         <fieldset>
81                             <p>To reset your password, enter your login and email address.
82                             <label for="username">Login:</label>
83                             <input type="text" id="username" size="40" name="username" value="[% username %]" />
84                             <label for="email">Email:</label>
85                             <input type="text" id="email" size="40" name="email" value="[% email %]" />
86                             <fieldset class="action">
87                                 <input type="submit" value="Submit" class="btn" name="sendEmail" />
88                             </fieldset>
89                          </fieldset>
90                     </form>
91 [% ELSIF (new_password) %]
92                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
93                         <input type="hidden" name="koha_login_context" value="opac" />
94                         <fieldset>
95                             <div class="alert alert-info">The password must contain at least [% minPassLength %] characters.</div>
96                             <label for="password">New password:</label>
97                             <input type="password" id="password" size="40" name="password" />
98                             <label for="repeatPassword">Confirm new password:</label>
99                             <input type="password" id="repeatPassword" size="40" name="repeatPassword" />
100                             <fieldset class="action">
101                                 <input type="hidden" name="username" value="[% username %]" />
102                                 <input type="hidden" name="uniqueKey" value="[% uniqueKey %]" />
103                                 <input type="submit" value="Submit" class="btn" name="passwordReset" />
104                             </fieldset>
105                          </fieldset>
106                     </form>
107 [% ELSIF (mail_sent) %]
108                     <div class="alert alert-info">
109                         <p>
110                             You will receive an email shortly.
111                             <br/>Please click the link in this email to finish the process of resetting your password.
112                             <br/>This link is valid for 2 days starting now.
113                         </p>
114                         <a href="/cgi-bin/koha/opac-main.pl"">Return to the main page</a>
115                     </div>
116 [% ELSIF (password_reset_done) %]
117                     <div class="alert alert-success">
118                         <p>The password has been changed for user "[% username %]".</p>
119                         <a href="/cgi-bin/koha/opac-user.pl">Click here to login.</a>
120                     </div>
121 [% END %]
122                 </div><!-- / #password-recovery -->
123             </div><!-- / .span10 -->
124         </div><!-- / .row-fluid -->
125     </div><!-- / .container-fluid -->
126 </div><!-- / .main -->
127 [% INCLUDE 'opac-bottom.inc' %]