]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac-new/parts/login/form.tt2
LP#1778972: (follow-up) remove a NFPL-specific template
[Evergreen.git] / Open-ILS / src / templates / opac-new / parts / login / form.tt2
1
2
3 <div id='login-form-box' class='container'>
4     <h2 class="h2 text-center">[% l('Log in to Your Account') %]</h1>
5     <form method='post'>
6    <div class="row text-center">[% INCLUDE "opac/parts/login/help.tt2" %]</div>
7     [% IF ctx.login_failed_event %]
8 <div id='login-failed-message'>
9 [%
10     IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
11         l("The barcode used to login is marked as inactive.  <br>Please contact your local library.");
12     ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
13         l("This account has been deactivated.  <br>Please contact your local library.");
14     ELSE;
15         l("Login failed. <br> The username or password provided was not valid. <br>" _
16            "Passwords are case-sensitive.  <br>Check your Caps-Lock key and try again or contact your local library.");
17     END;
18 %]
19 </div>
20 [% END %]
21     
22  
23     <div class="mx-auto row w-75 my-5">
24         <div class='col-md-6 text-center'>
25             <label for='username_field' class="lbl1" >[% l('Library Card Number') %]</label>
26             <div class="input_bg">
27                 <input type='text' id="username_field" name="username" autofocus />
28             </div>
29             [% INCLUDE "opac/parts/login/username_hint.tt2" %]
30         </div>
31         <div class='col-md-6 text-center'>
32             <label for="password_field" class="lbl1" >[% l('PIN') %]</label>
33             <div class="input_bg">
34                 <input id="password_field" name="password" type="password" />
35             </div>
36             [% INCLUDE "opac/parts/login/password_hint.tt2" %]
37             [% IF reset_password == 'true' %]
38             <a style="font-size: 80%" href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot your password?') %]</a>
39             [% END %]
40         </div>
41          <div class="col-12 pt-4 text-center">
42             <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label><br>
43             <input type="submit" value="[% l('Log in') %]" alt="[% l('Log in') %]" class="btn btn-confirm" />       
44         </div>
45         <div style="clear: both; padding-top: 15px;" class="col-12 text-center">
46         [%
47             redirect = CGI.param('redirect_to');
48             # Don't use referer unless we got here from elsewhere within the TPAC
49             IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root);
50                 redirect = ctx.referer;
51             END;
52             # If no redirect is offered or it's leading us back to the
53             # login form, redirect the user to My Account
54             IF !redirect OR redirect.match(ctx.path_info _ '$');
55                 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
56             END;
57                 redirect = redirect  | replace('^http:', 'https:');
58             %]
59             <input type='hidden' name='redirect_to' value='[% redirect | html %]'/>
60           
61         </div>
62         <input id="client_tz_id" name="client_tz" type="hidden" />
63         </div>
64     </form>
65     
66 </div>
67