From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6CB6020EC89 for ; Tue, 23 Apr 2024 09:30:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7CC621C3D1; Tue, 23 Apr 2024 09:30:33 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Tue, 23 Apr 2024 09:30:24 +0200 Message-Id: <20240423073024.403830-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager] ui: fix reset behavior of backup job editor X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" when we `bind` we also have to set the initial value correctly, otherwise the form dirty tracking is off (the initial bind set does not reset the `originalValue`) also the bandwidth selector auto transformed the value `null` to `0` when there was no initial transformation. Since this is not a valid value anyway, skip that. Signed-off-by: Dominik Csapak --- www/manager6/dc/Backup.js | 1 + www/manager6/form/BandwidthSelector.js | 2 +- www/manager6/panel/BackupAdvancedOptions.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index cd4ece33..336b23f5 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -350,6 +350,7 @@ Ext.define('PVE.dc.BackupEdit', { ], fieldLabel: gettext('Notification mode'), name: 'notification-mode', + value: '__default__', cbind: { deleteEmpty: '{!isCreate}', }, diff --git a/www/manager6/form/BandwidthSelector.js b/www/manager6/form/BandwidthSelector.js index 01ec8f9c..6f20af3a 100644 --- a/www/manager6/form/BandwidthSelector.js +++ b/www/manager6/form/BandwidthSelector.js @@ -62,7 +62,7 @@ Ext.define('PVE.form.SizeField', { flex: 1, enableKeyEvents: true, setValue: function(v) { - if (!this._transformed) { + if (!this._transformed && v !== null) { let fieldContainer = this.up('fieldcontainer'); let vm = fieldContainer.getViewModel(); let unit = vm.get('unit'); diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js index c79c31cb..f1810637 100644 --- a/www/manager6/panel/BackupAdvancedOptions.js +++ b/www/manager6/panel/BackupAdvancedOptions.js @@ -185,6 +185,7 @@ Ext.define('PVE.panel.BackupAdvancedOptions', { clusterView: true, storageContent: 'images', allowBlank: false, + disabled: true, bind: { disabled: '{!fleecingEnabled.checked}', }, -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel