3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Patrons › [% IF ( newpassword ) %]Password updated [% ELSE %]Update password for [% surname %], [% firstname %][% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/JavaScript">
9 $(document).ready(function() {
10 $("body").on('click', "#fillrandom",function(e) {
12 $.get("/cgi-bin/koha/members/member-password.pl?member=[% userid %]", function(response) {
13 var defaultnewpass = $(response).find("#defaultnewpassfield").val();
14 $("#newpassword").after("<input type=\"text\" name=\"newpassword\" id=\"newpassword\" value=\"" + defaultnewpass + "\">").remove();
15 $("#newpassword2").after("<input type=\"text\" name=\"newpassword2\" id=\"newpassword2\" value=\"" + defaultnewpass + "\">").remove();
18 $("div.hint").eq(0).after(" <div class=\"hint\"><a href=\"#\" id=\"fillrandom\">"+_("Click to fill with a randomly generated suggestion. ")+"<strong>"+_("Passwords will be displayed as text")+"</strong>.</a></div>");
20 $(document).ajaxStart(function () {
21 $("input[name^=newpassword]").hide();
22 $("label[for=newpassword2]").hide();
23 $(".hint:last").after($(".loading").show());
25 $(document).ajaxStop(function () {
26 $("input[name^=newpassword]").show();
27 $("label[for=newpassword2]").show();
29 $("label.error").hide();
32 $("#newpassword").addClass('focus');
35 $("#changepasswordf").validate({
39 password_strong: true,
40 password_no_spaces: true
52 <body id="pat_member-password" class="pat">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'patron-search.inc' %]
56 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% firstname %] [% surname %]</a> › [% IF ( newpassword ) %]Password Updated[% ELSE %]Change username and/or password[% END %]</div>
58 <div id="doc3" class="yui-t2">
63 [% INCLUDE 'members-toolbar.inc' %]
65 [% IF ( newpassword ) %]
66 <h1>Password Updated</h1>
70 <form method="post" id="changepasswordf" action="/cgi-bin/koha/members/member-password.pl">
71 <input type="hidden" name="destination" value="[% destination %]" />
72 <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
73 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
75 <div class="dialog alert">
76 <h4>The following errors have occurred:</h4>
78 [% IF ( BADUSERID ) %]
79 <li>You have entered a username that already exists. Please choose another one.</li>
81 [% IF ( SHORTPASSWORD ) %]
82 <li><strong>The password entered is too short</strong>. Password must be at least [% minPasswordLength %] characters.</li>
84 [% IF ( NOPERMISSION ) %]
85 <li>You do not have permission to edit this patron's login information.</li>
88 <li><strong>The passwords entered do not match</strong>. Please re-enter the new password.</li>
95 <fieldset class="brief"><legend>Change username and/or password for [% firstname %] [% surname %]</legend>
97 <li><label for="newuserid">New username:</label>
98 <input type="hidden" name="member" value="[% borrowernumber %]" /><input type="text" id="newuserid" name="newuserid" size="20" value="[% userid %]" /></li>
99 [% SET password_pattern = ".{" _ minPasswordLength _ ",}" %]
100 [% IF Koha.Preference('RequireStrongPassword') %]
101 [% SET password_pattern = '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{' _ minPasswordLength _ ',}' %]
104 <label for="newpassword">New password:</label>
105 <div class="hint">Koha cannot display existing passwords. Leave the field blank to leave password unchanged.</div>
106 <input name="newpassword" id="newpassword" type="password" size="20" />
109 <label for="newpassword2">Confirm new password:</label>
110 <input name="newpassword2" id="newpassword2" type="password" size="20" />
114 <fieldset class="action">
115 <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
116 <input type="submit" value="Save" />
117 <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a>
123 <input type="hidden" name="defaultnewpassfield" id="defaultnewpassfield" value="[% defaultnewpassword %]" />
124 <div class="loading hide"><strong>Processing...</strong><img src="[% interface %]/[% theme %]/img/loading.gif" alt="" /></div>
126 [% INCLUDE 'circ-menu.inc' %]
129 [% INCLUDE 'intranet-bottom.inc' %]
130 [% PROCESS 'password_check.inc' %]
131 [% PROCESS 'add_password_check' new_password => 'newpassword' %]