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