diff --git a/files/assets/js/core.js b/files/assets/js/core.js index c01add22f4..c0e1e20947 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -791,3 +791,7 @@ function delReport(t, url) { } ); } + +for (const el of document.getElementsByClassName('autofocus')) { + el.focus() +} diff --git a/files/assets/js/login_2fa.js b/files/assets/js/login_2fa.js deleted file mode 100644 index 53e4370aad..0000000000 --- a/files/assets/js/login_2fa.js +++ /dev/null @@ -1 +0,0 @@ -document.getElementById('2fa_token').focus(); diff --git a/files/templates/login/forgot_password.html b/files/templates/login/forgot_password.html index 8c55b0134e..8698032a73 100644 --- a/files/templates/login/forgot_password.html +++ b/files/templates/login/forgot_password.html @@ -5,7 +5,7 @@ {% block content %}
- + diff --git a/files/templates/login/login.html b/files/templates/login/login.html index c175feae10..f459ac8106 100644 --- a/files/templates/login/login.html +++ b/files/templates/login/login.html @@ -14,7 +14,7 @@ {%- endset -%} {% if failed %}{{macros.alert(error_text, true)}}{% endif %} - + diff --git a/files/templates/login/login_2fa.html b/files/templates/login/login_2fa.html index a8f1bdc27c..df40f7d8ea 100644 --- a/files/templates/login/login_2fa.html +++ b/files/templates/login/login_2fa.html @@ -15,10 +15,9 @@ - + Lost your two-factor authentication device?
- {% endblock %} diff --git a/files/templates/login/lost_2fa.html b/files/templates/login/lost_2fa.html index 75f0f32907..9cb75f1b95 100644 --- a/files/templates/login/lost_2fa.html +++ b/files/templates/login/lost_2fa.html @@ -5,7 +5,7 @@ {% block content %}
- + diff --git a/files/templates/login/reset_password.html b/files/templates/login/reset_password.html index 8e1debfd50..a2445a22b1 100644 --- a/files/templates/login/reset_password.html +++ b/files/templates/login/reset_password.html @@ -7,7 +7,7 @@ - + diff --git a/files/templates/login/sign_up.html b/files/templates/login/sign_up.html index 9c3a343fa7..b0c8d12ddb 100644 --- a/files/templates/login/sign_up.html +++ b/files/templates/login/sign_up.html @@ -67,7 +67,7 @@ {% if redirect %}{% endif %} {% if ref_user %}{% endif %} - +