fix #2641: ui: storage: expose CIFS subdir parameter on add

makes it possible to optionally set the 'subdir' parameter when
adding a new CIFS storage.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
 [ T: reword/flow commit message slightly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Leo Nunner 2023-02-08 10:05:26 +01:00 committed by Thomas Lamprecht
parent 8b3c353ed7
commit 711658f42c

View File

@ -129,6 +129,9 @@ Ext.define('PVE.storage.CIFSInputPanel', {
if (values.username?.length === 0) {
delete values.username;
}
if (values.subdir?.length === 0) {
delete values.subdir;
}
return me.callParent([values]);
},
@ -216,6 +219,14 @@ Ext.define('PVE.storage.CIFSInputPanel', {
},
},
},
{
xtype: 'pmxDisplayEditField',
editable: me.isCreate,
name: 'subdir',
fieldLabel: gettext('Subdirectory'),
allowBlank: true,
emptyText: gettext('/some/path'),
},
];
me.callParent();