diff options
author | Warren Baker <warren@decoy.co.za> | 2012-03-02 23:02:22 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2012-03-02 23:02:22 +0200 |
commit | bfe407e5a2184d0cceeb2349eb1408b4f28029eb (patch) | |
tree | 1e8dc53959f486f77b56199b70a7f4ebcdf569ba /usr/local/www/system_routes_edit.php | |
parent | 3b8a17a1d060482cb2425c62418cd37445762226 (diff) | |
download | pfsense-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-x | usr/local/www/system_routes_edit.php | 13 |
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']);?>"> |