perf: login mfa style

pull/9040/head
feng 2022-11-10 17:26:47 +08:00 committed by Jiangjie.Bai
parent ac6ffb24ee
commit f3c90c6bbd
1 changed files with 10 additions and 10 deletions

View File

@ -16,17 +16,17 @@
{% for backend in mfa_backends %} {% for backend in mfa_backends %}
<div id="mfa-{{ backend.name }}" class="mfa-field <div id="mfa-{{ backend.name }}" class="mfa-field
{% if backend.challenge_required %}challenge-required{% endif %}" {% if backend.challenge_required %}challenge-required{% endif %}"
style="display: none" style="display: none"
> >
<input type="text" class="form-control input-style" <input type="text" class="form-control input-style"
placeholder="{{ backend.placeholder }}" placeholder="{{ backend.placeholder }}"
> >
{% if backend.challenge_required %} {% if backend.challenge_required %}
<button class="btn btn-primary full-width btn-challenge" <button class="btn btn-primary full-width btn-challenge"
type='button' onclick="sendChallengeCode(this)" type='button' onclick="sendChallengeCode(this)"
> >
{% trans 'Send verification code' %} {% trans 'Send verification code' %}
</button> </button>
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}
@ -39,12 +39,12 @@
} }
.challenge-required .input-style { .challenge-required .input-style {
width: calc(100% - 114px); width: calc(100% - 160px);
display: inline-block; display: inline-block;
} }
.btn-challenge { .btn-challenge {
width: 110px !important; width: 156px !important;
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
@ -74,7 +74,7 @@
localStorage.setItem(preferMFAKey, name) localStorage.setItem(preferMFAKey, name)
} }
$('.input-style').each(function (i, ele){ $('.input-style').each(function (i, ele) {
$(ele).attr('name', 'code-test') $(ele).attr('name', 'code-test')
}) })
@ -112,7 +112,7 @@
clearInterval(interval) clearInterval(interval)
} }
}, 1000) }, 1000)
setTimeout(function (){ setTimeout(function () {
toastr.success("{% trans 'The verification code has been sent' %}"); toastr.success("{% trans 'The verification code has been sent' %}");
}) })
} }