diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-18 01:26:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-18 01:26:43 +0000 |
commit | 2c634bddb0fd118638414f5320db734f8d389978 (patch) | |
tree | dc5056f0da0eb8cbbac978d0d8cd5d8609fef22a /usr/local | |
parent | 2cf712c4495b722086401f4be034cfef2e33a5a1 (diff) | |
download | pfsense-2c634bddb0fd118638414f5320db734f8d389978.zip pfsense-2c634bddb0fd118638414f5320db734f8d389978.tar.gz |
Add support for vpn_selection.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/pkg.php | 4 | ||||
-rwxr-xr-x | usr/local/www/pkg_edit.php | 22 |
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> - <a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a> - <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> + <a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a> + <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"; |