Commit be34116f authored by Emmanuel Kasper's avatar Emmanuel Kasper Committed by Dietmar Maurer

Allow typeahead selection of Firewall macros

This fixes the bug: https://bugzilla.proxmox.com/show_bug.cgi?id=677

Remarks:
* allowBlank is already set in the class definition
* The value of the comboBox can be either '' after the component initial
load, or 'null' if the user selected a macro and cleans the field afterwards.
This is the reason of the if (!value) test which will catch empty strings and
null.
parent 042559ee
...@@ -164,10 +164,10 @@ Ext.define('PVE.FirewallRulePanel', { ...@@ -164,10 +164,10 @@ Ext.define('PVE.FirewallRulePanel', {
name: 'macro', name: 'macro',
value: '', value: '',
fieldLabel: gettext('Macro'), fieldLabel: gettext('Macro'),
allowBlank: true, editable: true,
listeners: { listeners: {
change: function(f, value) { change: function(f, value) {
if (value === '') { if (!value) {
me.down('field[name=proto]').setDisabled(false); me.down('field[name=proto]').setDisabled(false);
me.down('field[name=sport]').setDisabled(false); me.down('field[name=sport]').setDisabled(false);
me.down('field[name=dport]').setDisabled(false); me.down('field[name=dport]').setDisabled(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment