ui: restore: group override settings in a fieldset

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2022-04-28 09:04:08 +02:00 committed by Thomas Lamprecht
parent 1ad2651202
commit c7f66bd038

View File

@ -293,11 +293,15 @@ Ext.define('PVE.window.Restore', {
}); });
} }
items.push( items.push({
{ xtype: 'fieldset',
xtype: 'displayfield', title: `${gettext('Override Settings')}:`,
value: `${gettext('Override Settings')}:`, layout: 'column',
defaults: {
width: '45%',
margin: '0 0 5 10',
}, },
items: [
{ {
xtype: 'textfield', xtype: 'textfield',
fieldLabel: gettext('Name'), fieldLabel: gettext('Name'),
@ -322,10 +326,7 @@ Ext.define('PVE.window.Restore', {
maxValue: 128, maxValue: 128,
allowBlank: true, allowBlank: true,
}, },
); {
if (me.vmtype === 'qemu') {
items.push({
xtype: 'proxmoxintegerfield', xtype: 'proxmoxintegerfield',
fieldLabel: gettext('Sockets'), fieldLabel: gettext('Sockets'),
name: 'sockets', name: 'sockets',
@ -333,8 +334,11 @@ Ext.define('PVE.window.Restore', {
minValue: 1, minValue: 1,
maxValue: 4, maxValue: 4,
allowBlank: true, allowBlank: true,
hidden: me.vmtype !== 'qemu',
disabled: me.vmtype !== 'qemu',
},
],
}); });
}
let title = gettext('Restore') + ": " + (me.vmtype === 'lxc' ? 'CT' : 'VM'); let title = gettext('Restore') + ": " + (me.vmtype === 'lxc' ? 'CT' : 'VM');
if (me.vmid) { if (me.vmid) {