Bug 8753 - Add forgot password link to OPAC
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-password-recovery.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 [% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
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="#">Change your password</a></li>
34     </ul>
35
36     <div class="container-fluid">
37         <div class="row-fluid">
38             <div class="span2">
39                 <div id="navigation">
40                     [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
41                 </div>
42             </div>
43             <div class="span10">
44                     <h3>Password recovery</h3>
45             [% IF (hasError) %]
46                 <div class="alert alert-warning">
47                     <h3>An error occured</h3>
48                     <p>
49                     [% IF (sendmailError) %]
50                         An error has occured while sending you the password recovery link.
51                         <br/>Please try again later.
52                     [% ELSIF (errNoBorrowerFound) %]
53                         No account was found with the provided information.
54                         <br/>Check if you typed it correctly.
55                     [% ELSIF (errBadEmail) %]
56                         The provided email address is not tied to this account.
57                     [% ELSIF (errTooManyEmailFound) %]
58                         More than one account has been found for the email address: "<strong>[% email %]</strong>"
59                         <br/>Try to use your username or an alternative email if you have one.
60                     [% ELSIF (errNoBorrowerEmail) %]
61                         This account has no email address we can send the email to.
62                     [% ELSIF (errAlreadyStartRecovery) %]
63                         The process of password recovery has already started for this account ("<strong>[% username %]</strong>")
64                         <br/>Check your emails; you should receive the link to reset your password.
65                         <br/>If you did not receive it, click <a href="/cgi-bin/koha/opac-password-recovery.pl?resendEmail=true&email=[% email %]&username=[% username %]">here</a> to get a new password recovery link.
66                     [% ELSIF (errPassNotMatch) %]
67                         The passwords entered does not match.
68                         <br/>Please try again.
69                     [% ELSIF (errPassTooShort) %]
70                         The password is too short.
71                         <br/>The password must contain at least [% minPassLength %] characters.
72                     [% ELSIF (errLinkNotValid) %]
73                         We could not authenticate you as the account owner.
74                         <br/>Be sure to use the link you received in your email.
75                     [% END %]
76                     </p>
77                     <p>Please contact the staff if you need further assistance.</p>
78                 </div>
79             [% END %]
80                 <div id="password-recovery">
81 [% IF (!Koha.Preference('OpacResetPassword')) %]
82                     <div class="alert alert-info">You can't reset your password.</div>
83 [% ELSIF (password_recovery) %]
84                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
85                         <input type="hidden" name="koha_login_context" value="opac" />
86                         <fieldset>
87                             <p>To reset your password, enter your username or email address.
88                             <br/>A link to reset your password will be sent at this address.</p>
89                             <label for="username">Login:</label>
90                             <input type="text" id="username" size="40" name="username" value="[% username %]" />
91                             <label for="email">Email:</label>
92                             <input type="text" id="email" size="40" name="email" value="[% email %]" />
93                             <fieldset class="action">
94                                 <input type="submit" value="Submit" class="btn" name="sendEmail" />
95                             </fieldset>
96                          </fieldset>
97                     </form>
98 [% ELSIF (new_password) %]
99                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
100                         <input type="hidden" name="koha_login_context" value="opac" />
101                         <fieldset>
102                             <div class="alert alert-info">The password must contain at least [% minPassLength %] characters.</div>
103                             <label for="password">New password:</label>
104                             <input type="password" id="password" size="40" name="password" />
105                             <label for="repeatPassword">Confirm new password:</label>
106                             <input type="password" id="repeatPassword" size="40" name="repeatPassword" />
107                             <fieldset class="action">
108                                 <input type="hidden" name="username" value="[% username %]" />
109                                 <input type="hidden" name="uniqueKey" value="[% uniqueKey %]" />
110                                 <input type="submit" value="Submit" class="btn" name="passwordReset" />
111                             </fieldset>
112                          </fieldset>
113                     </form>
114 [% ELSIF (mail_sent) %]
115                     <div class="alert alert-info">
116                         <p>
117                             An email has been sent to "[% email %]".
118                             <br/>It contains a link to create a new password.
119                             <br/>This link will be valid for 2 days starting now.
120                         </p>
121                         Click <a href="/cgi-bin/koha/opac-main.pl"">here</a> to return to the main page.
122                     </div>
123 [% ELSIF (password_reset_done) %]
124                     <div class="alert alert-success">
125                         <p>The password has been changed for user "[% username %]".</p>
126                         Click <a href="/cgi-bin/koha/opac-user.pl">here</a> to login.
127                     </div>
128 [% END %]
129                 </div><!-- / #password-recovery -->
130             </div><!-- / .span10 -->
131         </div><!-- / .row-fluid -->
132     </div><!-- / .container-fluid -->
133 </div><!-- / .main -->
134 [% INCLUDE 'opac-bottom.inc' %]