|
|
|
@ -78,17 +78,15 @@
|
|
|
|
|
$(ele).attr('name', '').attr('required', false) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const currentMFAInput = $('#mfa-' + name + ' .input-style') |
|
|
|
|
currentMFAInput.attr('name', 'code').attr('required', true) |
|
|
|
|
const currentMFAInputRef = $('#mfa-' + name + ' .input-style') |
|
|
|
|
currentMFAInputRef.attr('name', 'code').attr('required', true) |
|
|
|
|
|
|
|
|
|
// 登录页时,不应该默认focus |
|
|
|
|
if ($('input[name="username"]').length == 0) { |
|
|
|
|
currentMFAInput.focus() |
|
|
|
|
const usernameRef = $('input[name="username"]') |
|
|
|
|
if (!usernameRef || usernameRef.length === 0) { |
|
|
|
|
currentMFAInputRef.focus() |
|
|
|
|
} |
|
|
|
|
$('#mfa-' + name + ' .input-style') |
|
|
|
|
.attr('name', 'code') |
|
|
|
|
.attr('required', true) |
|
|
|
|
.focus() |
|
|
|
|
currentMFAInputRef.attr('name', 'code').attr('required', true) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function sendChallengeCode(currentBtn) { |
|
|
|
|