]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac-new/parts/login/login_modal.tt2
LP#1778972: (follow-up) remove a NFPL-specific template
[Evergreen.git] / Open-ILS / src / templates / opac-new / parts / login / login_modal.tt2
1 <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
2   <div class="modal-dialog modal-dialog-centered" role="document">
3     <div class="modal-content">
4      <form method='post' action="/eg/opac/login?redirect_to=%2Feg%2Fopac%2Fmyopac%2Fmain">
5       <div class="modal-header">
6         <h5 class="modal-title" id="exampleModalLabel">Login To Evergreen</h5>
7         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
8           <span aria-hidden="true">&times;</span>
9         </button>
10       </div>
11       <div class="modal-body">
12       
13         [% IF ctx.login_failed_event %]
14                 <div id='login-failed-message'>
15                 [%
16                 IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
17                         l("The barcode used to login is marked as inactive.  Please contact your local library.");
18                 ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
19                         l("This account has been deactivated.  Please contact your local library.");
20                 ELSE;
21                         l("Login failed. The username or password provided was not valid. " _
22                         "Passwords are case-sensitive.  Check your Caps-Lock key and try again or contact your local library.");
23                 END;
24                 %]
25                 </div>
26                 [% END %]
27
28 <div id='login-form-box' class='container text-center'>
29     <div class="mx-auto row py-4">
30         <div class='col-md-6'>
31             <label for='username_field' class="lbl1" >[% l('Library Card Number') %]</label>
32             <div class="input_bg mb-2">
33                 <input class="form-control" type='text' id="username_field" name="username" autofocus />
34             </div>
35             <div>[% l('Use the full number.') %]</div>
36             <div>[% l('Example: 280800001234567') %]</div>
37             <br>
38             <a href='[% mkurl(ctx.opac_root _ '/register', {}, 1) %]'>[% l('Request A Card') %]</a>
39         </div>
40         <div class='col-md-6'>
41             <label for="password_field" class="lbl1" >[% l('PIN') %]</label>
42             <div class="input_bg mb-2">
43                 <input class="form-control" id="password_field" name="password" type="password" />
44             </div>
45             [% INCLUDE "opac/parts/login/password_hint.tt2" %]
46             <br>
47              [% IF reset_password == 'true' %]
48             <a href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot Your Password?') %]</a>
49             [% END %]
50         </div>
51         <div style="clear: both; padding-top: 15px;" class="col-12">
52         [%
53             redirect = CGI.param('redirect_to');
54             # Don't use referer unless we got here from elsewhere within the TPAC
55             IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root);
56                 redirect = ctx.referer;
57             END;
58             # If no redirect is offered or it's leading us back to the
59             # login form, redirect the user to My Account
60             IF !redirect OR redirect.match(ctx.path_info _ '$');
61                 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
62             END;
63                 redirect = redirect  | replace('^http:', 'https:');
64             %]
65         </div>
66        
67         <input id="client_tz_id" name="client_tz" type="hidden" />
68         </div>
69         </div>
70                 [%# INCLUDE "opac/parts/login/help.tt2" %]
71
72       </div>
73       <div class="modal-footer">
74       <div class="mr-auto">
75         <input type='hidden' name='redirect_to' value='[% redirect | html %]'/>
76         <input type="checkbox" name="persist" id="login_persist" class="mr-1"/><label for="login_persist"> [% l('Stay logged in?') %]</label>
77       </div>
78        
79         <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
80         <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="btn btn-confirm" />
81       </div>
82       </form>
83     </div>
84   </div>
85 </div>