[pve-devel] [PATCH manager 2/2] prevent double ticket api call

Dominik Csapak d.csapak at proxmox.com
Wed Dec 20 14:01:20 CET 2017


commit:
9d4aa0edbbbd42429d7f46eae72766eb6d87c78e

added the defaultButton property to the loginwindow, but we missed that
pressing enter in the passwordfield/userfield led to a double ticket
api call.

while it did not any harm, remove it, so that we only have a single
ticket api call

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/window/LoginWindow.js | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
index 29fd187f..8c08517f 100644
--- a/www/manager6/window/LoginWindow.js
+++ b/www/manager6/window/LoginWindow.js
@@ -53,21 +53,12 @@ Ext.define('PVE.window.LoginWindow', {
 		specialkey: function(f, e) {
 		    if (e.getKey() === e.ENTER) {
 			var pf = this.lookupReference('passwordField');
-			if (pf.getValue()) {
-			    this.onLogon();
-			} else {
+			if (!pf.getValue()) {
 			    pf.focus(false);
 			}
 		    }
 		}
 	    },
-	    'field[name=password]': {
-		specialkey: function(f, e) {
-		    if (e.getKey() === e.ENTER) {
-			this.onLogon();
-		    }
-		}
-	    },
 	    'field[name=realm]': {
 		change: function(f, value) {
 		    var otp_field = this.lookupReference('otpField');
-- 
2.11.0





More information about the pve-devel mailing list