Bug 20045: Switch single-column templates to Bootstrap grid: Various
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / auth.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; 
6     [% IF ( nopermission ) %]Access denied[% END %]
7     [% IF ( timed_out ) %]Session timed out[% END %]
8     [% IF ( different_ip ) %]IP address change[% END %]
9     [% IF too_many_login_attempts %]This account has been locked.
10     [% ELSIF invalid_username_or_password %]Invalid username or password[% END %]
11     [% IF ( loginprompt ) %]Log in to Koha[% END %]
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15 <body id="main_auth" class="main_main-auth">
16
17 <div class="main container-fluid">
18
19 <div id="login">
20 <h1><a href="http://koha-community.org">Koha</a></h1>
21 [% IF ( nopermission ) %]
22 <div id="login_error">
23     <strong>Error:</strong>
24     You do not have permission to access this page.
25 </div>
26 <p><strong>Log in as a different user</strong></p></h2>
27 [% END %]
28
29 [% IF ( timed_out ) %]
30 <div id="login_error"><strong>Error: </strong>Session timed out.<br /> Please log in again</div>
31 [% END %]
32
33 [% IF ( different_ip ) %]
34 <div id="login_error"><strong>Error: </strong>IP address has changed. Please log in again </div>
35 [% END %]
36
37 [% IF ( wrongip ) %]
38 <div id="login_error"><strong>Error: </strong>Autolocation is switched on and you are logging in with an IP address that doesn't match your library. </div>
39 [% END %]
40
41 [% IF too_many_login_attempts %]
42     <div id="login_error"><strong>Error: </strong>This account has been locked!</div>
43     [% IF Koha.Preference('OpacResetPassword') && Koha.Preference('OpacBaseURL') %]
44         <a href="[% Koha.Preference('OpacBaseURL') %]/cgi-bin/koha/opac-password-recovery.pl">You must reset your password</a>.
45     [% END %]
46 [% ELSIF invalid_username_or_password %]
47 <div id="login_error"><strong>Error: </strong>Invalid username or password</div>
48 [% END %]
49
50 <!-- login prompt time-->
51 <form action="[% script_name %]" method="post" name="loginform" id="loginform">
52     <input type="hidden" name="koha_login_context" value="intranet" />
53 [% FOREACH INPUT IN INPUTS %]
54     <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
55 [% END %]
56 <p><label for="userid">Username:</label>
57 <input type="text" name="userid" id="userid" class="input focus" value="[% userid %]" size="20" tabindex="1" />
58 </p>
59 <p><label for="password">Password:</label>
60 <input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" />
61 </p>
62
63 [% UNLESS IndependentBranches %]
64     <p>
65         <label for="branch">Library:</label>
66         <select name="branch" id="branch" class="input" tabindex="3">
67             <option value="">My library</option>
68             [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
69                 <option value="[% l.branchcode %]">[% l.branchname %]</option>
70             [% END %]
71         </select>
72     </p>
73 [% END %]
74
75 <!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->
76
77 <p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p>
78 </form>
79 [% IF ( casAuthentication ) %]
80 <h4>Cas login</h4>
81
82 [% IF ( invalidCasLogin ) %]
83 <!-- This is what is displayed if cas login has failed -->
84 <p>Sorry, the CAS login failed.</p>
85 [% END %]
86
87 [% IF ( casServerUrl ) %]
88     <p><a href="[% casServerUrl %]">If you have a CAS account, please click here to login</a>.<p>
89 [% END %]
90
91 [% IF ( casServersLoop ) %]
92     <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
93 <ul>
94     [% FOREACH casServer IN casServersLoop %]
95         <li><a href="[% casServer.value %]">[% casServer.name %]</a></li>
96     [% END %]
97 [% END %]
98 [% END %]
99
100 [% IF ( nopermission ) %]
101     <p><a href="javascript:window.history.back()">[Previous page]</a>
102     <a href="/">[Main page]</a></p>
103 [% END %]
104
105
106 <!--<ul> -->
107 <!--    <li><a href="/cgi-bin/koha/lostpassword.pl" title="Password lost and found">Lost your password?</a></li> -->
108 <!-- </ul> -->
109
110 </div>
111
112 [% MACRO jsinclude BLOCK %]
113     <script type="text/javascript">
114         $(document).ready( function() {
115             if ( document.location.hash ) {
116                 $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' );
117             }
118         });
119     </script>
120 [% END %]
121 <!-- the main div is closed in intranet-bottom.inc -->
122 [% INCLUDE 'intranet-bottom.inc' %]