summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-08-23 16:36:23 -0400
committerjim-p <jimp@pfsense.org>2011-08-23 16:38:35 -0400
commita5308b81ade2603fffad0a167cfa62bcaf3215cd (patch)
treed54fbcaf521b71e8176c63046fe2894a1185ebca /usr/local/www
parent9debac940d12eea532518c77c6f95a83509e437d (diff)
downloadpfsense-a5308b81ade2603fffad0a167cfa62bcaf3215cd.zip
pfsense-a5308b81ade2603fffad0a167cfa62bcaf3215cd.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.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/system_gateways_edit.php5
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 828f054..d2db8c5 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -381,10 +381,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>
OpenPOWER on IntegriCloud