Bug 7143: Update about page for new dev - Bonnie Crawford
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / auth.tt
index 82743dd..ef57d4a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 [% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
@@ -5,7 +6,8 @@
     [% 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( unfiltered => 1 ) %]
-        <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> -->