diff options
Diffstat (limited to 'src')
27 files changed, 57 insertions, 45 deletions
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index cc8d137..a14bdcd 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -214,7 +214,7 @@ if (is_array($confvers)) { 'To view the differences between an older configuration and a newer configuration, ' . 'select the older configuration using the left column of radio options and select the newer configuration in the right column, ' . 'then press the "Diff" button.'), - 'info')?> + 'info', false)?> </div> </div> <?php diff --git a/src/usr/local/www/diag_sockets.php b/src/usr/local/www/diag_sockets.php index 5039d50..517e8c7 100644 --- a/src/usr/local/www/diag_sockets.php +++ b/src/usr/local/www/diag_sockets.php @@ -148,7 +148,7 @@ gettext('This page shows the output for the commands: "sockstat -4lL" and "socks '<dt>ADDRESS</dt> <dd>(UNIX sockets only) For bound sockets, this is the file-name of the socket. For other sockets, it is the name, PID and file descriptor number of the peer, or "(none)" if the socket is neither bound nor connected.</dd>' . '<dt>LOCAL ADDRESS</dt> <dd>(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).</dd>' . '<dt>FOREIGN ADDRESS</dt><dd>(Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)).</dd>' . - '</dl>'), 'info'); + '</dl>'), 'info', false); ?> </div> </div> diff --git a/src/usr/local/www/diag_tables.php b/src/usr/local/www/diag_tables.php index 4bd9319..1eaa306 100644 --- a/src/usr/local/www/diag_tables.php +++ b/src/usr/local/www/diag_tables.php @@ -163,9 +163,9 @@ if ($bogons || !empty($entries)) { <?php $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename) . '|cut -d"(" -f2|tr -d ")" '); if ($last_updated != "") { - print_info_box(gettext("Table last updated on ") . $last_updated, 'info'); + print_info_box(gettext("Table last updated on ") . $last_updated, 'info', false); } else { - print_info_box(gettext("Date of last update of table is unknown"), 'info'); + print_info_box(gettext("Date of last update of table is unknown"), 'info', false); } ?> </div> diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php index d0ff400..8a5b675 100644 --- a/src/usr/local/www/firewall_aliases.php +++ b/src/usr/local/www/firewall_aliases.php @@ -315,7 +315,7 @@ display_top_tabs($tab_array); <?=print_info_box(gettext('Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number ' . 'of changes that have to be made if a host, network or port changes. <br />' . 'You can enter the name of an alias instead of the host, network or port where indicated. The alias will be resolved according to the list above.' . '<br />' . - 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'), 'info')?> + 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'), 'info', false)?> </div> </div> diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php index 320bad4..e1859bb 100644 --- a/src/usr/local/www/firewall_nat_1to1.php +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -283,7 +283,7 @@ display_top_tabs($tab_array); gettext('If you add a 1:1 NAT entry for any of the interface IPs on this system, ' . 'it will make this system inaccessible on that IP address. i.e. if ' . 'you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) ' . - 'using the WAN IP address will no longer function.'), 'info')?> + 'using the WAN IP address will no longer function.'), 'info', false)?> </div> diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index cf61565..f5ab98f 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -670,7 +670,7 @@ endif; 'If disable outbound NAT is selected, no rules will be used.' . '<br />' . 'If a target address other than an interface\'s IP address is used, then depending on the way the WAN connection is setup, a ') . '<a href="firewall_virtual_ip.php">' . gettext("Virtual IP") . '</a>' . gettext(" may also be required."), - info); + 'info', false); ?> </div> diff --git a/src/usr/local/www/firewall_schedule.php b/src/usr/local/www/firewall_schedule.php index 53ee0f4..0f4ba12 100644 --- a/src/usr/local/www/firewall_schedule.php +++ b/src/usr/local/www/firewall_schedule.php @@ -280,7 +280,7 @@ endforeach; </nav> <div class="infoblock"> - <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), 'info')?> + <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php index f931b0f..079a8ce 100644 --- a/src/usr/local/www/firewall_shaper.php +++ b/src/usr/local/www/firewall_shaper.php @@ -507,7 +507,7 @@ if ($dfltmsg) { ?> <div> <div class="infoblock"> - <?=print_info_box($default_shaper_msg, 'info')?> + <?=print_info_box($default_shaper_msg, 'info', false)?> </div> </div> <?php diff --git a/src/usr/local/www/firewall_virtual_ip.php b/src/usr/local/www/firewall_virtual_ip.php index 037d2d2..3c5d0c8 100644 --- a/src/usr/local/www/firewall_virtual_ip.php +++ b/src/usr/local/www/firewall_virtual_ip.php @@ -366,7 +366,7 @@ endforeach; <div class="infoblock"> <?=print_info_box(gettext('The virtual IP addresses defined on this page may be used in ') . '<a href="firewall_nat.php">' . gettext('NAT') . '</a>' . gettext(' mappings.') . '<br />' . - gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="status_carp.php">' . gettext('here') . '</a>', 'info')?> + gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="status_carp.php">' . gettext('here') . '</a>', 'info', false)?> </div> <?php diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php index f8b02d3..9556b53 100644 --- a/src/usr/local/www/firewall_virtual_ip_edit.php +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -491,7 +491,7 @@ print($form); <div class="infoblock"> <?=print_info_box(gettext("Proxy ARP and Other type Virtual IPs cannot be bound to by anything running on the firewall, such as IPsec, OpenVPN, etc. Use a CARP or IP Alias type address for these types.") . '<br />' . - sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), 'info')?> + sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), 'info', false)?> </div> <script type="text/javascript"> diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index a7780c1..170215a 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -298,7 +298,7 @@ function verify_gzip_file($fname) { } } -function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning") { +function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning",$showbtn = true) { global $g; if (strpos($class, "alert-") !== 0) { @@ -319,7 +319,7 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl } $msg .= '</form>'; - } else { + } else if ($showbtn) { $msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'. $msg; } @@ -374,9 +374,8 @@ EOFnp; } -function print_info_box($msg, $class="alert-warning") { - print_info_box_np($msg, null, null, false, $class); - +function print_info_box($msg, $class="alert-warning", $showbtn = true) { + print_info_box_np($msg, null, null, false, $class, $showbtn); } function get_std_save_message($ok) { diff --git a/src/usr/local/www/interfaces_groups.php b/src/usr/local/www/interfaces_groups.php index d832809..90a992d 100644 --- a/src/usr/local/www/interfaces_groups.php +++ b/src/usr/local/www/interfaces_groups.php @@ -158,7 +158,7 @@ display_top_tabs($tab_array); <div class="infoblock"> <?=print_info_box(gettext('Interface Groups allow you to setup rules for multiple interfaces without duplicating the rules.<br />' . - 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'), 'info')?> + 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/interfaces_qinq.php b/src/usr/local/www/interfaces_qinq.php index de197ba..a7a47bf 100644 --- a/src/usr/local/www/interfaces_qinq.php +++ b/src/usr/local/www/interfaces_qinq.php @@ -185,7 +185,7 @@ endforeach; <div class="infoblock"> <?=print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q QinQ tagging properly. <br />On cards that do not explicitly support it, ' . 'QinQ tagging will still work, but the reduced MTU may cause problems.<br />' . - 'See the %s handbook for information on supported cards.'), $g['product_name']), 'info')?> + 'See the %s handbook for information on supported cards.'), $g['product_name']), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php index 4742b09..0f82756 100644 --- a/src/usr/local/www/interfaces_vlan.php +++ b/src/usr/local/www/interfaces_vlan.php @@ -174,7 +174,7 @@ display_top_tabs($tab_array); <?=print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '. 'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN '. 'tagging will still work, but the reduced MTU may cause problems.<br />See the '. - '%s handbook for information on supported cards.'), $g['product_name']), 'info')?> + '%s handbook for information on supported cards.'), $g['product_name']), 'info', false)?> </div> <script type="text/javascript"> //<![CDATA[ diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js index 61c6793..e2a871e 100644 --- a/src/usr/local/www/jquery/pfSenseHelpers.js +++ b/src/usr/local/www/jquery/pfSenseHelpers.js @@ -384,23 +384,36 @@ $('[id^=delete]').click(function(event) { alert('You may not delete the last row!'); }); -// "More information" handlers +// "More information" handlers -------------------------------------------------------------------- // If there is an infoblock, automatically add an info icon that toggles its display -if($('.infoblock,.infoblock_open,#infoblock').length != 0) { - $('.infoblock,.infoblock_open,#infoblock').before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7;; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo" title="More information"></i>'); +// If there is n=more than one infoblock on a page, each must use a unique class suffic. e.g.: infoblock_01 or infoblock_open_19 - // and remove the 'X' button from the last text box (Which we assume to be the infoblock) - $('.close :last').remove(); -} +$('[class^="infoblock"], [class^="infoblock_open"]').each(function() { + var classname = $(this).attr("class"); + var sfx = ''; + + if (classname.indexOf("infoblock_open")) { + sfx = classname.substr(15); + $(this).hide(); + } else { + sfx = "_" + classname.substr(10); + } + + $(this).before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo' + sfx + '" title="More information"></i>'); +}); // Hide information on page load -$('.infoblock,#infoblock').hide(); +//$('.infoblock,#infoblock').hide(); // Show the help on clicking the info icon -$('#showinfo').click(function() { - $('.infoblock,.infoblock_open,#infoblock').toggle(); +$('[id^="showinfo"]').click(function() { + var id = $(this).attr("id"); + var target = "infoblock" + id.substr(8); + + $('.' + target).toggle(); }); +// ------------------------------------------------------------------------------------------------ // Put a dummy row into any empty table to keep IE happy $('tbody').each(function(){ diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php index 5c7480f..86d6eb0 100644 --- a/src/usr/local/www/services_captiveportal_hostname.php +++ b/src/usr/local/www/services_captiveportal_hostname.php @@ -197,7 +197,7 @@ endif; </nav> <div class="infoblock"> - <?=print_info_box($notestr)?> + <?=print_info_box($notestr, 'info', false)?> </div> <?php diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php index ce3df1b..dab6cdf 100644 --- a/src/usr/local/www/services_captiveportal_ip.php +++ b/src/usr/local/www/services_captiveportal_ip.php @@ -194,7 +194,7 @@ endif; <div class="infoblock"> <?=print_info_box(gettext('Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. ' . - 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'), 'info')?> + 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php index 5ce5467..fca42ef 100644 --- a/src/usr/local/www/services_captiveportal_mac.php +++ b/src/usr/local/www/services_captiveportal_mac.php @@ -256,7 +256,7 @@ endif; </nav> <div class="infoblock"> - <?=print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'), 'info')?> + <?=print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'), 'info', false)?> </div> <?php include("foot.inc"); diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php index f909808..c46ffa7 100644 --- a/src/usr/local/www/services_dnsmasq.php +++ b/src/usr/local/www/services_dnsmasq.php @@ -342,7 +342,7 @@ $section->addInput(new Form_Textarea( $form->add($section); print($form); ?> -<div class="infoblock_open"> +<div class="infoblock_open_01"> <?php print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP". " service (if enabled) will automatically serve the LAN IP". @@ -354,7 +354,7 @@ print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP". " is checked. If you don't use that option (or if you use". " a static IP address on WAN), you must manually specify at". " least one DNS server on the %sSystem:". - "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'), 'info'); + "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'), 'info', false); ?> </div> @@ -433,10 +433,10 @@ endforeach; </a> </nav> -<div class="infoblock_open"> +<div class="infoblock_open_02"> <?php print_info_box(gettext("Entries in this section override individual results from the forwarders.") . - gettext("Use these for changing DNS results or for adding custom DNS records."), 'info'); + gettext("Use these for changing DNS results or for adding custom DNS records."), 'info', false); ?> </div> @@ -499,10 +499,10 @@ events.push(function() { // }); //]]> </script> -<div class="infoblock_open"> +<div class="infoblock_open_03"> <?php print_info_box(gettext("Entries in this area override an entire domain, and subdomains, by specifying an". - " authoritative DNS server to be queried for that domain."), 'info'); + " authoritative DNS server to be queried for that domain."), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php index 7790200..89ddf68 100644 --- a/src/usr/local/www/services_igmpproxy.php +++ b/src/usr/local/www/services_igmpproxy.php @@ -185,7 +185,7 @@ endforeach; <div class="infoblock"> <?=print_info_box(gettext('Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. ' . - 'Only one "upstream" interface can be configured.'), 'info')?> + 'Only one "upstream" interface can be configured.'), 'info', false)?> </div> <?php include("foot.inc"); diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php index ed445a0..92b0c2f 100644 --- a/src/usr/local/www/services_unbound.php +++ b/src/usr/local/www/services_unbound.php @@ -550,7 +550,7 @@ endforeach; " entered in %sSystem: General setup%s". " or those obtained via DHCP or PPP on WAN if "Allow". " DNS server list to be overridden by DHCP/PPP on WAN"". - " is checked."), '<a href="system.php">', '</a>'), 'info')?> + " is checked."), '<a href="system.php">', '</a>'), 'info', false)?> </div> <?php include("foot.inc"); diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php index 644ab5b..007a621 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -353,7 +353,7 @@ if (!$rawfilter) { <?php print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' . gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR' . '<br />' . - '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve'); + '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve', 'info', false); ?> </div> diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php index c72b2f8..4a8b6d6 100755 --- a/src/usr/local/www/status_logs_filter_dynamic.php +++ b/src/usr/local/www/status_logs_filter_dynamic.php @@ -480,7 +480,7 @@ if ($tcpcnt > 0) { <div class="infoblock"> <?php print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' . - gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR'); + gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR', 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_logs_filter_summary.php b/src/usr/local/www/status_logs_filter_summary.php index a4c7d03..9830167 100644 --- a/src/usr/local/www/status_logs_filter_summary.php +++ b/src/usr/local/www/status_logs_filter_summary.php @@ -158,7 +158,7 @@ $infomsg = sprintf(gettext('This is a summary of the last %1$s lines of the fire ?> <div> <div class="infoblock_open"> - <?=print_info_box($infomsg, 'info');?> + <?=print_info_box($infomsg, 'info', false);?> </div> </div> diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php index c4c98b0..8240de1 100644 --- a/src/usr/local/www/system_gateway_groups.php +++ b/src/usr/local/www/system_gateway_groups.php @@ -204,7 +204,7 @@ endforeach; <div class="infoblock"> <?=print_info_box(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' . 'or policy-based routing.' . '<br />' . - 'Without rules directing traffic into the Gateway Groups, they will not be used.'), 'info')?> + 'Without rules directing traffic into the Gateway Groups, they will not be used.'), 'info', false)?> </div> <?php include("foot.inc"); diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index 825c47f..33c0658 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -549,7 +549,7 @@ foreach ($a_user as $i => $userent): "Some system object properties can be modified but they cannot be deleted.") . '<br /><br />' . gettext("Accounts added here are also used for other parts of the system " . - "such as OpenVPN, IPsec, and Captive Portal."), 'info')?> + "such as OpenVPN, IPsec, and Captive Portal."), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php index 41cdd0c..27034b7 100644 --- a/src/usr/local/www/vpn_ipsec.php +++ b/src/usr/local/www/vpn_ipsec.php @@ -565,7 +565,7 @@ display_top_tabs($tab_array); <?=print_info_box('<strong>' . gettext("Note:") . '</strong><br />' . gettext("You can check your IPsec status at ") . '<a href="status_ipsec.php">' . gettext("Status:IPsec") . '</a>.<br />' . gettext("IPsec Debug Mode can be enabled at ") . '<a href="vpn_ipsec_settings.php">' .gettext("VPN:IPsec:Advanced Settings") . '</a>.<br />' . - gettext("IPsec can be set to prefer older SAs at ") . '<a href="vpn_ipsec_settings.php">' . gettext("VPN:IPsec:Advanced Settings") . '</a>', 'info')?> + gettext("IPsec can be set to prefer older SAs at ") . '<a href="vpn_ipsec_settings.php">' . gettext("VPN:IPsec:Advanced Settings") . '</a>', 'info', false)?> </div> <script type="text/javascript"> |