diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-03-21 16:40:22 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-03-21 16:40:22 +0100 |
commit | 656f17638f5f72ecf218a7b23228be9b54c18353 (patch) | |
tree | ebce415f9e7a14aca7dc1cb44fbbb117df4f2412 /usr/local | |
parent | 5ceb19429be99993a905dab84ed060a1e8e3df41 (diff) | |
download | pfsense-656f17638f5f72ecf218a7b23228be9b54c18353.zip pfsense-656f17638f5f72ecf218a7b23228be9b54c18353.tar.gz |
Correct typo in array name. Add select box for operating mode of rtadvd and dhcpv6 combination
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/services_dhcpv6.php | 15 | ||||
-rw-r--r-- | usr/local/www/services_dhcpv6_edit.php | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/usr/local/www/services_dhcpv6.php b/usr/local/www/services_dhcpv6.php index 7d00b0c..701d87e 100644 --- a/usr/local/www/services_dhcpv6.php +++ b/usr/local/www/services_dhcpv6.php @@ -138,6 +138,7 @@ if (is_array($config['dhcpdv6'][$if])){ $pconfig['range_from'] = $config['dhcpdv6'][$if]['range']['from']; $pconfig['range_to'] = $config['dhcpdv6'][$if]['range']['to']; } + $pconfig['mode'] = $config['dhcpdv6'][$if]['mode']; $pconfig['deftime'] = $config['dhcpdv6'][$if]['defaultleasetime']; $pconfig['maxtime'] = $config['dhcpdv6'][$if]['maxleasetime']; $pconfig['gateway'] = $config['dhcpdv6'][$if]['gateway']; @@ -190,6 +191,8 @@ function is_inrange($test, $start, $end) { return false; } +$modes = array("unmanaged" => "Unmanaged", "managed" => "Managed", "assist" => "Assisted"); + if ($_POST) { unset($input_errors); @@ -304,6 +307,7 @@ if ($_POST) { if (!is_array($config['dhcpdv6'][$if]['range'])) $config['dhcpdv6'][$if]['range'] = array(); + $config['dhcpdv6'][$if]['mode'] = $_POST['mode']; $config['dhcpdv6'][$if]['range']['from'] = $_POST['range_from']; $config['dhcpdv6'][$if]['range']['to'] = $_POST['range_to']; $config['dhcpdv6'][$if]['defaultleasetime'] = $_POST['deftime']; @@ -415,7 +419,7 @@ include("head.inc"); <script type="text/javascript" language="JavaScript"> function enable_change(enable_over) { var endis; - endis = !(document.iform.enable.checked || enable_over); + endis = !(document.iform.enable.checked || enable_over || (document.iform.mode.select == "unmanaged")); document.iform.range_from.disabled = endis; document.iform.range_to.disabled = endis; document.iform.dns1.disabled = endis; @@ -536,6 +540,15 @@ include("head.inc"); "interface"),htmlspecialchars($iflist[$if]));?></strong></td> </tr> <tr> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Operating Mode");?></td> + <td width="78%" class="vtable"> + <select name="mode" id="mode"> + <?php foreach($modes as $name => $value) { ?> + <option value="<?=$name ?>" <?php if ($pconfig['mode'] == $name) echo "selected"; ?> > <?=$value ?></option> + <?php } ?> + <strong><?php printf(gettext("Select the Operating Mode. Use Unmanaged for Router Advertising only, Managed for DHCPv6 only, Assisted for Combined"));?></strong></td> + </tr> + <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked"; ?>> diff --git a/usr/local/www/services_dhcpv6_edit.php b/usr/local/www/services_dhcpv6_edit.php index bc51f83..5ff0dcf 100644 --- a/usr/local/www/services_dhcpv6_edit.php +++ b/usr/local/www/services_dhcpv6_edit.php @@ -48,7 +48,7 @@ function staticmapcmp($a, $b) { function staticmaps_sort($ifgui) { global $g, $config; - usort($config['dhcpd'][$ifgui]['staticmap'], "staticmapcmp"); + usort($config['dhcpdv6'][$ifgui]['staticmap'], "staticmapcmp"); } require_once('globals.inc'); |