Merge pull request #13606 from conncampbell/12928-OTPLoginFix
fix: OTP login verification fails
This commit is contained in:
commit
cceb44a7db
1 changed files with 10 additions and 2 deletions
|
|
@ -291,10 +291,18 @@ var verify_token = function (event) {
|
|||
}
|
||||
|
||||
var request_otp = function (r) {
|
||||
const otp_form_template = '{{ _("Verification") }}<input type="text" id="login_token" autocomplete="off" class="form-control" placeholder={{ _("Verification Code") }} required="" autofocus="">{{ _("Verify") }}';
|
||||
$('.login-content').empty();
|
||||
$('.login-content:visible').append(
|
||||
$('<div>').attr({ 'id': 'twofactor_div' }).html(otp_form_template)
|
||||
`<div id="twofactor_div">
|
||||
<form class="form-verify">
|
||||
<div class="page-card-head">
|
||||
<span class="indicator blue" data-text="Verification">{{ _("Verification") }}</span>
|
||||
</div>
|
||||
<div id="otp_div"></div>
|
||||
<input type="text" id="login_token" autocomplete="off" class="form-control" placeholder={{ _("Verification Code") }} required="" autofocus="">
|
||||
<button class="btn btn-sm btn-primary btn-block mt-3" id="verify_token">{{ _("Verify") }}</button>
|
||||
</form>
|
||||
</div>`
|
||||
);
|
||||
// add event handler for submit button
|
||||
verify_token();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue