From d2ce7d30c3a6af60a79e6d43a847ab2237ad9cd6 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 2 Dec 2016 12:12:38 -0500 Subject: Fix 'Other' type VIP options. Ticket #6094 While here, remove some defunct 'range' code that was never used. --- src/usr/local/www/firewall_virtual_ip_edit.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/usr/local/www') diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php index 951b53e..02ff722 100644 --- a/src/usr/local/www/firewall_virtual_ip_edit.php +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -72,7 +72,6 @@ if (isset($id) && $a_vip[$id]) { $pconfig['advskew'] = $a_vip[$id]['advskew']; $pconfig['advbase'] = $a_vip[$id]['advbase']; $pconfig['password'] = $a_vip[$id]['password']; - $pconfig['range'] = $a_vip[$id]['range']; $pconfig['subnet'] = $a_vip[$id]['subnet']; $pconfig['subnet_bits'] = $a_vip[$id]['subnet_bits']; $pconfig['noexpand'] = $a_vip[$id]['noexpand']; @@ -210,14 +209,8 @@ if ($_POST) { $vipent['mode'] = $_POST['mode']; $vipent['interface'] = $_POST['interface']; - /* ProxyARP specific fields */ - if ($_POST['mode'] === "proxyarp") { - if ($_POST['type'] == "range") { - $vipent['range']['from'] = $_POST['range_from']; - $vipent['range']['to'] = $_POST['range_to']; - - } - + /* ProxyARP & Other specific fields */ + if (($_POST['mode'] === "proxyarp") || ($_POST['mode'] === "other")) { $vipent['noexpand'] = isset($_POST['noexpand']); } @@ -373,7 +366,7 @@ $section->addInput(new Form_Select( $section->addInput(new Form_Select( 'type', 'Address type', - ((!$pconfig['range'] && $pconfig['subnet_bits'] == 32) || (!isset($pconfig['subnet']))) ? 'single':'network', + (!isset($pconfig['subnet'])) ? 'single':'network', array( 'single' => gettext('Single address'), 'network' => gettext('Network') @@ -508,10 +501,12 @@ events.push(function() { $('#address_note').html(""); disableInput('type', false); disableInput('subnet_bits', ($('#type').val() == 'single')); + hideCheckbox('noexpand', false); } else { $('#address_note').html(''); disableInput('type', false); disableInput('subnet_bits', ($('#type').val() == 'single')); + hideCheckbox('noexpand', false); } } -- cgit v1.1