plugins/yubikey/yubikey.js
changeset 25 2e7ccbdfdc0a
parent 18 dd8c53454f31
child 26 0dac837643a4
--- a/plugins/yubikey/yubikey.js	Sat May 16 18:24:45 2009 -0400
+++ b/plugins/yubikey/yubikey.js	Fri Jul 17 17:15:10 2009 -0400
@@ -212,7 +212,7 @@
 
 addOnloadHook(function()
   {
-    attachHook('login_build_form', 'yk_login_dlg_hook(table);');
+    attachHook('login_build_form', 'yk_login_dlg_hook(table, data);');
     attachHook('login_build_userinfo', 'if ( window.yubikey_otp_current ) userinfo.yubikey_otp = window.yubikey_otp_current;');
     if ( title == namespace_list.Special + 'Preferences/Yubikey' )
     {
@@ -220,7 +220,7 @@
     }
   });
 
-function yk_login_dlg_hook(table)
+function yk_login_dlg_hook(table, data)
 {
   window.yubikey_otp_current = false;
   var tr = document.createElement('tr');
@@ -236,7 +236,7 @@
       $('#messageBoxButtons input:button:first').focus();
       $('#ajax_login_field_captcha').focus();
     });
-  if ( window.yk_reg_require_otp || window.yk_user_enabled )
+  if ( ( window.yk_reg_require_otp || window.yk_user_enabled ) && !data.locked_out.locked_out )
   {
     setTimeout(function()
       {