ui: fix local sync job edit

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

Reported-by: Lukas Wagner <l.wagner@proxmox.com>
Fixes: 9039d6709e
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
Hannes Laimer 2023-11-28 14:01:24 +01:00 committed by Thomas Lamprecht
parent 7d1085735b
commit fbee479979
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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();
}
},