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