merge: with dev (#7195)

* fix: 修复登录mfa时,选择了禁用的

* fix: mfa focus

Co-authored-by: ibuler <ibuler@qq.com>
pull/7196/head
fit2bot 2021-11-15 16:51:05 +08:00 committed by GitHub
parent 9bfbdea508
commit d6395b64fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -77,6 +77,14 @@
$('.input-style').each(function (i, ele){
$(ele).attr('name', '').attr('required', false)
})
const currentMFAInput = $('#mfa-' + name + ' .input-style')
currentMFAInput.attr('name', 'code').attr('required', true)
// 登录页时不应该默认focus
if ($('input[name="username"]').length == 0) {
currentMFAInput.focus()
}
$('#mfa-' + name + ' .input-style')
.attr('name', 'code')
.attr('required', true)