From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 160F81FF0B0 for ; Tue, 27 Oct 2026 13:48:57 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8DC4F20BCB; Tue, 27 Oct 2026 13:48:56 +0100 (CET) Message-ID: Date: Tue, 27 Oct 2026 13:48:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup v4 4/9] ui: prune job: align prune edit window to other "Enable" checkboxes To: Jonas Theisen , pbs-devel@lists.proxmox.com References: <20261022164343.353831-1-j.theisen@proxmox.com> <20261022164343.353831-5-j.theisen@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20261022164343.353831-5-j.theisen@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793105329680 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.496 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RTUYUDYHXCOMJSKYARLWK2PZRJWB65H4 X-Message-ID-Hash: RTUYUDYHXCOMJSKYARLWK2PZRJWB65H4 X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 10/22/26 6:44 PM, Jonas Theisen wrote: > Align the already existing "Enabled" checkbox in the prune job edit > window to the "Enable" checkboxes of the other job types: rename it > to "Enable", as is more common throughout the UI, add the same > tooltip, and disable the schedule field while the checkbox is > unchecked. > > Signed-off-by: Jonas Theisen > --- > www/window/PruneJobEdit.js | 32 ++++++++++++++++++++++++++++---- > 1 file changed, 28 insertions(+), 4 deletions(-) > > diff --git a/www/window/PruneJobEdit.js b/www/window/PruneJobEdit.js > index a3dafde21..63f736570 100644 > --- a/www/window/PruneJobEdit.js > +++ b/www/window/PruneJobEdit.js > @@ -43,6 +43,21 @@ Ext.define('PBS.window.PruneJobEdit', { > }, > }, > > + viewModel: { > + data: { > + jobEnabled: true, > + }, > + }, > + > + setValues: function (values) { > + let me = this; > + > + if (!values.schedule) { > + values.disable = true; > + } > + me.callParent([values]); > + }, > + > items: { > xtype: 'inputpanel', > onGetValues: function (values) { > @@ -115,14 +130,23 @@ Ext.define('PBS.window.PruneJobEdit', { > cbind: { > value: '{scheduleValue}', > }, > + bind: { > + disabled: '{!jobEnabled}', > + }, > }, > { > xtype: 'proxmoxcheckbox', > - fieldLabel: gettext('Enabled'), > + fieldLabel: gettext('Enable'), > name: 'enable', > - uncheckedValue: 0, > - defaultValue: 1, > - checked: true, > + autoEl: { > + tag: 'div', > + 'data-qtip': gettext('Enable scheduled execution of this job.'), > + }, > + bind: { > + value: '{jobEnabled}', > + }, > + uncheckedValue: false, > + value: true, comment: no need to explicitly set the value to true, as the value has already the binding to `jobEnabled`. Further, the onGetValues() and onSetValues() implementation here, used to replace `enable` with the `disable` for the submit values might be factored out to PBS.Utils and reused for the other job edit windows, as introduced by patch 7. > }, > ], >