]> git.proxmox.com Git - pve-manager.git/commitdiff
prevent double ticket api call
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 20 Dec 2017 13:01:20 +0000 (14:01 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 21 Dec 2017 08:46:43 +0000 (09:46 +0100)
commit:
551456ff6ef7d3591178978fbd3dc760e35d7874

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@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: 551456ff6ef7 ("add defaultButton to loginWindow")
www/manager6/window/LoginWindow.js

index 29fd187f9a72a62d3594e88a94e0931e39208193..8c08517fdfa432aa98f53ca2729b63721beac330 100644 (file)
@@ -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');