]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/parts/login/form.tt2
LP1895398 Bootstrap OPAC Follow Up #1
[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') %]
27             <a href="#" title="[% INCLUDE "opac/parts/login/username_hint.tt2" %]" data-html="true" data-toggle="tooltip">
28             <i class="fas fa-question-circle"></i></a></label> <br>
29             <div class="input_bg mb-2">
30                 <input class="form-control" type='text' id="username_field" name="username"/>
31             </div>
32                <a href='[% mkurl(ctx.opac_root _ '/register', {}, 1) %]'>[% l('Request A Card') %]</a>
33             <br>
34
35         </div>
36         <div class='col-md-6'>
37             <label for="password_field" class="lbl1" >[% l('PIN') %]
38             <a href="#" title="[% INCLUDE "opac/parts/login/password_hint.tt2" %]" data-html="true" data-toggle="tooltip">
39                         <i class="fas fa-question-circle"></i>
40                     </a></label><br>
41
42             <div class="input_bg mb-2">
43                 <input class="form-control" id="password_field" name="password" type="password"/>
44             </div>
45            [% IF reset_password == 'true' %]
46             <a href='[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]'>[% l('Forgot Your Password?') %]  </a>
47             [% END %]
48             <br>
49
50         </div>
51
52          <div class="col-12 pt-4 text-center">
53             <div class="form-check my-2">
54                 <input class="form-check-input" type="checkbox" value="" id="rememberMe">
55                 <label class="form-check-label" for="rememberMe">
56                     [% l('Stay logged in?') %]
57                 </label>
58             </div>
59             <button type="submit" class="btn btn-confirm my-2"><i class="fas fa-sign-in-alt" aria-hidden="true"></i> [% l('Log in') %]</button>
60         </div>
61         <div style="clear: both; padding-top: 15px;" class="col-12 text-center">
62         [%
63             redirect = CGI.param('redirect_to');
64             # Don't use referer unless we got here from elsewhere within the TPAC
65             IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root);
66                 redirect = ctx.referer;
67             END;
68             # If no redirect is offered or it's leading us back to the
69             # login form, redirect the user to My Account
70             IF !redirect OR redirect.match(ctx.path_info _ '$');
71                 redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
72             END;
73                 redirect = redirect  | replace('^http:', 'https:');
74             %]
75             <input type='hidden' name='redirect_to' value='[% redirect | html %]'/>
76
77         </div>
78         <input id="client_tz_id" name="client_tz" type="hidden" />
79         </div>
80     </form>
81
82 </div>
83