diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-15 07:48:09 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-15 07:48:09 -0500 |
commit | 0ac8bd05cf7080720e42a2336e7a5e5355b61dc9 (patch) | |
tree | 8b3802a2a7bcb98b29e4d8830cbeec0078c9994b /src/usr/local/www/interfaces.php | |
parent | aa6542f19669da277b2e7488ab5d8b8057035281 (diff) | |
parent | aa82505e6577c28894150a6fb53c58f914930331 (diff) | |
download | pfsense-0ac8bd05cf7080720e42a2336e7a5e5355b61dc9.zip pfsense-0ac8bd05cf7080720e42a2336e7a5e5355b61dc9.tar.gz |
Merge pull request #2234 from phil-davis/r007
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rw-r--r-- | src/usr/local/www/interfaces.php | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 6344388..5f5ce62 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -466,7 +466,7 @@ if ($_POST['apply']) { } else { interface_bring_down($ifapply, true, $ifcfgo); if (isset($config['dhcpd'][$ifapply]['enable']) || - isset($config['dhcpdv6'][$ifapply]['enable'])) { + isset($config['dhcpdv6'][$ifapply]['enable'])) { services_dhcpd_configure(); } } @@ -675,8 +675,8 @@ if ($_POST['apply']) { continue; } if ($config['interfaces'][$ifent]['ipaddrv6'] == 'track6' && - $config['interfaces'][$ifent]['track6-interface'] == $_POST['track6-interface'] && - $config['interfaces'][$ifent]['track6-prefix-id'] == $track6_prefix_id) { + $config['interfaces'][$ifent]['track6-interface'] == $_POST['track6-interface'] && + $config['interfaces'][$ifent]['track6-prefix-id'] == $track6_prefix_id) { $input_errors[] = sprintf(gettext("This track6 prefix ID is already being used in %s."), $ifdescr); } } @@ -784,12 +784,12 @@ if ($_POST['apply']) { $input_errors[] = gettext("The idle timeout value must be an integer."); } if ($_POST['pppoe_resethour'] != "" && !is_numericint($_POST['pppoe_resethour']) && - $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) { - $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23)."); + $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) { + $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23)."); } if ($_POST['pppoe_resetminute'] != "" && !is_numericint($_POST['pppoe_resetminute']) && - $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) { - $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59)."); + $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) { + $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59)."); } if ($_POST['pppoe_resetdate'] != "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) { $input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy)."); @@ -1670,15 +1670,18 @@ function build_gatewayv6_list() { include("head.inc"); -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); +} -if (is_subsystem_dirty('interfaces')) +if (is_subsystem_dirty('interfaces')) { print_info_box_np(sprintf(gettext("The %s configuration has been changed."), $wancfg['descr']) . "<br />" . gettext("You must apply the changes in order for them to take effect. Don't forget to adjust the DHCP Server range if needed after applying.")); +} -if ($savemsg) +if ($savemsg) { print_info_box($savemsg, 'success'); +} $form = new Form(new Form_Button( @@ -2729,8 +2732,9 @@ if (isset($wancfg['wireless'])) { } } - if (count($mode_list) == 1) + if (count($mode_list) == 1) { $mode_list[''] = ''; + } $section->addInput(new Form_Select( 'standard', @@ -2746,9 +2750,7 @@ if (isset($wancfg['wireless'])) { $pconfig['protmode'], ['off' => 'Off', 'cts' => 'CTS to self', 'rtscts' => 'RTS and CTS'] ))->setHelp('For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network.'); - } - else - { + } else { $section->addInput(new Form_Input( 'protmode', null, @@ -3086,7 +3088,7 @@ $section->addInput(new Form_Checkbox( ' as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network ' . 'lies in such a private address space, too.'); - $section->addInput(new Form_Checkbox( +$section->addInput(new Form_Checkbox( 'blockbogons', 'Block bogon networks', '', @@ -3177,7 +3179,7 @@ print($form); <script type="text/javascript"> //<![CDATA[ -events.push(function(){ +events.push(function() { function updateType(t) { switch (t) { @@ -3220,8 +3222,9 @@ events.push(function(){ } function updateTypeSix(t) { - if (!isNaN(t[0])) + if (!isNaN(t[0])) { t = '_' + t; + } switch (t) { case "none": { @@ -3333,8 +3336,7 @@ events.push(function(){ $("#newgateway").modal('hide'); } - function addOption(selectbox, text, value) - { + function addOption(selectbox, text, value) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; @@ -3365,8 +3367,7 @@ events.push(function(){ } - function addOption_v6(selectbox, text, value) - { + function addOption_v6(selectbox, text, value) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; @@ -3505,7 +3506,7 @@ events.push(function(){ var adv = $('#dhcpadv').prop('checked'); var ovr = $('#dhcpovr').prop('checked'); - if(ovr) { + if (ovr) { hideInput('dhcphostname', true); hideIpAddress('alias-address', true); hideInput('dhcprejectfrom', true); @@ -3544,12 +3545,12 @@ events.push(function(){ updateType($('#type').val()); updateTypeSix($('#type6').val()); show_reset_settings($('#pppoe-reset-type').val()); - $("#add").prop('type' ,'button'); - $("#cnx").prop('type' ,'button'); - $("#addgw").prop('type' ,'button'); - $("#add6").prop('type' ,'button'); - $("#cnx6").prop('type' ,'button'); - $("#addgw6").prop('type' ,'button'); + $("#add").prop('type', 'button'); + $("#cnx").prop('type', 'button'); + $("#addgw").prop('type', 'button'); + $("#add6").prop('type', 'button'); + $("#cnx6").prop('type', 'button'); + $("#addgw6").prop('type', 'button'); hideClass('dhcp6advanced', true); hideClass('dhcpadvanced', true); show_dhcp6adv(); @@ -3557,24 +3558,25 @@ events.push(function(){ // Set preset buttons on page load var sv = "<?=htmlspecialchars($pconfig['adv_dhcp_pt_values']);?>"; - if(sv == "") + if (sv == "") { $("input[name=adv_dhcp_pt_values][value='SavedCfg']").prop('checked', true); + } // Set preset from value setPresets(sv); - + // ---------- Click checkbox handlers --------------------------------------------------------- $('#type').on('change', function() { - updateType( this.value ); + updateType(this.value); }); $('#type6').on('change', function() { - updateTypeSix( this.value ); + updateTypeSix(this.value); }); $('#pppoe-reset-type').on('change', function() { - show_reset_settings( this.value ); + show_reset_settings(this.value); }); $("#add").click(function() { |