equal
deleted
inserted
replaced
210 .remove(); |
210 .remove(); |
211 } |
211 } |
212 |
212 |
213 addOnloadHook(function() |
213 addOnloadHook(function() |
214 { |
214 { |
215 attachHook('login_build_form', 'yk_login_dlg_hook(table);'); |
215 attachHook('login_build_form', 'yk_login_dlg_hook(table, data);'); |
216 attachHook('login_build_userinfo', 'if ( window.yubikey_otp_current ) userinfo.yubikey_otp = window.yubikey_otp_current;'); |
216 attachHook('login_build_userinfo', 'if ( window.yubikey_otp_current ) userinfo.yubikey_otp = window.yubikey_otp_current;'); |
217 if ( title == namespace_list.Special + 'Preferences/Yubikey' ) |
217 if ( title == namespace_list.Special + 'Preferences/Yubikey' ) |
218 { |
218 { |
219 load_component(['jquery', 'jquery-ui', 'expander']); |
219 load_component(['jquery', 'jquery-ui', 'expander']); |
220 } |
220 } |
221 }); |
221 }); |
222 |
222 |
223 function yk_login_dlg_hook(table) |
223 function yk_login_dlg_hook(table, data) |
224 { |
224 { |
225 window.yubikey_otp_current = false; |
225 window.yubikey_otp_current = false; |
226 var tr = document.createElement('tr'); |
226 var tr = document.createElement('tr'); |
227 var td = document.createElement('td'); |
227 var td = document.createElement('td'); |
228 $(td) |
228 $(td) |
234 $('a', td).blur(function(e) |
234 $('a', td).blur(function(e) |
235 { |
235 { |
236 $('#messageBoxButtons input:button:first').focus(); |
236 $('#messageBoxButtons input:button:first').focus(); |
237 $('#ajax_login_field_captcha').focus(); |
237 $('#ajax_login_field_captcha').focus(); |
238 }); |
238 }); |
239 if ( window.yk_reg_require_otp || window.yk_user_enabled ) |
239 if ( ( window.yk_reg_require_otp || window.yk_user_enabled ) && !data.locked_out.locked_out ) |
240 { |
240 { |
241 setTimeout(function() |
241 setTimeout(function() |
242 { |
242 { |
243 yk_mb_init(yk_login_validate_reqs); |
243 yk_mb_init(yk_login_validate_reqs); |
244 }, 750); |
244 }, 750); |