From 79a1a27f2c22e6b47e1dea3f49d821f99ad22d8f Mon Sep 17 00:00:00 2001 From: NOYB Date: Sun, 14 Feb 2016 00:01:10 -0800 Subject: Interfaces - DHCP Advanced Options Tweaks Lease requirements and requests typically contain large lists of options. Set the field width to use the available section space. Apply a few tweaks for better clarity and consistency between DHCP and DHCPv6. Include a more information link specific to each advanced panel. --- src/usr/local/www/interfaces.php | 67 +++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 637492b..8463f3f 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -1905,16 +1905,16 @@ $group = new Form_Group('Options'); $group->add(new Form_Checkbox( 'dhcpadv', null, - 'Show DHCP advanced options', + 'Advanced Configuration', false -)); +))->setHelp('Use advanced DHCP configuration options.'); $group->add(new Form_Checkbox( 'dhcpovr', null, - 'Config file override', + 'Configuration Override', false -)); +))->setHelp('Override the configuration from this file.'); $section->add($group); @@ -2023,16 +2023,16 @@ $group->add(new Form_Checkbox( ))->displayAsRadio(); $group->setHelp('The values in these fields are DHCP protocol timings used when requesting a lease.' . '
' . - '' . 'See here more information' . ''); + '' . 'See here more information' . ''); $section->add($group); $section->addInput(new Form_Input( 'adv_dhcp_config_file_override_path', - 'Config file override', + 'Configuration File Override', 'text', $pconfig['adv_dhcp_config_file_override_path'] -))->sethelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '
' . +))->setWidth(9)->sethelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '
' . 'Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '
' . 'Where C is U(pper) or L(ower) Case, and D is ":-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '
' . 'Some ISPs may require certain options be or not be sent.'); @@ -2047,7 +2047,7 @@ $section->addInput(new Form_Input( 'Send options', 'text', $pconfig['adv_dhcp_send_options'] -))->sethelp('The values in this field are DHCP options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '
' . +))->setWidth(9)->sethelp('The values in this field are DHCP options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '
' . 'Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '
' . 'Where C is U(pper) or L(ower) Case, and D is " :-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '
' . 'Some ISPs may require certain options be or not be sent.'); @@ -2057,7 +2057,7 @@ $section->addInput(new Form_Input( 'Request options', 'text', $pconfig['adv_dhcp_request_options'] -))->sethelp('The values in this field are DHCP option 55 to be sent when requesting a DHCP lease. [option [, ...]]' . '
' . +))->setWidth(9)->sethelp('The values in this field are DHCP option 55 to be sent when requesting a DHCP lease. [option [, ...]]' . '
' . 'Some ISPs may require certain options be or not be requested.'); $section->addInput(new Form_Input( @@ -2065,15 +2065,16 @@ $section->addInput(new Form_Input( 'Require options', 'text', $pconfig['adv_dhcp_required_options'] -))->sethelp('The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]]'); +))->setWidth(9)->sethelp('The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]]'); $section->addInput(new Form_Input( 'adv_dhcp_option_modifiers', 'Option modifiers', 'text', $pconfig['adv_dhcp_option_modifiers'] -))->sethelp('The values in this field are DHCP option modifiers applied to obtained DHCP lease. [modifier option declaration [, ...]]' . '
' . - 'modifiers: (default, supersede, prepend, append)'); +))->setWidth(9)->sethelp('The values in this field are DHCP option modifiers applied to obtained DHCP lease. [modifier option declaration [, ...]]' . '
' . + 'modifiers: (default, supersede, prepend, append)' . '
' . + '' . 'See here more information' . ''); $form->add($section); @@ -2082,21 +2083,23 @@ $form->add($section); $section = new Form_Section('DHCP6 Client Configuration'); $section->addClass('dhcp6'); -$section->addInput(new Form_Checkbox( +$group = new Form_Group('Options'); + +$group->add(new Form_Checkbox( 'adv_dhcp6_config_advanced', - 'Advanced', - 'Show DHCPv6 advanced options', - $pconfig['adv_dhcp6_config_advanced'], - 'Selected' -)); + null, + 'Advanced Configuration', + false +))->setHelp('Use advanced DHCPv6 configuration options.'); -$section->addInput(new Form_Checkbox( +$group->add(new Form_Checkbox( 'adv_dhcp6_config_file_override', - 'Config file override', - 'Override the configuration from this file', - $pconfig['adv_dhcp6_config_file_override'], - 'Selected' -)); + null, + 'Configuration Override', + false +))->setHelp('Override the configuration from this file.'); + +$section->add($group); $section->addInput(new Form_Checkbox( 'dhcp6usev4iface', @@ -2138,9 +2141,9 @@ $section->addInput(new Form_Input( 'Configuration File Override', 'text', $pconfig['adv_dhcp6_config_file_override_path'] -))->setHelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '
' . +))->setWidth(9)->setHelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '
' . 'Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '
' . - 'Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none).' . '
' . + 'Where C is U(pper) or L(ower) Case, and D is " :-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '
' . 'Some ISPs may require certain options be or not be sent.'); $form->add($section); @@ -2153,17 +2156,17 @@ $section->addClass('dhcp6advanced'); $section->addInput(new Form_Checkbox( 'adv_dhcp6_interface_statement_information_only_enable', 'Information only', - null, + 'Exchange Information Only', $pconfig['adv_dhcp6_interface_statement_information_only_enable'], 'Selected' -)); +))->setHelp('Only exchange informational configuration parameters with servers.'); $section->addInput(new Form_Input( 'adv_dhcp6_interface_statement_send_options', 'Send options', 'text', $pconfig['adv_dhcp6_interface_statement_send_options'] -))->sethelp('DHCP send options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '
' . +))->setWidth(9)->sethelp('DHCP send options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '
' . 'Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '
' . 'Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none).' . '
' . 'Some DHCP services may require certain options be or not be sent.'); @@ -2173,7 +2176,7 @@ $section->addInput(new Form_Input( 'Request Options', 'text', $pconfig['adv_dhcp6_interface_statement_request_options'] -))->sethelp('DHCP request options to be sent when requesting a DHCP lease. [option [, ...]]' . '
' . +))->setWidth(9)->sethelp('DHCP request options to be sent when requesting a DHCP lease. [option [, ...]]' . '
' . 'Some DHCP services may require certain options be or not be requested.'); $section->addInput(new Form_Input( @@ -2181,7 +2184,7 @@ $section->addInput(new Form_Input( 'Scripts', 'text', $pconfig['adv_dhcp6_interface_statement_script'] -))->sethelp('Absolute path to a script invoked on certain conditions including when a reply message is received.' . '
' . +))->setWidth(9)->sethelp('Absolute path to a script invoked on certain conditions including when a reply message is received.' . '
' . '[/[dirname/[.../]]filename[.ext]].'); $group = new Form_Group('Identity Association Statement'); @@ -2354,6 +2357,8 @@ $group->add(new Form_Input( $pconfig['adv_dhcp6_key_info_statement_expire'] ))->sethelp('Expire'); +$group->setHelp('' . 'See here more information' . ''); + $section->add($group); $form->add($section); -- cgit v1.1