summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_snmp.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-09 05:06:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-09 05:06:41 +0000
commit612bb4f3db8fd261e918470880c457a744384bf5 (patch)
tree797ad379302fdb644b6fb12fe3c484609519b665 /usr/local/www/services_snmp.php
parentaf98cced4420801095daf39003c29e33cc1d8474 (diff)
downloadpfsense-612bb4f3db8fd261e918470880c457a744384bf5.zip
pfsense-612bb4f3db8fd261e918470880c457a744384bf5.tar.gz
Do not show LAN related items when the interfafe does not exist.
Diffstat (limited to 'usr/local/www/services_snmp.php')
-rwxr-xr-xusr/local/www/services_snmp.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index f9d1167..91a63cf 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -366,21 +366,23 @@ function enable_change(whichone) {
<input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources
</td>
</tr>
- <tr>
- <td width="22%" valign="top" class="vtable"></td>
- <td width="78%" class="vtable">
- <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
- <br>
- This option can be useful when trying to access the SNMP agent
- by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- </td>
- </tr>
- </table>
+<?php if(!$config['interfaces']['lan']): ?>
+ <tr>
+ <td width="22%" valign="top" class="vtable"></td>
+ <td width="78%" class="vtable">
+ <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
+ <br>
+ This option can be useful when trying to access the SNMP agent
+ by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
+ </tr>
+<?php endif; ?>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ </td>
+ </tr>
+ </table>
</form>
<script language="JavaScript">
<!--
OpenPOWER on IntegriCloud