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