From: Christian Ebner <c.ebner@proxmox.com>
To: Jonas Theisen <j.theisen@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes
Date: Thu, 15 Oct 2026 13:14:52 +0200 [thread overview]
Message-ID: <d2270d55-d11b-4e41-9f00-894fea1b52f1@proxmox.com> (raw)
In-Reply-To: <20261009145328.281554-4-j.theisen@proxmox.com>
On 10/9/26 4:53 PM, Jonas Theisen wrote:
> This commit aligns the already existing "Enabled" checkbox in
> the Prune Job Edit window to the other checkboxes.
>
> Meaning a reword from "Enabled" to "Enable" as it is more common
> throghout the UI and the disabling of the schedule field if the
typo: s/throghout/throughout/
> checkbox is off.
>
> Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
> ---
> www/window/PruneJobEdit.js | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/www/window/PruneJobEdit.js b/www/window/PruneJobEdit.js
> index a3dafde21..2eb8c7129 100644
> --- a/www/window/PruneJobEdit.js
> +++ b/www/window/PruneJobEdit.js
> @@ -43,6 +43,15 @@ Ext.define('PBS.window.PruneJobEdit', {
> },
> },
>
> + setValues: function (values) {
> + let me = this;
> +
> + if (!values.schedule || values.schedule === '') {
> + values.disable = true;
> + }
> + me.callParent([values]);
> + },
> +
> items: {
> xtype: 'inputpanel',
> onGetValues: function (values) {
> @@ -118,11 +127,19 @@ Ext.define('PBS.window.PruneJobEdit', {
> },
> {
> xtype: 'proxmoxcheckbox',
> - fieldLabel: gettext('Enabled'),
> + fieldLabel: gettext('Enable'),
> name: 'enable',
> uncheckedValue: 0,
> defaultValue: 1,
> checked: true,
> + listeners: {
> + change: function (field, enabled) {
> + let me = this;
> + let view = me.up('pbsPruneJobEdit');
> + let schedule = view.down('field[name=schedule]');
> + schedule.setDisabled(!enabled);
> + },
> + },
this hunk can be more concise by using ExtJS variable bindings:
```
diff --git a/www/window/PruneJobEdit.js b/www/window/PruneJobEdit.js
index 2eb8c7129..5578dcf1f 100644
--- a/www/window/PruneJobEdit.js
+++ b/www/window/PruneJobEdit.js
@@ -43,6 +43,12 @@ Ext.define('PBS.window.PruneJobEdit', {
},
},
+ viewModel: {
+ data: {
+ jobEnabled: true,
+ },
+ },
+
setValues: function (values) {
let me = this;
@@ -124,6 +130,9 @@ Ext.define('PBS.window.PruneJobEdit', {
cbind: {
value: '{scheduleValue}',
},
+ bind: {
+ disabled: '{!jobEnabled}',
+ },
},
{
xtype: 'proxmoxcheckbox',
@@ -131,14 +140,8 @@ Ext.define('PBS.window.PruneJobEdit', {
name: 'enable',
uncheckedValue: 0,
defaultValue: 1,
- checked: true,
- listeners: {
- change: function (field, enabled) {
- let me = this;
- let view = me.up('pbsPruneJobEdit');
- let schedule = view.down('field[name=schedule]');
- schedule.setDisabled(!enabled);
- },
+ bind: {
+ value: '{jobEnabled}',
},
},
],
```
> },
> ],
>
next prev parent reply other threads:[~2026-10-15 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 14:53 [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs Jonas Theisen
2026-10-09 14:53 ` [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config Jonas Theisen
2026-10-15 11:14 ` Christian Ebner
2026-10-09 14:53 ` [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional Jonas Theisen
2026-10-09 14:53 ` [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes Jonas Theisen
2026-10-15 11:14 ` Christian Ebner [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-09 14:54 Jonas Theisen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2270d55-d11b-4e41-9f00-894fea1b52f1@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=j.theisen@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox