summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-11-26 18:41:44 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-11-26 18:41:44 -0200
commit96ef7db0312e76540fffda7092df4be9d97dfe6e (patch)
tree8ef3819bb1060dabd923ea4355ee664427f52ed4 /usr/local/www/system_gateways_edit.php
parent06b8d43c3fb34bd8773d9d99c9a35410c63efa75 (diff)
downloadpfsense-96ef7db0312e76540fffda7092df4be9d97dfe6e.zip
pfsense-96ef7db0312e76540fffda7092df4be9d97dfe6e.tar.gz
Add an option to disable gateway items
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index fb9d8d7..2413b53 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -42,7 +42,7 @@
require("guiconfig.inc");
require("pkg-utils.inc");
-$a_gateways = return_gateways_array(true);
+$a_gateways = return_gateways_array(true, false, true);
$a_gateways_arr = array();
foreach($a_gateways as $gw) {
$a_gateways_arr[] = $gw;
@@ -84,6 +84,7 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig['monitor_disable'] = isset($a_gateways[$id]['monitor_disable']);
$pconfig['descr'] = $a_gateways[$id]['descr'];
$pconfig['attribute'] = $a_gateways[$id]['attribute'];
+ $pconfig['disabled'] = isset($a_gateways[$id]['disabled']);
}
if (isset($_GET['dup'])) {
@@ -424,6 +425,11 @@ if ($_POST) {
if ($_POST['down'])
$gateway['down'] = $_POST['down'];
+ if(isset($_POST['disabled']))
+ $gateway['disabled'] = true;
+ else
+ unset($gateway['disabled']);
+
/* when saving the manual gateway we use the attribute which has the corresponding id */
if (isset($realid) && $a_gateway_item[$realid])
$a_gateway_item[$realid] = $gateway;
@@ -495,6 +501,14 @@ function monitor_change() {
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit gateway"); ?></td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
+ <td width="78%" class="vtable">
+ <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked=\"checked\""; ?> />
+ <strong><?=gettext("Disable this gateway");?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this gateway without removing it from the list.");?></span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name='interface' class='formselect'>
OpenPOWER on IntegriCloud