diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-16 19:00:49 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-16 19:00:49 +0000 |
commit | 1d3bcd2a892355f926b7b1511ba99558616370c1 (patch) | |
tree | 1b4a41d274214eb1cd158faa17228b56573834c9 /usr/local/www | |
parent | b8fce6cc0c62d21b4d32d0eb9834c68ad80857b8 (diff) | |
download | pfsense-1d3bcd2a892355f926b7b1511ba99558616370c1.zip pfsense-1d3bcd2a892355f926b7b1511ba99558616370c1.tar.gz |
Use get_configured_interface_with_descr() for OpenVPN gui pages. Suggested
by Ermal.
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/vpn_openvpn_client.php | 28 | ||||
-rw-r--r-- | usr/local/www/vpn_openvpn_server.php | 14 |
2 files changed, 19 insertions, 23 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index d3baa72..4f1cd1e 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -382,28 +382,26 @@ function autotls_change() { <select name="interface" class="formselect"> <?php $interfaces = get_configured_interface_with_descr(); - $carpips = find_number_of_needed_carp_interfaces(); - for ($i=0; $i<$carpips; $i++) { - $carpip = find_interface_ip("carp" . $i); - $interfaces['carp' . $i] = "CARP{$i} ({$carpip})"; - } - foreach ($interfaces as $iface => $ifacename): + foreach ($interfaces as $iface => $ifacename): + $selected = ""; + if ($iface == $pconfig['interface']) + $selected = "selected"; ?> - <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>> - <?=htmlspecialchars($ifacename);?> - </option> + <option value="<?=$iface;?>" <?=$selected;?>> + <?=htmlspecialchars($ifacename);?> + </option> <?php endforeach; ?> </select> <br> </td> </tr> - <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Local port");?></td> - <td width="78%" class="vtable"> - <input name="local_port" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['local_port']);?>"/> + <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Local port");?></td> + <td width="78%" class="vtable"> + <input name="local_port" type="text" class="formfld unknown" size="5" value="<?=htmlspecialchars($pconfig['local_port']);?>"/> <br/> Set this option if you would like to bind to a specific port. - </td> - </tr> + </td> + </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Server host or address");?></td> <td width="78%" class="vtable"> diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php index c56bc81..9c45715 100644 --- a/usr/local/www/vpn_openvpn_server.php +++ b/usr/local/www/vpn_openvpn_server.php @@ -544,16 +544,14 @@ function netbios_change() { <select name="interface" class="formselect"> <?php $interfaces = get_configured_interface_with_descr(); - $carpips = find_number_of_needed_carp_interfaces(); - for ($i=0; $i<$carpips; $i++) { - $carpip = find_interface_ip("carp" . $i); - $interfaces['carp' . $i] = "CARP{$i} ({$carpip})"; - } foreach ($interfaces as $iface => $ifacename): + $selected = ""; + if ($iface == $pconfig['interface']) + $selected = "selected"; ?> - <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>> - <?=htmlspecialchars($ifacename);?> - </option> + <option value="<?=$iface;?>" <?=$selected;?>> + <?=htmlspecialchars($ifacename);?> + </option> <?php endforeach; ?> </select> <br> </td> |