Bug 19444: Display error message for auto_account_expired
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-passwd.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Change your password</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% BLOCK cssinclude %][% END %]
6 </head>
7 [% INCLUDE 'bodytag.inc' bodyid='opac-passwd' %]
8 [% INCLUDE 'masthead.inc' %]
9
10 <div class="main">
11     <ul class="breadcrumb">
12         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
13         <li><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]</a> <span class="divider">&rsaquo;</span></li>
14         <li><a href="#">Change your password</a></li>
15     </ul>
16
17     <div class="container-fluid">
18         <div class="row-fluid">
19             <div class="span2">
20                 <div id="navigation">
21                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
22                 </div>
23             </div>
24             <div class="span10">
25                 <div id="userpasswd">
26                     <h3>Change your password </h3>
27
28                     [% IF ( Error_messages ) %]
29                         <div class="alert">
30                             <h3>There was a problem with your submission</h3>
31                             <p>
32                                 [% IF ( passwords_mismatch ) %]
33                                 Passwords do not match.  Please re-type your new password.
34                                 [% END %]
35                                 [% IF password_too_short %]
36                                     Password must be at least [% minPasswordLength %] characters long.
37                                 [% END %]
38                                 [% IF password_too_weak %]
39                                     Password must contain at least one digit, one lowercase and one uppercase.
40                                 [% END %]
41                                 [% IF password_has_whitespaces %]
42                                     Password must not contain leading or trailing whitespaces.
43                                 [% END %]
44
45                                 [% IF ( WrongPass ) %]
46                                 Your current password was entered incorrectly.  If this problem persists, please ask a librarian to reset your password for you.
47                                 [% END %]
48                             </p>
49                         </div>
50                     [% END # /IF Error_messages %]
51
52                     [% IF ( OpacPasswordChange ) %]
53                         [% IF ( Ask_data ) %]
54
55                             <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post">
56                                 <fieldset>
57                                     [% UNLESS ( ShortPass ) %]<div class="alert alert-info">Your password must be at least [% minPasswordLength%] characters long.</div>[% END %]
58                                     <label for="Oldkey">Current password:</label> <input type="password" id="Oldkey" size="25"  name="Oldkey" />
59                                     <label for="Newkey">New password:</label> <input type="password" id="Newkey"  size="25"  name="Newkey" />
60                                     <label for="Confirm">Re-type new password:</label> <input type="password"  id="Confirm" size="25" name="Confirm" />
61                                 </fieldset>
62                                 <fieldset class="action"><input type="submit" value="Submit changes" class="btn" /> <a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a></fieldset>
63                             </form>
64                         [% END # /IF Ask_data %]
65                     [% ELSE %]
66                         <div class="alert">You can't change your password.</div>
67                     [% END # /IF OpacPasswordChange %]
68
69                     [% IF ( password_updated ) %]
70                         <div class="alert alert-success">
71                             <h1>Password updated</h1>
72                             Your password has been changed
73                         </div>
74                         <form action="/cgi-bin/koha/opac-user.pl" method="post">
75                             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
76                             <p><input type="submit" class="btn" value="Return to your record" /></p>
77                         </form>
78                     [% END # /IF password_updated %]
79                 </div> <!-- / #userpasswd -->
80             </div> <!-- / .span10 -->
81         </div> <!-- / .row-fluid -->
82     </div> <!-- / .container-fluid -->
83 </div> <!-- / .main -->
84
85
86
87 [% INCLUDE 'opac-bottom.inc' %]
88 [% BLOCK jsinclude %]
89     <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.validate.min.js"></script>
90     [% PROCESS 'password_check.inc' %]
91     [% PROCESS 'add_password_check' new_password => 'Newkey' %]
92     <script type="text/javascript">
93         $(document).ready(function() {
94             $("#mainform").validate({
95                 rules: {
96                     Newkey: {
97                         required: true,
98                         password_strong: true,
99                         password_no_spaces: true
100                     },
101                     Confirm: {
102                         required: true,
103                         password_match: true
104                     }
105                 }
106             });
107         });
108     </script>
109 [% END %]