diff options
author | jim-p <jimp@pfsense.org> | 2011-08-23 16:36:23 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-08-23 16:36:23 -0400 |
commit | 28ce79ad0494416f0c62f81e211894525d9ef33c (patch) | |
tree | ccce885e667a3006b48ca5e0b1815440906127c3 | |
parent | 318189b6b43b30d95ff0b313167f65713607d87b (diff) | |
download | pfsense-28ce79ad0494416f0c62f81e211894525d9ef33c.zip pfsense-28ce79ad0494416f0c62f81e211894525d9ef33c.tar.gz |
Simplify this code a bit, should be the same test in both locations since this should be either/or, and with the other code it can apparently fall into a trap where it shows neither.
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 5ff9578..c28e5cc 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -401,10 +401,11 @@ function monitor_change() { <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Advanced");?></td> <td width="78%" class="vtable"> - <div id="showadvgatewaybox" <? if (!empty($pconfig['latencylow']) || !empty($pconfig['latencyhigh']) || !empty($pconfig['losslow']) || !empty($pconfig['losshigh']) || (isset($pconfig['weight']) && $pconfig['weight'] > 1) || (isset($pconfig['interval']) && $pconfig['interval'])) echo "style='display:none'"; ?>> + <?php $showbutton = (!empty($pconfig['latencylow']) || !empty($pconfig['latencyhigh']) || !empty($pconfig['losslow']) || !empty($pconfig['losshigh']) || (isset($pconfig['weight']) && $pconfig['weight'] > 1) || (isset($pconfig['interval']) && $pconfig['interval'])); ?> + <div id="showadvgatewaybox" <? if ($showbutton) echo "style='display:none'"; ?>> <input type="button" onClick="show_advanced_gateway()" value="Advanced"></input> - Show advanced option</a> </div> - <div id="showgatewayadv" <? if (empty($pconfig['latencylow']) && empty($pconfig['latencyhigh']) && empty($pconfig['losslow']) && empty($pconfig['losshigh']) && (empty($pconfig['weight']) || $pconfig['weight'] == 1) && (empty($pconfig['interval']) || $pconfig['interval'] == 1)) echo "style='display:none'"; ?>> + <div id="showgatewayadv" <? if (!$showbutton) echo "style='display:none'"; ?>> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Weight");?></td> |