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