4 [% USE AdditionalContents %]
5 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
6 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Change your password › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
12 [% INCLUDE 'bodytag.inc' bodyid='opac-passwd' %]
13 [% INCLUDE 'masthead.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
17 <ol class="breadcrumb">
18 <li class="breadcrumb-item">
19 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
21 <li class="breadcrumb-item">
22 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
24 <li class="breadcrumb-item active">
25 <a href="#" aria-current="page">Change your password</a>
28 </nav> <!-- /#breadcrumbs -->
30 <div class="container-fluid">
32 <div class="col-lg-2">
34 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
37 <div class="col-10 order-first order-lg-2">
38 <div id="userpasswd" class="maincontent">
39 <h1>Change your password </h1>
41 [% IF ( Error_messages ) %]
42 <div class="alert alert-warning">
43 <h2>There was a problem with your submission</h2>
45 [% IF ( passwords_mismatch ) %]
46 Passwords do not match. Please re-type your new password.
48 [% IF password_too_short %]
49 Password must be at least [% minPasswordLength | html %] characters long.
51 [% IF password_too_weak %]
52 Password must contain at least one digit, one lowercase and one uppercase.
54 [% IF password_has_whitespaces %]
55 Password must not contain leading or trailing whitespaces.
58 [% IF ( WrongPass ) %]
59 Your current password was entered incorrectly. If this problem persists, please ask a librarian to reset your password for you.
63 [% END # /IF Error_messages %]
65 [% IF logged_in_user.category.effective_change_password %]
67 <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post" autocomplete="off">
68 <legend class="sr-only">Change your password</legend>
70 [% IF ( logged_in_user.category.effective_require_strong_password ) %]
71 <div class="alert alert-info">Your password must contain at least [% logged_in_user.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</div>
73 <div class="alert alert-info">Your password must be at least [% logged_in_user.category.effective_min_password_length | html %] characters long.</div>
75 <div class="form-group">
76 <label for="Oldkey">Current password:</label>
77 <input class="form-control focus" type="password" id="Oldkey" size="25" name="Oldkey" />
79 <div class="form-group">
80 <label for="Newkey">New password:</label>
81 <input class="form-control" type="password" id="Newkey" size="25" name="Newkey" />
83 <div class="form-group">
84 <label for="Confirm">Re-type new password:</label>
85 <input class="form-control" type="password" id="Confirm" size="25" name="Confirm" />
88 <fieldset class="action">
89 <input type="submit" value="Change password" class="btn btn-primary" />
90 <a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a>
93 [% END # /IF Ask_data %]
95 <div class="alert alert-warning">You can't change your password.</div>
96 [% END # /IF logged_in_user.category.effective_change_password %]
98 [% IF ( password_updated ) %]
99 <div class="alert alert-info">
100 <strong>Password updated</strong>
102 Your password has been changed
104 <form action="/cgi-bin/koha/opac-user.pl" method="post" autocomplete="off">
105 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
106 <p><input type="submit" class="btn btn-primary" value="Return to my account" /></p>
108 [% END # /IF password_updated %]
109 </div> <!-- / #userpasswd -->
110 </div> <!-- / .col-10 -->
111 </div> <!-- / .row -->
112 </div> <!-- / .container-fluid -->
113 </div> <!-- / .main -->
117 [% INCLUDE 'opac-bottom.inc' %]
118 [% BLOCK jsinclude %]
119 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
120 [% PROCESS 'password_check.inc' new_password => 'Newkey', minPasswordLength => logged_in_user.category.effective_min_password_length, RequireStrongPassword => logged_in_user.category.effective_require_strong_password %]
122 $(document).ready(function() {
123 $("#mainform").validate({
127 password_strong: true,
128 password_no_spaces: true