]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/password_reset.tt2
LP#1778972: Tweaks and fixes to Bootstrap 4 template
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / password_reset.tt2
1 [%- PROCESS "opac/parts/header.tt2";
2     WRAPPER "opac/parts/base.tt2";
3     INCLUDE "opac/parts/topnav.tt2";
4     ctx.page_title = l('Library system password reset request form');
5 -%]
6 <h2 class="sr-only">[% l('Reset Password') %]</h2>
7 <div>
8 [% INCLUDE "opac/parts/searchbar.tt2" %]
9 </div>
10
11 [%
12     uuid = ctx.page_args.0;
13     msg_map = {
14         SUCCESS => l('Password has been reset'),
15         NO_MATCH => l('Passwords did not match. Please try again'),
16         NOT_ACTIVE => l('This was not an active password reset request. Your password has not been reset.'),
17         NOT_STRONG => l('The password you chose was not considered complex enough to protect your account. Your password has not been reset.'),
18         TWO_PASSWORDS => l('Please enter and repeat your new password.'),
19         REQUEST_SUCCESS => l('Your user name or barcode has been submitted for a password reset. ' _
20             'If a matching account with an email address is found, you will soon receive an email at that address with further instructions for resetting your password.')
21     }
22 %]
23 <div class="container">
24 <hr>
25     <div class="text-center m-3">
26         <br/>
27         <p class='[% ctx.pwreset.style %]'>[% stat = ctx.pwreset.status; msg_map.$stat %]</p>
28         [% IF uuid %]
29             [% IF stat == 'SUCCESS' %]
30                 <p><a href='[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]'>[% l('Log in to My Account') %]</a>
31             [% ELSE %]
32
33
34             <form method="post">
35                 <input type='hidden' name='uuid' value='[% uuid | html %]'/>
36                 <div class="form-group row">
37                         <label for="pwd1" class="col-sm-6 col-form-label">[% l('New password:') %]</label>
38                         <input  type="password" class="form-control col-sm-6" name="pwd1"/>
39                         </div>
40                    <div class="form-group row">
41                         <label for="pwd2" class="col-sm-6 col-form-label">[% l('Re-enter new password:') %]</label>
42                         <input type="password" class="form-control col-sm-6" name="pwd2"/>
43                         </div>
44
45                             <button name="submit" class="btn btn-confirm" id="submitButton" type="submit"><i class="fas fa-save" aria-hidden="true"></i> [% l('Submit') %]</button>
46
47             </form>
48             [% END %]
49         [% ELSIF !ctx.pwreset.status %]
50         <h2>[% l('Please enter your user name or barcode to identify your library account and request a password reset') %]</h2>
51         [%- INCLUDE "opac/password_reset_msg.tt2" %]
52         <form method="post">
53             <div class="form-group row">
54                     <label for="barcode" class="col-sm-6 col-form-label">[% l('Barcode:') %] </label>
55                     <input type="text" class="form-control col-sm-6" id="barcode" name="barcode"/>
56                     </div>
57                 <div class="form-group row">
58                     <label for="username" class="col-sm-6 col-form-label">[% l('User name:') %] </label>
59                     <input type="text" class="form-control col-sm-6" id="username" name="username"/>
60                     </div>
61
62                 [% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'circ.password_reset_request_requires_matching_email') %]
63                  <div class="form-group row">
64                <label for="email" class="col-sm-6 col-form-label">[% l('Email address associated with the account:') %] </label>
65                     <input type="text" class="form-control col-sm-6" name="email"/><br/>
66                     </div>
67                 [% END %]
68
69             <button name="submit" id="submitButton" class="btn btn-confirm" type="submit"><i class="fas fa-save" aria-hidden="true"></i> [% l('Submit') %]</button>
70         </form>
71         [% END %]
72     </div>
73 </div>
74 [%- END %]