Bug 7143: Update about page for new dev - Bonnie Crawford
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / auth.tt
index a5c419a..ef57d4a 100644 (file)
@@ -1,9 +1,13 @@
+[% USE Koha %]
+[% USE Branches %]
+[% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; 
     [% IF ( nopermission ) %]Access denied[% END %]
     [% IF ( timed_out ) %]Session timed out[% END %]
     [% IF ( different_ip ) %]IP address change[% END %]
-    [% IF ( invalid_username_or_password ) %]Invalid username or password[% END %]
+    [% IF too_many_login_attempts %]This account has been locked.
+    [% ELSIF invalid_username_or_password %]Invalid username or password[% END %]
     [% IF ( loginprompt ) %]Log in to Koha[% END %]
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% 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 ) %]
+[% IF too_many_login_attempts %]
+    <div id="login_error"><strong>Error: </strong>This account has been locked!</div>
+    [% IF Koha.Preference('OpacResetPassword') && Koha.Preference('OpacBaseURL') %]
+        <a href="[% Koha.Preference('OpacBaseURL') %]/cgi-bin/koha/opac-password-recovery.pl">You must reset your password</a>.
+    [% END %]
+[% ELSIF invalid_username_or_password %]
 <div id="login_error"><strong>Error: </strong>Invalid username or password</div>
 [% END %]
 
 <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 l IN Branches.all() %]
-        <option value="[% l.branchcode %]">[% l.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> -->
 
 </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' %]