public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes
@ 2026-10-09 14:54 Jonas Theisen
  2026-10-09 14:54 ` [PATCH proxmox-backup v3 04/10] api: prune job: align prune job schedule to other jobs Jonas Theisen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jonas Theisen @ 2026-10-09 14:54 UTC (permalink / raw)
  To: pbs-devel

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
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);
+                    },
+                },
             },
         ],
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-09 14:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 14:54 [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 04/10] api: prune job: align prune job schedule to other jobs Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 05/10] fix #7904: api: implement "disable" for {sync,verify,tape,GC} jobs Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 06/10] fix #7904: ui: job edit: introduce "Enable" checkbox " Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 07/10] ui: improve visibility of disabled {sync,verify,tape,GC,prune} jobs on the overview page Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 08/10] ui: calendar-event: remove clear button from calendar selector Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 09/10] api: create datastore: allow creation without prune job Jonas Theisen
2026-10-09 14:54 ` [PATCH proxmox-backup v3 10/10] ui: create datastore: add enable checkboxes for {GC, prune} Jonas Theisen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal