mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 05:22:40 +00:00
ui: Utils: delete_if_default: add values by correct type
if 'delete' is an Array, we want to push into it, not append a string this could be an issue when we use an edit window with multiple inputpanels and deleteEmpty set on some fields we then could have an aray like this: values: { delete: [ 'foo', 'bar', 'baz, qux', ], }, which the edit window does not handle correctly anymore (it only does string splitting if 'delete' itself is a string) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
efff7eab9a
commit
2db8e90d66
@ -1247,7 +1247,11 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
if (values[fieldname] === '' || values[fieldname] === default_val) {
|
||||
if (!create) {
|
||||
if (values['delete']) {
|
||||
values['delete'] += ',' + fieldname;
|
||||
if (Ext.isArray(values['delete'])) {
|
||||
values['delete'].push(fieldname);
|
||||
} else {
|
||||
values['delete'] += ',' + fieldname;
|
||||
}
|
||||
} else {
|
||||
values['delete'] = fieldname;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user