ui: vm/usbedit: don't use getUSBValue to avoid possible duplicate "usb3"
As getUSBValue() always added the "usb3" property if the selected device was recognized as USB3. But we can now also pass such a device as USB2 so lift this restriction - which also fixes a bug for USB3 selected devices with the USB3 checkbox set. The solution also avoids the me.down query, which is nice too. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
700cd718ec
commit
3db3e3eccc
@ -55,10 +55,12 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
var type = me.down('radiofield').getGroupValue();
|
||||
switch (type) {
|
||||
case 'spice':
|
||||
val = 'spice'; break;
|
||||
val = 'spice';
|
||||
break;
|
||||
case 'hostdevice':
|
||||
case 'port':
|
||||
val = me.down('pveUSBSelector[name=' + type + ']').getUSBValue();
|
||||
val = 'host=' + values[type];
|
||||
delete values[type];
|
||||
break;
|
||||
default:
|
||||
throw "invalid type selected";
|
||||
@ -102,7 +104,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
allowBlank: false,
|
||||
fieldLabel: 'Choose Device',
|
||||
labelAlign: 'right',
|
||||
submitValue: false
|
||||
},
|
||||
{
|
||||
name: 'usb',
|
||||
@ -122,7 +123,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
||||
allowBlank: false,
|
||||
fieldLabel: gettext('Choose Port'),
|
||||
labelAlign: 'right',
|
||||
submitValue: false
|
||||
},
|
||||
{
|
||||
xtype: 'checkbox',
|
||||
|
Loading…
Reference in New Issue
Block a user