summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-04-30 19:36:00 +0000
committerErmal <eri@pfsense.org>2010-04-30 19:36:17 +0000
commitc8e495a372df940115a19ba8089739b6997e93bb (patch)
tree10b0d85fd25ef86e8eee6e2e69df6caa339f1116 /usr/local/www
parent5ab8e25084740dbdfe4ba8c2fd484127d68e2f1c (diff)
downloadpfsense-c8e495a372df940115a19ba8089739b6997e93bb.zip
pfsense-c8e495a372df940115a19ba8089739b6997e93bb.tar.gz
Use correct gateway name instead of the descriptive ones to adapt to dynamic gateways which use the interface name not the interface description as a reference. While here do not use history.back for cancel button but redirect to the groups page directly.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 6d0539b..2f884aa 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -105,10 +105,10 @@ if ($_POST) {
/* Build list of items in group with priority */
$pconfig['item'] = array();
- foreach($a_gateways as $gateway) {
- if($_POST[$gateway['name']] > 0) {
+ foreach($a_gateways as $gwname => $gateway) {
+ if($_POST[$gwname] > 0) {
/* we have a priority above 0 (disabled), add item to list */
- $pconfig['item'][] = "{$gateway[name]}|{$_POST[$gateway['name']]}";
+ $pconfig['item'][] = "{$gwname}|{$_POST[$gwname]}";
}
}
@@ -160,20 +160,19 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq">Gateway Priority</td>
<td width="78%" class="vtable">
<?php
- foreach($a_gateways as $gateway) {
+ foreach($a_gateways as $gwname => $gateway) {
$selected = array();
- $name = $gateway['name'];
$interface = $gateway['interface'];
foreach((array)$pconfig['item'] as $item) {
$itemsplit = explode("|", $item);
- if($itemsplit[0] == $name) {
+ if($itemsplit[0] == $gwname) {
$selected[$itemsplit[1]] = "selected";
break;
} else {
$selected[0] = "selected";
}
}
- echo "<select name='{$name}' class='formfldselect' id='{$name}'>";
+ echo "<select name='{$gwname}' class='formfldselect' id='{$gwname}'>";
echo "<option value='0' $selected[0] >Never</option>";
echo "<option value='1' $selected[1] >Tier 1</option>";
echo "<option value='2' $selected[2] >Tier 2</option>";
@@ -218,7 +217,8 @@ value="<?=htmlspecialchars($pconfig['descr']);?>">
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" class="formbtn" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="Save">
+ <a href="system_gateway_groups.php"><input type="button" value="Cancel" class="formbtn" ></a>
<?php if (isset($id) && $a_gateway_groups[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
OpenPOWER on IntegriCloud