diff --git a/src/www/load_balancer_virtual_server_edit.php b/src/www/load_balancer_virtual_server_edit.php index 8d3b320ac..a2dd0bfb2 100644 --- a/src/www/load_balancer_virtual_server_edit.php +++ b/src/www/load_balancer_virtual_server_edit.php @@ -108,6 +108,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($vsent['sitedown'] == "") { unset($vsent['sitedown']); } + if ($vsent['mode'] != 'relay'){ + // relay protocol only applies to relay + unset($vsent['relay_protocol']); + } + if (isset($id)) { if ($a_vs[$id]['name'] != $pconfig['name']) { /* Because the VS name changed, mark the old name for cleanup. */ @@ -147,6 +152,15 @@ include("head.inc"); $("#ipadd").typeahead({ source: all_aliases['host'] }); $("#port").typeahead({ source: all_aliases['port'] }); + $("#mode").change(function(){ + if ($(this).val() == 'redirect') { + $("#protocol").hide(); + } else { + $("#protocol").show(); + } + }); + $("#mode").change(); + }); @@ -268,13 +282,25 @@ include("head.inc");