Commit 6fa8397a authored by Alexandre Derumier's avatar Alexandre Derumier Committed by Dietmar Maurer

firewall edit rule : disable proto, sport, dport if macro is selected

Signed-off-by: 's avatarAlexandre Derumier <aderumier@odiso.com>
parent 8b3240bc
......@@ -132,7 +132,20 @@ Ext.define('PVE.FirewallRulePanel', {
value: '',
deleteEmpty: !me.create,
fieldLabel: gettext('Macro'),
allowBlank: true
allowBlank: true,
listeners: {
change: function(f, value) {
if (value === '') {
me.down('field[name=proto]').setDisabled(false);
me.down('field[name=sport]').setDisabled(false);
me.down('field[name=dport]').setDisabled(false);
} else {
me.down('field[name=proto]').setDisabled(true);
me.down('field[name=sport]').setDisabled(true);
me.down('field[name=dport]').setDisabled(true);
}
}
}
},
{
xtype: 'pveKVComboBox',
......
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