mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 09:59:33 +00:00
ext6migrate: fix display of sport/dport/proto combo boxes
setting the field value of to '' would trigger the 'change' event which would then disable the sport/dport/proto comboboxes too early, an empty form would have the comboboxes disabled too instead keep the field to a null value if it is empty, but force it to '' before sending to the pve-proxy also makes the macro selector keyboard editable, similar to the other comboboxes in the input panel
This commit is contained in:
parent
3d990919c2
commit
1fafdce8c2
@ -58,7 +58,7 @@ Ext.define('PVE.FirewallRulePanel', {
|
||||
// hack: editable ComboGrid returns nothing when empty, so we need to set ''
|
||||
// Also, disabled text fields return nothing, so we need to set ''
|
||||
|
||||
Ext.Array.each(['source', 'dest', 'proto', 'sport', 'dport'], function(key) {
|
||||
Ext.Array.each(['source', 'dest', 'macro', 'proto', 'sport', 'dport'], function(key) {
|
||||
if (values[key] === undefined) {
|
||||
values[key] = '';
|
||||
}
|
||||
@ -161,12 +161,12 @@ Ext.define('PVE.FirewallRulePanel', {
|
||||
{
|
||||
xtype: 'pveFWMacroSelector',
|
||||
name: 'macro',
|
||||
value: '',
|
||||
fieldLabel: gettext('Macro'),
|
||||
editable: true,
|
||||
allowBlank: true,
|
||||
listeners: {
|
||||
change: function(f, value) {
|
||||
if (value === '') {
|
||||
if (value === null) {
|
||||
me.down('field[name=proto]').setDisabled(false);
|
||||
me.down('field[name=sport]').setDisabled(false);
|
||||
me.down('field[name=dport]').setDisabled(false);
|
||||
|
Loading…
Reference in New Issue
Block a user