mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Merge pull request #803 from kondurake/patch-5
Fix "Parsing error" if a NAT IP is specified
This commit is contained in:
commit
9cae6988b5
1 changed files with 4 additions and 9 deletions
|
@ -65,15 +65,10 @@
|
||||||
<td>
|
<td>
|
||||||
<select class="vst-list" name="v_ip">
|
<select class="vst-list" name="v_ip">
|
||||||
<?php
|
<?php
|
||||||
foreach ($ips as $key => $value) {
|
foreach ($ips as $ip => $value) {
|
||||||
$display_ip = $key;
|
$display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$ip} → {$value['NAT']}");
|
||||||
if (!empty($value['NAT'])) $display_ip = $value['NAT'];
|
$ip_selected = ((!empty($v_ip) && $ip == $v_ip) || $v_ip == "'{$ip}'") ? 'selected' : '';
|
||||||
$skey = "'".$display_ip."'";
|
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{$ip}\" {$ip_selected}>{$display_ip}</option>\n";
|
||||||
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($display_ip)."\"";
|
|
||||||
if ((!empty($v_ip)) && ( $display_ip == $v_ip ) || ( $skey == $v_ip )){
|
|
||||||
echo ' selected';
|
|
||||||
}
|
|
||||||
echo ">".htmlentities($display_ip)."</option>\n";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue