ui: tape backup job: don't send delete value on creation

this is not a valid parameter for the create call. To do that in the
onGetValues method, we have to pass the 'isCreate' value through to the
input panels via cbind.

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

View File

@ -61,8 +61,16 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
Proxmox.Utils.assemble_field_data(values, { "delete": 'eject-media' }); Proxmox.Utils.assemble_field_data(values, { "delete": 'eject-media' });
} }
PBS.Utils.delete_if_default(values, 'notify-user'); PBS.Utils.delete_if_default(values, 'notify-user');
if (me.isCreate) {
delete values.delete;
}
return values; return values;
}, },
cbind: {
isCreate: '{isCreate}', // pass it through
},
column1: [ column1: [
{ {
xtype: 'pmxDisplayEditField', xtype: 'pmxDisplayEditField',
@ -184,8 +192,14 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
delete values['group-filter']; delete values['group-filter'];
values.delete = 'group-filter'; values.delete = 'group-filter';
} }
if (this.isCreate) {
delete values.delete;
}
return values; return values;
}, },
cbind: {
isCreate: '{isCreate}', // pass it through
},
title: gettext('Group Filter'), title: gettext('Group Filter'),
items: [ items: [
{ {