From 249d1f3dafd035429ba1870520108c6d3ba66e90 Mon Sep 17 00:00:00 2001 From: MacFan4000 Date: Sat, 21 Aug 2021 20:25:48 +0000 Subject: [PATCH] =?UTF-8?q?set=20autocomplete=3D=E2=80=98one-time-code?= =?UTF-8?q?=E2=80=99=20on=20forms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows iOS/iPadOS/macOS to suggest filling codes from sms/the built in totp authenticator (in upcoming versions). Bug: T289086 Change-Id: I555b05fad4806a37a95afcbc63e143efc424f9d3 --- src/HTMLForm/TOTPDisableForm.php | 2 +- src/HTMLForm/TOTPEnableForm.php | 2 +- src/Hook/HookHandler.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HTMLForm/TOTPDisableForm.php b/src/HTMLForm/TOTPDisableForm.php index 987d4420..341fb27b 100644 --- a/src/HTMLForm/TOTPDisableForm.php +++ b/src/HTMLForm/TOTPDisableForm.php @@ -27,7 +27,7 @@ class TOTPDisableForm extends OATHAuthOOUIHTMLForm implements IManageForm { 'required' => true, 'autofocus' => true, 'dir' => 'ltr', - 'autocomplete' => false, + 'autocomplete' => 'one-time-code', 'spellcheck' => false, ] ]; diff --git a/src/HTMLForm/TOTPEnableForm.php b/src/HTMLForm/TOTPEnableForm.php index 020fe91f..c29100d1 100644 --- a/src/HTMLForm/TOTPEnableForm.php +++ b/src/HTMLForm/TOTPEnableForm.php @@ -96,7 +96,7 @@ class TOTPEnableForm extends OATHAuthOOUIHTMLForm implements IManageForm { 'name' => 'token', 'section' => 'step4', 'dir' => 'ltr', - 'autocomplete' => false, + 'autocomplete' => 'one-time-code', 'spellcheck' => false, ] ]; diff --git a/src/Hook/HookHandler.php b/src/Hook/HookHandler.php index 79789350..bfbcd8ff 100644 --- a/src/Hook/HookHandler.php +++ b/src/Hook/HookHandler.php @@ -68,7 +68,7 @@ class HookHandler implements 'dir' => 'ltr', 'autofocus' => true, 'persistent' => false, - 'autocomplete' => false, + 'autocomplete' => 'one-time-code', 'spellcheck' => false, ]; return true;