[pbs-devel] [PATCH proxmox-backup] ui: fix local sync job edit

Hannes Laimer h.laimer at proxmox.com
Tue Nov 28 14:01:24 CET 2023


... since the store field was cleared when the window opened.

Reported-by: Lukas Wagner <l.wagner at proxmox.com>
Fixes: 9039d6709e375f37bb8a21680f6fefb18ee87ab3
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
the fie

 www/form/RemoteTargetSelector.js | 4 ++--
 www/window/SyncJobEdit.js        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/form/RemoteTargetSelector.js b/www/form/RemoteTargetSelector.js
index 9ea802d1..3d066f54 100644
--- a/www/form/RemoteTargetSelector.js
+++ b/www/form/RemoteTargetSelector.js
@@ -33,10 +33,10 @@ Ext.define('PBS.form.RemoteStoreSelector', {
 	// do nothing.
     },
 
-    setRemote: function(remote) {
+    setRemote: function(remote, forceReload = false) {
 	let me = this;
 
-	if (me.remote === remote) {
+	if (!forceReload && me.remote === remote) {
 	    return;
 	}
 
diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js
index dbd53178..d20def74 100644
--- a/www/window/SyncJobEdit.js
+++ b/www/window/SyncJobEdit.js
@@ -181,15 +181,15 @@ Ext.define('PBS.window.SyncJobEdit', {
 				remoteField.setDisabled(isLocalSync);
 				storeField.setDisabled(!isLocalSync && !remoteField.value);
 				if (isLocalSync === !!remoteField.value) {
-				    storeField.clearValue();
 				    remoteField.clearValue();
 				}
 
 				if (isLocalSync) {
 				    storeField.setDisabled(false);
 				    rateLimitField.setValue(null);
-				    storeField.setRemote(null);
+				    storeField.setRemote(null, true);
 				} else {
+				    storeField.clearValue();
 				    remoteField.validate();
 				}
 			    },
-- 
2.39.2






More information about the pbs-devel mailing list