diff --git a/files/assets/js/core.js b/files/assets/js/core.js index c01add22f..c0e1e2094 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 53e4370aa..000000000 --- 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 8c55b0134..8698032a7 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 c175feae1..f459ac810 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 a8f1bdc27..df40f7d8e 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 75f0f3290..9cb75f1b9 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 8e1debfd5..a2445a22b 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 9c3a343fa..b0c8d12dd 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 %} - +