From 35bd5f5024d4ef070a86996a5b9dd42296eaafb8 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 7 Mar 2016 16:21:18 +0100 Subject: [PATCH] (legacy) small cleanups load_balancer_virtual_server_edit.php --- src/www/load_balancer_virtual_server_edit.php | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) 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"); - + - /> - /> + + - +