diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 310fbb60fc4..b73eba13a0b 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -95,7 +95,8 @@ return name != 'protocolnumber' && name != 'icmptype' && name != 'icmpcode' && - name != 'cidrlist'; + name != 'cidrlist' && + name != 'number'; }); var $portFields = $inputs.filter(function() { var name = $(this).attr('name'); @@ -116,6 +117,7 @@ $icmpFields.hide(); $otherFields.hide(); $protocolFields.show().addClass('required'); + $portFields.show(); } else if ($(this).val() == 'icmp') { $icmpFields.show(); $icmpFields.attr('disabled', false); @@ -123,7 +125,13 @@ $otherFields.attr('disabled', 'disabled'); $otherFields.hide(); $otherFields.parent().find('label.error').hide(); - } else { + } + else if ($(this).val() == 'all'){ + $portFields.attr('disabled', 'disabled'); + $portFields.hide(); + } + + else { $otherFields.show(); $otherFields.parent().find('label.error').hide(); $otherFields.attr('disabled', false); @@ -131,10 +139,6 @@ $icmpFields.hide(); $icmpFields.parent().find('label.error').hide(); $protocolFields.hide().removeClass('required'); - if ($(this).val() == 'all'){ - $portFields.attr('disabled', 'disabled'); - $portFields.hide(); - } } });