refactor(minor): login-content template
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
parent
4983206774
commit
117a729c8d
1 changed files with 12 additions and 9 deletions
|
|
@ -292,15 +292,18 @@ var verify_token = function (event) {
|
|||
|
||||
var request_otp = function (r) {
|
||||
$('.login-content').empty();
|
||||
$('.login-content:visible').append($('<div>').attr({ 'id': 'twofactor_div' }).html(
|
||||
'<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" id="verify_token">{{ _("Verify") }}</button>\
|
||||
</form>'));
|
||||
$('.login-content:visible').append(
|
||||
`<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