1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 17:28:51 +02:00

Autofocus the "App Code" input on the TOTP prompt during MFA gates after login

Summary: See downstream <https://phabricator.wikimedia.org/T229757>. The "autofocus" attribute mostly just works, so add it to this input.

Test Plan: As a user with TOTP enabled, established a new session. Saw browser automatically focus the "App Code" input on the TOTP prompt screen.

Differential Revision: https://secure.phabricator.com/D20703
This commit is contained in:
epriestley 2019-08-08 10:26:46 -07:00
parent 46d9065bf1
commit 9bd74dfa6c

View file

@ -194,6 +194,7 @@ final class PhabricatorTOTPAuthFactor extends PhabricatorAuthFactor {
$control = id(new PHUIFormNumberControl()) $control = id(new PHUIFormNumberControl())
->setName($name) ->setName($name)
->setDisableAutocomplete(true) ->setDisableAutocomplete(true)
->setAutofocus(true)
->setValue($value) ->setValue($value)
->setError($error); ->setError($error);
} }