public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] ui: autofocus after rendering text fields for 2fa
@ 2021-02-04 14:39 Oguz Bektas
  2021-02-04 15:11 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Oguz Bektas @ 2021-02-04 14:39 UTC (permalink / raw)
  To: pbs-devel

also fix a small typo

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 www/LoginView.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/www/LoginView.js b/www/LoginView.js
index 15373533..5e8b2f93 100644
--- a/www/LoginView.js
+++ b/www/LoginView.js
@@ -525,6 +525,11 @@ Ext.define('PBS.login.TfaWindow', {
 			allowBlank: false,
 			regex: /^[0-9]{6}$/,
 			regexText: 'TOTP codes consist of six decimal digits',
+			listeners: {
+			    afterrender: function(field) {
+				field.focus();
+			    },
+			},
 		    },
 		],
 	    },
@@ -551,7 +556,12 @@ Ext.define('PBS.login.TfaWindow', {
 			reference: 'recoveryKey',
 			allowBlank: false,
 			regex: /^[0-9a-f]{4}(-[0-9a-f]{4}){3}$/,
-			regexText: 'Does not looks like a valid recovery key',
+			regexText: 'Does not look like a valid recovery key',
+			listeners: {
+			    afterrender: function(field) {
+				field.focus();
+			    },
+			},
 		    },
 		    {
 			xtype: 'box',
-- 
2.20.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-04 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 14:39 [pbs-devel] [PATCH proxmox-backup] ui: autofocus after rendering text fields for 2fa Oguz Bektas
2021-02-04 15:11 ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal