Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

165 lines
6.0 KiB

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