summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-18 01:26:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-18 01:26:43 +0000
commit2c634bddb0fd118638414f5320db734f8d389978 (patch)
treedc5056f0da0eb8cbbac978d0d8cd5d8609fef22a /usr/local/www
parent2cf712c4495b722086401f4be034cfef2e33a5a1 (diff)
downloadpfsense-2c634bddb0fd118638414f5320db734f8d389978.zip
pfsense-2c634bddb0fd118638414f5320db734f8d389978.tar.gz
Add support for vpn_selection.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/pkg.php4
-rwxr-xr-xusr/local/www/pkg_edit.php22
2 files changed, 16 insertions, 10 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php
index 25b18a7..a5f64e8 100755
--- a/usr/local/www/pkg.php
+++ b/usr/local/www/pkg.php
@@ -143,8 +143,8 @@ include("fbegin.inc");
}
?>
<td valign="middle" class="list" nowrap>
- &nbsp;<a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="pkg.php?xml=<?=$xml?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this item?')"><img src="x.gif" width="17" height="17" border="0"></a>
+ &nbsp;<a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a>
+ &nbsp;<a href="pkg.php?xml=<?=$xml?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this item?')"><img src="x.gif" width="17" height="17" border="0"></a>
</td>
<?php
echo "</tr>\n";
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 1d10b36..16aedda 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -236,14 +236,20 @@ $config = $config_tmp;
// XXX: TODO: set $selected
if($pkga['size']) $size = " size='" . $pkga['size'] . "' ";
if($pkga['multiple'] == "yes") $multiple = "MULTIPLE ";
- echo "<select " . $multiple . $size . "id='" . $pkga['fieldname'] . "' name='" . $pkga['fieldname'] . "'>\n";
- foreach ($pkga['options']['option'] as $opt) {
- $selected = "";
- if($opt['value'] == $value) $selected = " SELECTED";
- echo "\t<option name='" . $opt['name'] . "' value='" . $opt['value'] . "'" . $selected . ">" . $opt['name'] . "</option>\n";
- }
- echo "</select>\n";
- echo "<br>" . fixup_string($pkga['description']) . "\n";
+ echo "<select " . $multiple . $size . "id='" . $pkga['fieldname'] . "' name='" . $pkga['fieldname'] . "'>\n";
+ foreach ($pkga['options']['option'] as $opt) {
+ $selected = "";
+ if($opt['value'] == $value) $selected = " SELECTED";
+ echo "\t<option name='" . $opt['name'] . "' value='" . $opt['value'] . "'" . $selected . ">" . $opt['name'] . "</option>\n";
+ }
+ echo "</select>\n";
+ echo "<br>" . fixup_string($pkga['description']) . "\n";
+ } else if($pkga['type'] == "vpn_selection") {
+ echo "<select name='" . $vpn['name'] . "'>\n";
+ foreach ($config['ipsec']['tunnel'] as $vpn) {
+ echo "\t<option value=\"" . $vpn['descr'] . "\">" . $vpn['descr'] . "</option>\n";
+ }
+ echo "</select>\n";
} else if($pkga['type'] == "checkbox") {
echo "<input type='checkbox' name='" . $pkga['fieldname'] . "' value='" . $value . "'>\n";
echo "<br>" . fixup_string($pkga['description']) . "\n";
OpenPOWER on IntegriCloud