mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-04 18:31:20 +00:00
vlan edit: Match explicit values to name field
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
This commit is contained in:
parent
705f92a1e4
commit
0174c45815
@ -258,8 +258,22 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
if (Proxmox.Utils.VlanInterface_match.test(value)) {
|
if (Proxmox.Utils.VlanInterface_match.test(value)) {
|
||||||
vlanidField.setDisabled(true);
|
vlanidField.setDisabled(true);
|
||||||
vlanrawdeviceField.setDisabled(true);
|
vlanrawdeviceField.setDisabled(true);
|
||||||
|
// User defined those values in the `iface` (Name)
|
||||||
|
// field. Match them (instead of leaving the
|
||||||
|
// previous value) to make clear what is submitted
|
||||||
|
// and how the fields `iface`, `vlan-id` and
|
||||||
|
// `vlan-raw-device` are connected
|
||||||
|
vlanidField.setValue(
|
||||||
|
value.match(Proxmox.Utils.VlanInterface_match)[2],
|
||||||
|
);
|
||||||
|
vlanrawdeviceField.setValue(
|
||||||
|
value.match(Proxmox.Utils.VlanInterface_match)[1],
|
||||||
|
);
|
||||||
} else if (Proxmox.Utils.Vlan_match.test(value)) {
|
} else if (Proxmox.Utils.Vlan_match.test(value)) {
|
||||||
vlanidField.setDisabled(true);
|
vlanidField.setDisabled(true);
|
||||||
|
vlanidField.setValue(
|
||||||
|
value.match(Proxmox.Utils.Vlan_match)[1],
|
||||||
|
);
|
||||||
vlanrawdeviceField.setDisabled(false);
|
vlanrawdeviceField.setDisabled(false);
|
||||||
} else {
|
} else {
|
||||||
vlanidField.setDisabled(false);
|
vlanidField.setDisabled(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user