summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes_edit.php
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2012-03-02 23:02:22 +0200
committerWarren Baker <warren@decoy.co.za>2012-03-02 23:02:22 +0200
commitbfe407e5a2184d0cceeb2349eb1408b4f28029eb (patch)
tree1e8dc53959f486f77b56199b70a7f4ebcdf569ba /usr/local/www/system_routes_edit.php
parent3b8a17a1d060482cb2425c62418cd37445762226 (diff)
downloadpfsense-bfe407e5a2184d0cceeb2349eb1408b4f28029eb.zip
pfsense-bfe407e5a2184d0cceeb2349eb1408b4f28029eb.tar.gz
Add the ability to disable static routes without deleting them
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-xusr/local/www/system_routes_edit.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index cf38206..3bce554 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -73,6 +73,7 @@ if (isset($id) && $a_routes[$id]) {
explode('/', $a_routes[$id]['network']);
$pconfig['gateway'] = $a_routes[$id]['gateway'];
$pconfig['descr'] = $a_routes[$id]['descr'];
+ $pconfig['disabled'] = isset($a_routes[$id]['disabled']);
}
if (isset($_GET['dup']))
@@ -130,6 +131,10 @@ if ($_POST) {
$route['network'] = $osn;
$route['gateway'] = $_POST['gateway'];
$route['descr'] = $_POST['descr'];
+ if ($_POST['disabled'])
+ $route['disabled'] = true;
+ else
+ unset($route['disabled']);
if (!isset($id))
$id = count($a_routes);
@@ -264,6 +269,14 @@ include("head.inc");
</div>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disabled");?></td>
+ <td width="78%" class="vtable">
+ <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
+ <strong><?=gettext("Disable this static route");?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this static route without removing it from the list.");?></span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
OpenPOWER on IntegriCloud