+[% USE Branches %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha ›
[% IF ( nopermission ) %]Access denied[% END %]
[% END %]
[% IF ( wrongip ) %]
-<div id="login_error"><strong>Error: </strong>IndependentBranches and Autolocation are switched on and you are logging in with an IP address that doesn't match your library. </div>
+<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>
[% END %]
[% IF ( invalid_username_or_password ) %]
[% END %]
<!-- login prompt time-->
-<form action="/cgi-bin/koha/mainpage.pl" method="post" name="loginform" id="loginform">
+<form action="[% script_name %]" method="post" name="loginform" id="loginform">
<input type="hidden" name="koha_login_context" value="intranet" />
[% FOREACH INPUT IN INPUTS %]
- <input type="hidden" name="[% INPUT.name %]" value="[% INPUT.value %]" />
+ <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" />
[% END %]
<p><label for="userid">Username:</label>
<input type="text" name="userid" id="userid" class="input focus" value="[% userid %]" size="20" tabindex="1" />
<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" />
</p>
-[% IF ( AutoLocation ) %][% ELSE %]
-[% IF ( IndependentBranches ) %][% ELSE %]
-<p><label for="branch">Library:</label>
- <select name="branch" id="branch" class="input" tabindex="3">
- <option value="">My library</option>
- [% FOREACH branchloo IN branchloop %]
- <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
- [% END %]
- </select>
- </p>[% END %]
- [% END %]
+[% UNLESS IndependentBranches %]
+ <p>
+ <label for="branch">Library:</label>
+ <select name="branch" id="branch" class="input" tabindex="3">
+ <option value="">My library</option>
+ [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
+ <option value="[% l.branchcode %]">[% l.branchname %]</option>
+ [% END %]
+ </select>
+ </p>
+[% END %]
<!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->
<p>Sorry, the CAS login failed.</p>
[% END %]
-<p>If you have a CAS account,
[% IF ( casServerUrl ) %]
- please <a href="[% casServerUrl %]">click here to login</a>.<p>
+ <p><a href="[% casServerUrl %]">If you have a CAS account, please click here to login</a>.<p>
[% END %]
[% IF ( casServersLoop ) %]
-please choose against which one you would like to authenticate: </p>
+ <p>If you have a CAS account, please choose against which one you would like to authenticate:</p>
<ul>
[% FOREACH casServer IN casServersLoop %]
<li><a href="[% casServer.value %]">[% casServer.name %]</a></li>
</div>
</div>
-<script>
-$(document).ready( function() {
- if ( document.location.hash ) {
- $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' );
- }
-} );
-</script>
-
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript">
+ $(document).ready( function() {
+ if ( document.location.hash ) {
+ $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' );
+ }
+ });
+ </script>
+[% END %]
+<!-- the main div is closed in intranet-bottom.inc -->
[% INCLUDE 'intranet-bottom.inc' %]