maybe add a note that you just copied this from another part of the code.. On 8/30/19 9:40 AM, Aaron Lauterer wrote: > Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> > --- > www/manager6/qemu/USBEdit.js | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js > index 8fc95c99..20c30fe6 100644 > --- a/www/manager6/qemu/USBEdit.js > +++ b/www/manager6/qemu/USBEdit.js > @@ -18,8 +18,6 @@ Ext.define('PVE.qemu.USBInputPanel', { > hwidfield.setDisabled(!newValue); > } else if(field.inputValue === 'port') { > portfield.setDisabled(!newValue); > - } else if(field.inputValue === 'spice') { > - usb3field.setDisabled(newValue); > } > } > }, > @@ -62,7 +60,11 @@ Ext.define('PVE.qemu.USBInputPanel', { > var type = me.down('radiofield').getGroupValue(); > switch (type) { > case 'spice': > - val = 'spice'; break; > + val = 'spice'; > + if (!/usb3/.test(val) && me.down('field[name=usb3]').getValue() > === true) { > + val += ',usb3=1'; > + }
it could be better to remove the "submitValue: false" from the USB 3 checkbox and add a "inputValue: true" to tell ExtJS to return true if it's checked, then you could omit the two separate copies of that .down() stuff and just add a if (values.usb3) { delete values.usb3; val += ',usb3=1'; } If any USB entry is not compatible with usb3 it should be expressed by marking the usb3 checkbox invalid in such a case. > + break; > case 'hostdevice': > case 'port': > val = me.down('pveUSBSelector[name=' + type + > ']').getUSBValue(); > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel