5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-24 02:04:14 +03:00

ui: sync job: don't send delete value on creation

since that's not a valid api parameter there
we have to pass the `isCreate` value through to the inputpanel, we even
used it there already but it was never set.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2024-03-06 12:21:03 +01:00 committed by Thomas Lamprecht
parent 169ddf541d
commit 2edb5f963f

View File

@ -80,6 +80,9 @@ Ext.define('PBS.window.SyncJobEdit', {
}
return values;
},
cbind: {
isCreate: '{isCreate}', // pass it through
},
column1: [
{
xtype: 'pmxDisplayEditField',
@ -266,7 +269,9 @@ Ext.define('PBS.window.SyncJobEdit', {
xtype: 'pbsNamespaceMaxDepthReduced',
name: 'max-depth',
fieldLabel: gettext('Max. Depth'),
deleteEmpty: true,
cbind: {
deleteEmpty: '{!isCreate}',
},
},
{
fieldLabel: gettext('Remove vanished'),
@ -321,6 +326,7 @@ Ext.define('PBS.window.SyncJobEdit', {
{
xtype: 'inputpanel',
onGetValues: function(values) {
let me = this;
PBS.Utils.delete_if_default(values, 'group-filter');
if (Ext.isArray(values['group-filter'])) {
if (values['group-filter'].length === 0) {
@ -331,8 +337,14 @@ Ext.define('PBS.window.SyncJobEdit', {
values['group-filter'] = [...new Set(values['group-filter'])];
}
}
if (me.isCreate) {
delete values.delete;
}
return values;
},
cbind: {
isCreate: '{isCreate}', // pass it through
},
title: gettext('Group Filter'),
items: [
{