c92d382579
since linux bridges have untagged traffic on vlan1, we cannot set this value Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
41 lines
789 B
JavaScript
41 lines
789 B
JavaScript
Ext.define('PVE.form.VlanField', {
|
|
extend: 'Ext.form.field.Number',
|
|
alias: ['widget.pveVlanField'],
|
|
|
|
deleteEmpty: false,
|
|
|
|
emptyText: 'no VLAN',
|
|
|
|
fieldLabel: gettext('VLAN Tag'),
|
|
|
|
allowBlank: true,
|
|
|
|
getSubmitData: function() {
|
|
var me = this,
|
|
data = null,
|
|
val;
|
|
if (!me.disabled && me.submitValue) {
|
|
val = me.getSubmitValue();
|
|
if (val) {
|
|
data = {};
|
|
data[me.getName()] = val;
|
|
} else if (me.deleteEmpty) {
|
|
data = {};
|
|
data['delete'] = me.getName();
|
|
}
|
|
}
|
|
return data;
|
|
},
|
|
|
|
initComponent: function() {
|
|
var me = this;
|
|
|
|
Ext.apply(me, {
|
|
minValue: 2,
|
|
maxValue: 4094
|
|
});
|
|
|
|
me.callParent();
|
|
}
|
|
});
|