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();
|
var type = me.down('radiofield').getGroupValue();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'spice':
|
case 'spice':
|
||||||
val = 'spice'; break;
|
val = 'spice';
|
||||||
|
break;
|
||||||
case 'hostdevice':
|
case 'hostdevice':
|
||||||
case 'port':
|
case 'port':
|
||||||
val = me.down('pveUSBSelector[name=' + type + ']').getUSBValue();
|
val = 'host=' + values[type];
|
||||||
|
delete values[type];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw "invalid type selected";
|
throw "invalid type selected";
|
||||||
@ -102,7 +104,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
|||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
fieldLabel: 'Choose Device',
|
fieldLabel: 'Choose Device',
|
||||||
labelAlign: 'right',
|
labelAlign: 'right',
|
||||||
submitValue: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'usb',
|
name: 'usb',
|
||||||
@ -122,7 +123,6 @@ Ext.define('PVE.qemu.USBInputPanel', {
|
|||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
fieldLabel: gettext('Choose Port'),
|
fieldLabel: gettext('Choose Port'),
|
||||||
labelAlign: 'right',
|
labelAlign: 'right',
|
||||||
submitValue: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user