diff options
author | Bill Marquette <billm@pfsense.org> | 2005-07-14 00:11:54 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-07-14 00:11:54 +0000 |
commit | 8ce9faa15ed0cbdf91b91fc268accf4dab718faf (patch) | |
tree | b532eebc764e331402e27714741778a927915a1e /usr | |
parent | c153d430150e3dc7f3c001f8d186756fb7f669e1 (diff) | |
download | pfsense-8ce9faa15ed0cbdf91b91fc268accf4dab718faf.zip pfsense-8ce9faa15ed0cbdf91b91fc268accf4dab718faf.tar.gz |
Allow CARP to have a netmask and dynamically change info text next to netmask option
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 9a9a5ee..f0bcf58 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -179,23 +179,39 @@ function get_radio_value(obj) return null; } function enable_change(enable_over) { + var note = document.getElementById("typenote"); + var carpnote = document.createTextNode("This should be the correct netmask."); + var proxyarpnote = document.createTextNode("This is a CIDR block of proxy ARP addresses."); if ((get_radio_value(document.iform.mode) == "carp") || enable_over) { document.iform.vhid.disabled = 0; document.iform.password.disabled = 0; document.iform.advskew.disabled = 0; document.iform.type.disabled = 1; + document.iform.subnet_bits.disabled = 0; + if (note.firstChild == null) { + note.appendChild(carpnote); + } else { + note.removeChild(note.firstChild); + note.appendChild(carpnote); + } } else { document.iform.vhid.disabled = 1; document.iform.password.disabled = 1; document.iform.advskew.disabled = 1; document.iform.type.disabled = 0; + if (note.firstChild == null) { + note.appendChild(proxyarpnote); + } else { + note.removeChild(note.firstChild); + note.appendChild(proxyarpnote); + } } } function typesel_change() { switch (document.iform.type.selectedIndex) { case 0: // single document.iform.subnet.disabled = 0; - document.iform.subnet_bits.disabled = 1; + if((get_radio_value(document.iform.mode) == "proxyarp")) document.iform.subnet_bits.disabled = 1; document.iform.range_from.disabled = 1; document.iform.range_to.disabled = 1; break; @@ -270,7 +286,7 @@ function typesel_change() { <?=$i;?> </option> <?php endfor; ?> - </select> + </select> <i id="typenote"></i> </td> </tr> <tr> |