diff options
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 4e257ac..d28d55c 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -297,6 +297,15 @@ function enable_change() { case "proxyarp": set_note(proxyarpnote); break; default: set_note(undefined); } + interface_change(); +} + +function interface_change() { + if (get_radio_value(document.iform.mode) == "carp") { + var ifname = document.iform.interface.options[document.iform.interface.selectedIndex].value + "_subnet"; + document.iform.subnet_bits.value = document.getElementById(ifname).value; + } + typesel_change(); } @@ -359,7 +368,7 @@ function typesel_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td> <td width="78%" class="vtable"> - <select name="interface" class="formselect"> + <select name="interface" class="formselect" onclick="interface_change()"> <?php $interfaces = get_configured_interface_with_descr(false, true); $carplist = get_configured_carp_interface_list(); @@ -373,6 +382,10 @@ function typesel_change() { </select> </td> </tr> + <?php + foreach ($interfaces as $iface => $ifacename) + print '<input id="' . $iface . '_subnet" type="hidden" value="' . get_interface_subnet($iface) . '">' . "\n"; + ?> <tr> <td valign="top" class="vncellreq"><?=gettext("IP Address(es)");?></td> <td class="vtable"> |