mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 11:32:41 +00:00
firewall rules: add fix for editable ComboGrid
This commit is contained in:
parent
1f3e956a53
commit
060b19b635
@ -51,6 +51,24 @@ Ext.define('PVE.FirewallRulePanel', {
|
||||
|
||||
allow_iface: false,
|
||||
|
||||
onGetValues: function(values) {
|
||||
var me = this;
|
||||
|
||||
// hack: editable ComboGrid returns nothing when empty, so we need to set ''
|
||||
|
||||
if (values.source === undefined) {
|
||||
values.source = '';
|
||||
}
|
||||
if (values.dest === undefined) {
|
||||
values.dest = '';
|
||||
}
|
||||
if (values.proto === undefined) {
|
||||
values.proto = '';
|
||||
}
|
||||
|
||||
return values;
|
||||
},
|
||||
|
||||
initComponent : function() {
|
||||
var me = this;
|
||||
|
||||
@ -149,10 +167,12 @@ Ext.define('PVE.FirewallRulePanel', {
|
||||
{
|
||||
xtype: 'pveIPProtocolSelector',
|
||||
name: 'proto',
|
||||
autoSelect: false,
|
||||
queryDelay: 900000000, // disable query
|
||||
editable: true,
|
||||
value: '',
|
||||
emptyText: 'any',
|
||||
fieldLabel: gettext('Protocol'),
|
||||
allowBlank: true
|
||||
fieldLabel: gettext('Protocol')
|
||||
},
|
||||
{
|
||||
xtype: 'displayfield',
|
||||
|
Loading…
Reference in New Issue
Block a user