From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 4A05920EC7F for ; Tue, 23 Apr 2024 14:15:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C6AA231376; Tue, 23 Apr 2024 14:15:04 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Tue, 23 Apr 2024 14:15:00 +0200 Message-Id: <20240423121500.2460620-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240423121500.2460620-1-d.csapak@proxmox.com> References: <20240423121500.2460620-1-d.csapak@proxmox.com> 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 2/2] ui: backup job editor: fix disable behavior for fleecing storage 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" commit 569b0388 (ui: fix reset behavior of backup job editor) disabled the fleecint storage field by default (as that is the default state) to fix the reset behavior. This broke editing the job when fleecing was enabled and the user did not navigate to the advanced tab yet. It seems that the 'bind' here only gets triggered once the panel is rendered, but we actually need it before that. To work around the issue for now, manually enable/disable the field when toggling the fleecing checkbox. (Though this warrants a bit of deeper investigation into this bind behavior) Signed-off-by: Dominik Csapak --- www/manager6/panel/BackupAdvancedOptions.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js index f1810637..650946fe 100644 --- a/www/manager6/panel/BackupAdvancedOptions.js +++ b/www/manager6/panel/BackupAdvancedOptions.js @@ -18,6 +18,17 @@ Ext.define('PVE.panel.BackupAdvancedOptions', { controller: { xclass: 'Ext.app.ViewController', + + toggleFleecing: function(cb, value) { + let me = this; + me.lookup('fleecingStorage').setDisabled(!value); + }, + + control: { + 'proxmoxcheckbox[reference=fleecingEnabled]': { + change: 'toggleFleecing', + }, + } }, onGetValues: function(formValues) { @@ -181,14 +192,11 @@ Ext.define('PVE.panel.BackupAdvancedOptions', { xtype: 'pveStorageSelector', name: 'fleecing-storage', fieldLabel: gettext('Fleecing Storage'), - reference: 'storageSelector', + reference: 'fleecingStorage', clusterView: true, storageContent: 'images', allowBlank: false, disabled: true, - bind: { - disabled: '{!fleecingEnabled.checked}', - }, }, endFlex: 2, endColumn: { -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel