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