From 8cec6ee6c321aa7edbb381b9b6557b8375933576 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 15 Jun 2016 10:45:16 +0930 Subject: Fix #6482 OpenVPN Redirect Gateway Option Causes GUI Issue This fixes the GUI inconsistency reported in the referenced bug. On edit of an OpenVPN server that has tun mode, not shared key, and the gwredir checkbox checked, the local_network fields are shown, but actually they should be hidden (because that is what happens on first data entry when gwredir is checked). At least this makes the GUI consistent. Then the other issues mentioned in Redmine feature 6483 can be addressed separately. (cherry picked from commit fa20dac1b58488713d88b44cafc760a83d79cb66) --- src/usr/local/www/vpn_openvpn_server.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php index 12a883c..6d44b5d 100644 --- a/src/usr/local/www/vpn_openvpn_server.php +++ b/src/usr/local/www/vpn_openvpn_server.php @@ -1497,8 +1497,10 @@ events.push(function() { hideInput('local_networkv6', true); hideInput('topology', true); } else { - hideInput('local_network', false); - hideInput('local_networkv6', false); + // For tunnel mode that is not shared key, + // the display status of local network fields depends on + // the state of the gwredir checkbox. + gwredir_change(); hideInput('topology', false); } break; -- cgit v1.1