mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-06-26 20:45:39 +00:00
network edit: rename bridge_set_vids to enableBridgeVlanIds
we use camelCase in the JavaScript code and besides casing the old name wasn't really telling and suggested that it was there to set a specific VID not to enable setting them. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2aa5d7e7ba
commit
358b98bf4f
@ -3,7 +3,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
alias: ['widget.proxmoxNodeNetworkEdit'],
|
alias: ['widget.proxmoxNodeNetworkEdit'],
|
||||||
|
|
||||||
// Enable to show the VLAN ID field
|
// Enable to show the VLAN ID field
|
||||||
bridge_set_vids: false,
|
enableBridgeVlanIds: false,
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
let me = this;
|
let me = this;
|
||||||
@ -60,7 +60,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (me.iftype === 'bridge') {
|
if (me.iftype === 'bridge') {
|
||||||
let vids = Ext.create('Ext.form.field.Text', {
|
let vlanIdsField = !me.enableBridgeVlanIds ? undefined : Ext.create('Ext.form.field.Text', {
|
||||||
fieldLabel: gettext('VLAN IDs'),
|
fieldLabel: gettext('VLAN IDs'),
|
||||||
name: 'bridge_vids',
|
name: 'bridge_vids',
|
||||||
emptyText: '2-4094',
|
emptyText: '2-4094',
|
||||||
@ -102,8 +102,8 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
deleteEmpty: !me.isCreate,
|
deleteEmpty: !me.isCreate,
|
||||||
listeners: {
|
listeners: {
|
||||||
change: function(f, newVal) {
|
change: function(f, newVal) {
|
||||||
if (me.bridge_set_vids) {
|
if (vlanIdsField) {
|
||||||
vids.setDisabled(!newVal);
|
vlanIdsField.setDisabled(!newVal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -117,8 +117,8 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
'data-qtip': gettext('Space-separated list of interfaces, for example: enp0s0 enp1s0'),
|
'data-qtip': gettext('Space-separated list of interfaces, for example: enp0s0 enp1s0'),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (me.bridge_set_vids) {
|
if (vlanIdsField) {
|
||||||
advancedColumn2.push(vids);
|
advancedColumn2.push(vlanIdsField);
|
||||||
}
|
}
|
||||||
} else if (me.iftype === 'OVSBridge') {
|
} else if (me.iftype === 'OVSBridge') {
|
||||||
column2.push({
|
column2.push({
|
||||||
|
Loading…
Reference in New Issue
Block a user