diff options
Diffstat (limited to 'src/usr/local/www')
75 files changed, 504 insertions, 394 deletions
diff --git a/src/usr/local/www/bootstrap/css/pfSense-BETA.css b/src/usr/local/www/bootstrap/css/pfSense-BETA.css index 488a32b..7047033 100644 --- a/src/usr/local/www/bootstrap/css/pfSense-BETA.css +++ b/src/usr/local/www/bootstrap/css/pfSense-BETA.css @@ -13,6 +13,3 @@ letter-spacing: 1px; } -.panel-title { - font-size: 16px; -} diff --git a/src/usr/local/www/bootstrap/css/pfSense-dark.css b/src/usr/local/www/bootstrap/css/pfSense-dark.css index 57ce484..b550ad5 100644 --- a/src/usr/local/www/bootstrap/css/pfSense-dark.css +++ b/src/usr/local/www/bootstrap/css/pfSense-dark.css @@ -347,4 +347,8 @@ input, select, textarea { /* tree css */ ul.tree li A:link, ul.tree li A:hover, ul.tree li A:visited { color : #ffffff; +} + +textarea { + background-color: #bfbfbf; }
\ No newline at end of file diff --git a/src/usr/local/www/bootstrap/css/pfSense.css b/src/usr/local/www/bootstrap/css/pfSense.css index f265937..00865ee 100644 --- a/src/usr/local/www/bootstrap/css/pfSense.css +++ b/src/usr/local/www/bootstrap/css/pfSense.css @@ -1,5 +1,4 @@ @import url("/bootstrap/css/bootstrap.min.css"); -@import url("/bootstrap/glyphicons/glyphicons-halflings.css"); @import url("/bootstrap/fonts/roboto.css"); html { @@ -194,7 +193,7 @@ ul.context-links li a { } .panel-title { - font-size: 20px; + font-size: 16px; } .panel-body { @@ -550,8 +549,9 @@ footer a { color: white; padding-right: 15px; padding-bottom: 17px; - margin-top: -0.125em - + margin-top: -0.125em; + width: 14px; + height: 14px } /* Used when you need an icon to act as a submit button **/ @@ -785,4 +785,14 @@ ul.tree li .over{ /** Override text-warning with something less red. */ .text-warning { color: #ffcc00; -}
\ No newline at end of file +} + +/**Suppress href links when printing */ +a[href]:after { + content:normal +} + +/** Text color for diff display when comapring configs */ +.diff-text { + color: #000000; +} diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index 733ffa7..7d412df 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -173,7 +173,7 @@ if ($diff) { } ?> <tr> - <td valign="middle" bgcolor="<?=$color; ?>" style="white-space: pre-wrap;"><?=htmlentities($line)?></td> + <td class="diff-text" valign="middle" bgcolor="<?=$color; ?>" style="white-space: pre-wrap;"><?=htmlentities($line)?></td> </tr> <?php } diff --git a/src/usr/local/www/diag_reboot.php b/src/usr/local/www/diag_reboot.php index b347d30..d00ee82 100755 --- a/src/usr/local/www/diag_reboot.php +++ b/src/usr/local/www/diag_reboot.php @@ -94,7 +94,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //<![CDATA[ events.push(function() { - var timeoutmsg = '<h4><?=gettext("Rebooting");?><br /><?=gettext("Page will automatically reload in ");?>'; var time = 0; function checkonline() { @@ -109,12 +108,17 @@ events.push(function() { function startCountdown() { setInterval(function() { + if (time == "<?=$guitimeout?>") { + $('#countdown').html('<h4><?=sprintf(gettext("Rebooting%sPage will automatically reload in %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>'); + } + if (time > 0) { - $('#countdown').html(timeoutmsg + time + ' <?=gettext("seconds");?>.</h4>'); + $('#secs').html(time); time--; } else { time = "<?=$guiretry?>"; - timeoutmsg = '<h4><?=gettext("Not yet ready");?><br /><?=gettext("Retrying in another ");?>'; + $('#countdown').html('<h4><?=sprintf(gettext("Not yet ready%s Retrying in another %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>'); + $('#secs').html(time); checkonline(); } }, 1000); diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index 18c9bbe..9847280 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -301,6 +301,7 @@ if (isset($config['interfaces'][$if]['blockbogons'])) { } ?> + <form method="post"> <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=gettext("Rules (Drag to change order)")?></h2></div> @@ -711,7 +712,7 @@ for ($i = 0; isset($a_filter[$i]); $i++): if ($rulesep['row']['0'] == "fr" . $nrules) { $cellcolor = $rulesep['color']; print('<tr class="ui-sortable-handle separator">' . - '<td class="' . $cellcolor . '" colspan="11">' . '<font class="' . $cellcolor . '">' . $rulesep['text'] . '</font></td>' . + '<td class="' . $cellcolor . '" colspan="11">' . '<span class="' . $cellcolor . '">' . $rulesep['text'] . '</span></td>' . '<td class="' . $cellcolor . '"><a href="#"><i class="fa fa-trash no-confirm sepdel" title="delete this separator"></i></a></td>' . '</tr>' . "\n"); } @@ -874,7 +875,7 @@ events.push(function() { var septext = escapeHtml($('#newsep').val()); $('#ruletable > tbody:last >tr:last').remove(); $('#ruletable > tbody:last').append('<tr class="ui-sortable-handle separator">' + - '<td class="' + gColor + '" colspan="11">' + '<font class="' + gColor + '">' + septext + '</font></td>' + + '<td class="' + gColor + '" colspan="11">' + '<span class="' + gColor + '">' + septext + '</span></td>' + '<td class="' + gColor + '"><a href="#"><i class="fa fa-trash sepdel"></i></a>' + '</td></tr>'); @@ -974,3 +975,4 @@ events.push(function() { </script> <?php include("foot.inc");?> + diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 1572855..dc638f3 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1875,6 +1875,10 @@ events.push(function() { ext_change(); }); + $('#save').on('click', function() { + disableInput('save'); + }); + $('#dstbeginport').on('change', function() { dst_rep_change(); ext_change(); diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php index 1ac8c2d..837d200 100644 --- a/src/usr/local/www/firewall_shaper.php +++ b/src/usr/local/www/firewall_shaper.php @@ -430,7 +430,7 @@ if ($savemsg) { } if (is_subsystem_dirty('shaper')) { - print_apply_box(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The traffic shaper configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/firewall_shaper_queues.php b/src/usr/local/www/firewall_shaper_queues.php index 6586104..9e751c9 100644 --- a/src/usr/local/www/firewall_shaper_queues.php +++ b/src/usr/local/www/firewall_shaper_queues.php @@ -236,7 +236,7 @@ if ($savemsg) { } if (is_subsystem_dirty('shaper')) { - print_apply_box(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The traffic shaper configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php index 35a366f..ccea421 100644 --- a/src/usr/local/www/firewall_shaper_vinterface.php +++ b/src/usr/local/www/firewall_shaper_vinterface.php @@ -408,7 +408,7 @@ if ($savemsg) { } if (is_subsystem_dirty('shaper')) { - print_apply_box(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The traffic shaper configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index 2a55405..175f540 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -308,10 +308,11 @@ function verify_gzip_file($fname) { } // print_info_box() has been updated so that any required button is explicitly created, rather than relying on the detection of certain -// strings in the message (such as "apply"). print_info_box_np() has been exterminated -// $class = the botstrap style class (default, info, warning, success, danger) -// $btnname and btntext describe the optional button and its display text -// Note that there is a shortcut function 26 lines south of here that creats a standard "apply" box for you. In may cases just substitute that for print_info_box_np() +// strings in the message (such as "apply"). print_info_box_np() has been exterminated. +// $class = the bootstrap style class (default, info, warning, success, danger) +// $btnname and btntext describe the optional button and its display text, the default is an 'x' Close button. +// Note that there is also a shortcut function print_apply_box here that creates a standard "apply" box for you. +// In many cases just substitute that for print_info_box_np() to easily get a warning style "Apply changes" box. function print_info_box($msg, $class="alert-warning", $btnname = "close", $btntext = "") { if (strpos($class, "alert-") !== 0) { diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index e2b9c9b..015b3f9 100755 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -125,6 +125,14 @@ if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == " $pagename = $xmlfile[1]; } } +} else if ($pagename == "status_logs.php") { + $param_split = explode('&', $uri_split[2]); + foreach ($param_split as $param) { + if (substr($param, 0, 8) == "logfile=") { + $logtype = explode('=', $param); + $pagename .= '-' . $logtype[1]; + } + } } // Build the full help URL. diff --git a/src/usr/local/www/help.php b/src/usr/local/www/help.php index 485e33f..723f060 100644 --- a/src/usr/local/www/help.php +++ b/src/usr/local/www/help.php @@ -99,18 +99,22 @@ $helppages = array( 'diag_dump_states.php' => 'https://doc.pfsense.org/index.php/Show_States', 'diag_resetstate.php' => 'https://doc.pfsense.org/index.php/Reset_States', 'status_logs.php' => 'https://doc.pfsense.org/index.php/System_Logs', - 'diag_logs_auth.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Authentication_Logs', - 'diag_logs_dhcp.php' => 'https://doc.pfsense.org/index.php/DHCP_Logs', + 'status_logs.php-dhcpd' => 'https://doc.pfsense.org/index.php/DHCP_Logs', + 'status_logs.php-gateways' => 'https://doc.pfsense.org/index.php/Gateway_Logs', + 'status_logs.php-ipsec' => 'https://doc.pfsense.org/index.php/IPsec_Logs', + 'status_logs.php-ntpd' => 'https://doc.pfsense.org/index.php/NTP_Logs', + 'status_logs.php-openvpn' => 'https://doc.pfsense.org/index.php/OpenVPN_Logs', + 'status_logs.php-portalauth' => 'https://doc.pfsense.org/index.php/Captive_Portal_Authentication_Logs', + 'status_logs.php-ppp' => 'https://doc.pfsense.org/index.php/PPP_Logs', + 'status_logs.php-relayd' => 'https://doc.pfsense.org/index.php/Load_Balancer_Logs', + 'status_logs.php-resolver' => 'https://doc.pfsense.org/index.php/Resolver_Logs', + 'status_logs.php-routing' => 'https://doc.pfsense.org/index.php/Routing_Logs', + 'status_logs.php-wireless' => 'https://doc.pfsense.org/index.php/Wireless_Logs', 'status_logs_filter.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', 'status_logs_filter_dynamic.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', 'status_logs_filter_summary.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', - 'diag_logs_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Logs', - 'diag_logs_ppp.php' => 'https://doc.pfsense.org/index.php/PPP_Logs', - 'diag_logs_relayd.php' => 'https://doc.pfsense.org/index.php/Load_Balancer_Logs', 'status_logs_settings.php' => 'https://doc.pfsense.org/index.php/Log_Settings', 'status_logs_vpn.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Logs', - 'diag_logs_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Logs', - 'diag_logs_openvpn.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Logs', 'diag_nanobsd.php' => 'https://doc.pfsense.org/index.php/NanoBSD_Diagnostics', 'diag_ping.php' => 'https://doc.pfsense.org/index.php/Ping_Host', 'status_pkglogs.php' => 'https://doc.pfsense.org/index.php/Package_Logs', @@ -240,10 +244,6 @@ $helppages = array( 'system_crlmanager.php' => 'https://doc.pfsense.org/index.php/Certificate_Management', 'crash_reporter.php' => 'https://doc.pfsense.org/index.php/Unexpected_Reboot_Troubleshooting', 'diag_dump_states_sources.php' => 'https://doc.pfsense.org/index.php/Show_Source_Tracking', - 'diag_logs_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Logs', - 'diag_logs_resolver.php' => 'https://doc.pfsense.org/index.php/Resolver_Logs', - 'diag_logs_routing.php' => 'https://doc.pfsense.org/index.php/Routing_Logs', - 'diag_logs_wireless.php' => 'https://doc.pfsense.org/index.php/Wireless_Logs', 'diag_ndp.php' => 'https://doc.pfsense.org/index.php/NDP_Table', 'diag_sockets.php' => 'https://doc.pfsense.org/index.php/Diag_Sockets', 'diag_testport.php' => 'https://doc.pfsense.org/index.php/Test_Port', diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 8702bb5..01f6f95 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -669,6 +669,10 @@ if ($_POST['apply']) { $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."), $_POST['type6']); } + if (empty($_POST['track6-interface'])) { + $input_errors[] = gettext("You have to select a valid interface to track."); + } + if ($_POST['track6-prefix-id--hex'] != "" && !is_numeric("0x" . $_POST['track6-prefix-id--hex'])) { $input_errors[] = gettext("You must enter a valid hexadecimal number for the IPv6 prefix ID."); } else { diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php index 06e5b15..3c17dbe 100644 --- a/src/usr/local/www/interfaces_assign.php +++ b/src/usr/local/www/interfaces_assign.php @@ -502,7 +502,7 @@ if (file_exists("/var/run/interface_mismatch_reboot_needed")) { if (file_exists("/tmp/reload_interfaces")) { echo "<p>\n"; - print_apply_box(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The interface configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); echo "<br /></p>\n"; } elseif ($savemsg) { print_info_box($savemsg, $class); diff --git a/src/usr/local/www/load_balancer_monitor.php b/src/usr/local/www/load_balancer_monitor.php index 5f53839..bdcfac8 100644 --- a/src/usr/local/www/load_balancer_monitor.php +++ b/src/usr/local/www/load_balancer_monitor.php @@ -118,7 +118,7 @@ if ($savemsg) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The load balancer configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ diff --git a/src/usr/local/www/load_balancer_pool.php b/src/usr/local/www/load_balancer_pool.php index be52079..183775a 100644 --- a/src/usr/local/www/load_balancer_pool.php +++ b/src/usr/local/www/load_balancer_pool.php @@ -132,7 +132,7 @@ if ($savemsg) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />")); + print_apply_box(gettext("The load balancer configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ diff --git a/src/usr/local/www/load_balancer_setting.php b/src/usr/local/www/load_balancer_setting.php index 9f4bdbf..fe63c7d 100644 --- a/src/usr/local/www/load_balancer_setting.php +++ b/src/usr/local/www/load_balancer_setting.php @@ -131,7 +131,7 @@ if ($savemsg) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(gettext("The load balancer configuration has been changed") . ' ' . + print_apply_box(gettext("The load balancer configuration has been changed.") . ' ' . gettext("You must apply the changes in order for them to take effect.")); } diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php index ba47ea5..b361106 100644 --- a/src/usr/local/www/load_balancer_virtual_server.php +++ b/src/usr/local/www/load_balancer_virtual_server.php @@ -132,7 +132,7 @@ if ($savemsg) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The virtual server configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 951f3cb..1518ec0 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -392,6 +392,11 @@ if ($firmwareupdate && !$firmwareversion) { if ($_POST) { $pkgid = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_POST['id'], ENT_QUOTES | ENT_HTML401)); + if ($pkgid == "firmware") { + $logfilename = $g['cf_conf_path'] . '/upgrade_log'; + } else { + $logfilename = $g['cf_conf_path'] . '/pkg_log_' . $pkgid; + } } if ($_POST['mode'] == 'delete') { @@ -460,7 +465,7 @@ if ($_POST && ($_POST['completed'] != "true")) { write_config(gettext("Creating restore point before package installation.")); $progbar = true; - $upgrade_script = "/usr/local/sbin/{$g['product_name']}-upgrade -y -l {$g['cf_conf_path']}/upgrade_log.txt -p {$g['tmp_path']}/upgrade_logwebgui-log.sock"; + $upgrade_script = "/usr/local/sbin/{$g['product_name']}-upgrade -y -l {$logfilename}.txt -p {$g['tmp_path']}/{$g['product_name']}-upgrade.sock"; switch ($_POST['mode']) { case 'delete': @@ -496,6 +501,7 @@ if ($_POST && ($_POST['completed'] != "true")) { // $_POST['completed'] just means that we are refreshing the page to update any new menu items // that were installed if ($_POST && $_POST['completed'] == "true"): + unlink_if_exists($logfilename . ".json"); if (($pkgid == 'firmware') && ($_POST['reboot_needed'] == "yes")): ?> <script> @@ -577,7 +583,7 @@ function getLogsStatus() { url: "pkg_mgr_install.php", type: "post", data: { ajax: "ajax", - logfilename: "<?=$g['cf_conf_path'];?>/upgrade_log", + logfilename: "<?=$logfilename?>", next_log_line: "0" } }); @@ -646,7 +652,6 @@ function scrollToBottom() { $('#output').scrollTop($('#output')[0].scrollHeight); } -var timeoutmsg = '<h4><?=gettext("Rebooting");?><br /><?=gettext("Page will automatically reload in ");?>'; var time = 0; function checkonline() { @@ -661,17 +666,23 @@ function checkonline() { function startCountdown() { setInterval(function() { + if (time == "<?=$guitimeout?>") { + $('#countdown').html('<h4><?=sprintf(gettext("Rebooting%sPage will automatically reload in %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>'); + } + if (time > 0) { - $('#countdown').html(timeoutmsg + time + ' <?=gettext("seconds");?>.</h4>'); + $('#secs').html(time); time--; } else { time = "<?=$guiretry?>"; - timeoutmsg = '<h4><?=gettext("Not yet ready");?><br /><?=gettext("Retrying in another ");?>'; + $('#countdown').html('<h4><?=sprintf(gettext("Not yet ready%s Retrying in another %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>'); + $('#secs').html(time); checkonline(); } }, 1000); } + events.push(function() { if ("<?=$start_polling?>") { setTimeout(getLogsStatus, 1000); diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php index c52fb76..c3076da 100644 --- a/src/usr/local/www/services_captiveportal.php +++ b/src/usr/local/www/services_captiveportal.php @@ -920,21 +920,24 @@ $group->add(new Form_Checkbox( 'reauthenticateacct', null, 'No Accounting updates', - !$pconfig['reauthenticateacct'] + $pconfig['reauthenticateacct'] == "", + "" ))->displayasRadio(); $group->add(new Form_Checkbox( 'reauthenticateacct', null, 'Stop/start Accounting', - $pconfig['reauthenticateacct'] == 'stopstart' + $pconfig['reauthenticateacct'] == 'stopstart', + "stopstart" ))->displayasRadio(); $group->add(new Form_Checkbox( 'reauthenticateacct', null, 'Interim update', - $pconfig['reauthenticateacct'] == 'interimupdate' + $pconfig['reauthenticateacct'] == 'interimupdate', + "interimupdate" ))->displayasRadio(); $section->add($group); diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php index bfa6908..cbe5896 100644 --- a/src/usr/local/www/services_captiveportal_filemanager.php +++ b/src/usr/local/www/services_captiveportal_filemanager.php @@ -132,8 +132,8 @@ if ($_POST) { // check total file size if (($total_size + $size) > $g['captiveportal_element_sizelimit']) { - $input_errors[] = gettext("The total size of all files uploaded may not exceed ") . - format_bytes($g['captiveportal_element_sizelimit']) . "."; + $input_errors[] = sprintf(gettext("The total size of all files uploaded may not exceed %s."), + format_bytes($g['captiveportal_element_sizelimit'])); } if (!$input_errors) { diff --git a/src/usr/local/www/services_captiveportal_hostname_edit.php b/src/usr/local/www/services_captiveportal_hostname_edit.php index 5d828d1..d36fc80 100644 --- a/src/usr/local/www/services_captiveportal_hostname_edit.php +++ b/src/usr/local/www/services_captiveportal_hostname_edit.php @@ -145,7 +145,7 @@ if ($_POST) { } if ($ipent['hostname'] == $_POST['hostname']) { - $input_errors[] = sprintf("[%s] %s.", $_POST['hostname'], gettext("already allowed")) ; + $input_errors[] = sprintf(gettext("Hostname [%s] already allowed."), $_POST['hostname']) ; break ; } } diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php index bdba3f7..9f90c9a 100644 --- a/src/usr/local/www/services_captiveportal_ip.php +++ b/src/usr/local/www/services_captiveportal_ip.php @@ -91,7 +91,7 @@ if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) { $cpzoneid = $a_cp[$cpzone]['zoneid']; } -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Allowed IP Addresses")); +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone %s"), $a_cp[$cpzone]['zone']), gettext("Allowed IP Addresses")); $shortcut_section = "captiveportal"; if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) { diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php index 7335208..b143190 100644 --- a/src/usr/local/www/services_captiveportal_mac.php +++ b/src/usr/local/www/services_captiveportal_mac.php @@ -189,7 +189,7 @@ if ($savemsg) { } if (is_subsystem_dirty('passthrumac')) { - print_apply_box(gettext("The captive portal MAC address configuration has been changed.<br />You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The captive portal MAC address configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php index 895e19e..46588a6 100644 --- a/src/usr/local/www/services_captiveportal_vouchers.php +++ b/src/usr/local/www/services_captiveportal_vouchers.php @@ -108,7 +108,7 @@ if (empty($a_cp[$cpzone])) { exit; } -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Vouchers")); +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone %s"), $a_cp[$cpzone]['zone']), gettext("Vouchers")); $shortcut_section = "captiveportal-vouchers"; if (!is_array($config['voucher'][$cpzone]['roll'])) { @@ -258,7 +258,7 @@ if ($_POST) { $input_errors[] = gettext("Double quotes aren't allowed."); } if ($_POST['charset'] && (strpos($_POST['charset'], ",") > 0)) { - $input_errors[] = "',' " . gettext("aren't allowed."); + $input_errors[] = gettext("',' aren't allowed."); } if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31))) { $input_errors[] = gettext("# of Bits to store Roll Id needs to be between 1..31."); @@ -408,7 +408,7 @@ EOF; if ($toreturn['voucher']['descrmsgexpired']) { $newvoucher['descrmsgexpired'] = $toreturn['voucher']['descrmsgexpired']; } - $savemsg = gettext("Voucher database has been synchronized from {$url}:{$port}"); + $savemsg = sprintf(gettext('Voucher database has been synchronized from %1$s:%2$s'), $url, $port); $config['voucher'][$cpzone] = $newvoucher; write_config(); @@ -452,9 +452,9 @@ display_top_tabs($tab_array, true); <table class="table table-striped table-hover table-condensed"> <thead> <tr> - <th><?=gettext("Roll")?> #</th> + <th><?=gettext("Roll #")?></th> <th><?=gettext("Minutes/Ticket")?></th> - <th># <?=gettext("of Tickets")?></th> + <th><?=gettext("# of Tickets")?></th> <th><?=gettext("Comment")?></th> <th><?=gettext("Action")?></th> </tr> @@ -674,7 +674,7 @@ events.push(function() { // Set initial state setShowHide($('#enable').is(":checked")); - var generateButton = $('<a class="btn btn-xs btn-default"><?=gettetx("Generate new keys");?></a>'); + var generateButton = $('<a class="btn btn-xs btn-default"><?=gettext("Generate new keys");?></a>'); generateButton.on('click', function() { $.ajax({ type: 'get', diff --git a/src/usr/local/www/services_captiveportal_zones.php b/src/usr/local/www/services_captiveportal_zones.php index 362df39..53e7b4d 100644 --- a/src/usr/local/www/services_captiveportal_zones.php +++ b/src/usr/local/www/services_captiveportal_zones.php @@ -99,7 +99,7 @@ if ($savemsg) { } if (is_subsystem_dirty('captiveportal')) { - print_apply_box(gettext("The Captive Portal entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The Captive Portal entry list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } ?> <form action="services_captiveportal_zones.php" method="post"> diff --git a/src/usr/local/www/services_captiveportal_zones_edit.php b/src/usr/local/www/services_captiveportal_zones_edit.php index fb278bb..2b57d16 100644 --- a/src/usr/local/www/services_captiveportal_zones_edit.php +++ b/src/usr/local/www/services_captiveportal_zones_edit.php @@ -90,7 +90,7 @@ if ($_POST) { foreach ($a_cp as $cpkey => $cpent) { if ($cpent['zone'] == $_POST['zone']) { - $input_errors[] = sprintf("[%s] %s.", $_POST['zone'], gettext("already exists")); + $input_errors[] = sprintf(gettext("Zone [%s] already exists."), $_POST['zone']); break; } } diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 18c4e85..682467d 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -293,7 +293,7 @@ if (isset($_POST['submit'])) { } if ($cpdata['timeout'] > $deftime) { $input_errors[] = sprintf(gettext( - "The Captive Portal zone '%s' has Hard Timeout parameter set to a value bigger than Default lease time (%s)."), $cpZone, $deftime); + 'The Captive Portal zone (%1$s) has Hard Timeout parameter set to a value bigger than Default lease time (%2$s).'), $cpZone, $deftime); } } } @@ -715,7 +715,7 @@ if (isset($config['dhcrelay']['enable'])) { } if (is_subsystem_dirty('staticmaps')) { - print_apply_box(gettext("The static mapping configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The static mapping configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ @@ -1134,8 +1134,8 @@ $section->addClass('adnlopts'); $section->addInput(new Form_StaticText( null, - '<div class="alert alert-info"> ' . gettext('Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information. ' . - 'For a list of available options please visit this ') . '<a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_blank">' . gettext("URL") . '</a></div>' + '<div class="alert alert-info"> ' . gettext('Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information.') . ' ' . + sprintf(gettext('For a list of available options please visit this %1$s URL%2$s'), '<a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_blank">', '</a></div>') )); if (!$pconfig['numberoptions']) { diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index 8fdd4eb..6d2a2c88 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -195,7 +195,7 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if (($_POST['prefixrange_from'] && !is_ipaddrv6($_POST['prefixrange_from']))) { - $input_errors[] = gettext("A valid range must be specified."); + $input_errors[] = gettext("A valid prefix range must be specified."); } if (($_POST['prefixrange_to'] && !is_ipaddrv6($_POST['prefixrange_to']))) { $input_errors[] = gettext("A valid prefix range must be specified."); @@ -456,7 +456,7 @@ if ($dhcrelay_enabled) { } if (is_subsystem_dirty('staticmaps')) { - print_apply_box(gettext('The static mapping configuration has been changed') . '.<br />' . gettext('You must apply the changes in order for them to take effect.')); + print_apply_box(gettext('The static mapping configuration has been changed.') . '<br />' . gettext('You must apply the changes in order for them to take effect.')); } /* active tabs */ @@ -878,13 +878,19 @@ print($form); ?> <div class="infoblock blockopen"> <?php -print_info_box(gettext('The DNS servers entered in ') . '<a href="system.php">' . gettext(' System: General setup') . '</a>' . - gettext(' (or the ') . '<a href="services_dnsmasq.php"/>' . gettext('DNS forwarder') . '</a>, ' . gettext('if enabled) ') . - gettext('will be assigned to clients by the DHCP server.') . '<br />' . - gettext('The DHCP lease table can be viewed on the ') . '<a href="status_dhcpv6_leases.php">' . - gettext('Status: DHCPv6 leases') . '</a>' . gettext(' page.'), - 'info', - false); +print_info_box( + sprintf( + gettext('The DNS servers entered in %1$sSystem: General setup%3$s (or the %2$sDNS forwarder%3$s if enabled) will be assigned to clients by the DHCP server.'), + '<a href="system.php">', + '<a href="services_dnsmasq.php"/>', + '</a>') . + '<br />' . + sprintf( + gettext('The DHCP lease table can be viewed on the %1$sStatus: DHCPv6 leases%2$s page.'), + '<a href="status_dhcpv6_leases.php">', + '</a>'), + 'info', + false); ?> </div> <div class="panel panel-default"> diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php index f6c821d..c95b0df 100644 --- a/src/usr/local/www/services_dhcpv6_relay.php +++ b/src/usr/local/www/services_dhcpv6_relay.php @@ -118,7 +118,7 @@ if ($_POST) { if ($_POST['server']) { foreach ($_POST['server'] as $checksrv => $srv) { if (!is_ipaddrv6($srv[0])) { - $input_errors[] = gettext("A valid Destination Server IPv6 address must be specified."); + $input_errors[] = gettext("A valid Destination Server IPv6 address must be specified."); } diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php index b0f60fe..9cdae22 100644 --- a/src/usr/local/www/services_dnsmasq.php +++ b/src/usr/local/www/services_dnsmasq.php @@ -225,7 +225,7 @@ if ($savemsg) { } if (is_subsystem_dirty('hosts')) { - print_apply_box(gettext("The DNS forwarder configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The DNS forwarder configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $form = new Form(); @@ -344,17 +344,18 @@ print($form); ?> <div class="infoblock blockopen"> <?php -print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP". - " service (if enabled) will automatically serve the LAN IP". - " address as a DNS server to DHCP clients so they will use". - " the forwarder. The DNS forwarder will use the DNS servers". - " entered in %sSystem: General setup%s". - " or those obtained via DHCP or PPP on WAN if the "Allow". - " DNS server list to be overridden by DHCP/PPP on WAN"". - " 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', false); +print_info_box( + sprintf( + gettext('If the DNS forwarder is enabled, the DHCP service (if enabled) will automatically' . + ' serve the LAN IP address as a DNS server to DHCP clients so they will use the forwarder.' . + ' The DNS forwarder will use the DNS servers entered in %1$sSystem: General setup%3$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.' . + ' 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 %2$sSystem:General setup%3$s page.'), + '<a href="system.php">', + '<a href="system.php">', + '</a>'), + 'info', false); ?> </div> @@ -435,7 +436,7 @@ endforeach; <div class="infoblock blockopen"> <?php -print_info_box(gettext("Entries in this section override individual results from the forwarders.") . +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', false); ?> </div> diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php index b230a4b..f0ffd9c 100644 --- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php +++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -198,7 +198,7 @@ if (isset($id) && $a_domainOverrides[$id]) { null, 'hidden', $pconfig['id'] - ))->setHelp('You may enter a description here for your reference (not parsed).'); + )); } $form->add($section); diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php index 420d963..aae82f7 100644 --- a/src/usr/local/www/services_igmpproxy.php +++ b/src/usr/local/www/services_igmpproxy.php @@ -106,7 +106,7 @@ if ($savemsg) { } if (is_subsystem_dirty('igmpproxy')) { - print_apply_box(gettext('The IGMP entry list has been changed.' . '<br />' . 'You must apply the changes in order for them to take effect.')); + print_apply_box(gettext('The IGMP entry list has been changed.') . '<br />' . gettext('You must apply the changes in order for them to take effect.')); } ?> diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php index ba54368..7892456 100644 --- a/src/usr/local/www/services_ntpd.php +++ b/src/usr/local/www/services_ntpd.php @@ -75,7 +75,7 @@ if (empty($config['ntpd']['interface'])) { is_array($config['installedpackages']['openntpd']['config'][0]) && !empty($config['installedpackages']['openntpd']['config'][0]['interface'])) { $pconfig['interface'] = explode(",", $config['installedpackages']['openntpd']['config'][0]['interface']); unset($config['installedpackages']['openntpd']); - write_config("Upgraded settings from openttpd"); + write_config(gettext("Upgraded settings from openttpd")); } else { $pconfig['interface'] = array(); } @@ -374,7 +374,7 @@ $section->addInput(new Form_Checkbox( 'Log system messages (default: disabled).', $pconfig['logsys'] ))->setHelp('These options enable additional messages from NTP to be written to the System Log ' . - '<a href="diag_logs_ntpd.php">' . 'Status > System Logs > NTP' . '</a>'); + '<a href="status_logs.php?logfile=ntpd">' . 'Status > System Logs > NTP' . '</a>'); // Statistics logging section $btnadvstats = new Form_Button( diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php index 7b8751f..2781178 100644 --- a/src/usr/local/www/services_ntpd_gps.php +++ b/src/usr/local/www/services_ntpd_gps.php @@ -138,8 +138,8 @@ if ($_POST) { unset($config['ntpd']['gps']['prefer']); } - if (!empty($_POST['gpsselect'])) { - $config['ntpd']['gps']['noselect'] = $_POST['gpsselect']; + if (!empty($_POST['gpsnoselect'])) { + $config['ntpd']['gps']['noselect'] = $_POST['gpsnoselect']; } elseif (isset($config['ntpd']['gps']['noselect'])) { unset($config['ntpd']['gps']['noselect']); } @@ -321,7 +321,7 @@ $section->addInput(new Form_Checkbox( )); $section->addInput(new Form_Checkbox( - 'gpsselect', + 'gpsnoselect', null, 'Do not use this clock, display for reference only (default: unchecked).', $pconfig['noselect'] @@ -530,14 +530,14 @@ events.push(function() { set_gps_default('<?=$pconfig['type']?>'); - // Checkboxes gpsprefer and gpsselect are mutually exclusive + // Checkboxes gpsprefer and gpsnoselect are mutually exclusive $('#gpsprefer').click(function() { if ($(this).is(':checked')) { - $('#gpsselect').prop('checked', false); + $('#gpsnoselect').prop('checked', false); } }); - $('#gpsselect').click(function() { + $('#gpsnoselect').click(function() { if ($(this).is(':checked')) { $('#gpsprefer').prop('checked', false); } diff --git a/src/usr/local/www/services_pppoe.php b/src/usr/local/www/services_pppoe.php index ecf807a..bdd4be7 100644 --- a/src/usr/local/www/services_pppoe.php +++ b/src/usr/local/www/services_pppoe.php @@ -122,7 +122,7 @@ if ($savemsg) { } if (is_subsystem_dirty('vpnpppoe')) { - print_apply_box(gettext('The PPPoE entry list has been changed') . '.<br />' . gettext('You must apply the changes in order for them to take effect.')); + print_apply_box(gettext('The PPPoE entry list has been changed.') . '<br />' . gettext('You must apply the changes in order for them to take effect.')); } ?> diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php index 6456072..5b74e36 100644 --- a/src/usr/local/www/services_rfc2136_edit.php +++ b/src/usr/local/www/services_rfc2136_edit.php @@ -317,8 +317,8 @@ if (isset($id) && $a_rfc2136[$id]) { $form->add($section); print($form); -print_info_box(sprintf('You must configure a DNS server in %sSystem: ' . - 'General setup %sor allow the DNS server list to be overridden ' . - 'by DHCP/PPP on WAN for dynamic DNS updates to work.','<a href="system.php">', '</a>')); +print_info_box(sprintf(gettext('You must configure a DNS server in %1$sSystem: ' . + 'General setup %2$sor allow the DNS server list to be overridden ' . + 'by DHCP/PPP on WAN for dynamic DNS updates to work.'), '<a href="system.php">', '</a>')); include("foot.inc"); diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php index c841469..c43ddcd 100644 --- a/src/usr/local/www/services_router_advertisements.php +++ b/src/usr/local/www/services_router_advertisements.php @@ -92,8 +92,8 @@ if ($config['installedpackages']['olsrd']) { } if (!$_GET['if']) { - $savemsg = "<p><b>" . gettext("The DHCPv6 Server can only be enabled on interfaces configured with static, non unique local IP addresses") . ".</b></p>" . - "<p><b>" . gettext("Only interfaces configured with a static IP will be shown") . ".</b></p>"; + $savemsg = "<p><b>" . gettext("The DHCPv6 Server can only be enabled on interfaces configured with static, non unique local IP addresses.") . "</b></p>" . + "<p><b>" . gettext("Only interfaces configured with a static IP will be shown.") . "</b></p>"; } $iflist = get_configured_interface_with_descr(); @@ -142,11 +142,12 @@ $priority_modes = array( "high" => gettext("High")); $carplist = get_configured_carp_interface_list(); -$subnets_help = '<span class="help-block">' . gettext("Subnets are specified in CIDR format. " . - "Select the CIDR mask that pertains to each entry. " . - "/128 specifies a single IPv6 host; /64 specifies a normal IPv6 network; etc. " . - "If no subnets are specified here, the Router Advertisement (RA) Daemon will advertise to the subnet to which the router's interface is assigned." . - '</span>'); +$subnets_help = '<span class="help-block">' . + gettext("Subnets are specified in CIDR format. " . + "Select the CIDR mask that pertains to each entry. " . + "/128 specifies a single IPv6 host; /64 specifies a normal IPv6 network; etc. " . + "If no subnets are specified here, the Router Advertisement (RA) Daemon will advertise to the subnet to which the router's interface is assigned.") . + '</span>'; if ($_POST) { unset($input_errors); diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php index b129197..48f017a 100644 --- a/src/usr/local/www/services_unbound.php +++ b/src/usr/local/www/services_unbound.php @@ -252,7 +252,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The configuration of the DNS Resolver has been changed. You must apply changes for them to take effect.")); + print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php index abb3471..1c94824 100644 --- a/src/usr/local/www/services_unbound_acls.php +++ b/src/usr/local/www/services_unbound_acls.php @@ -218,7 +218,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The configuration of the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php index d0c5ea2..60c117f 100644 --- a/src/usr/local/www/services_unbound_advanced.php +++ b/src/usr/local/www/services_unbound_advanced.php @@ -231,7 +231,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The configuration of the DNS Resolver has been changed. You must apply changes for them to take effect.")); + print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php index be135cb..b23b81b 100644 --- a/src/usr/local/www/services_wol.php +++ b/src/usr/local/www/services_wol.php @@ -83,10 +83,10 @@ if ($_GET['wakeall'] != "") { $bcip = gen_subnet_max($ipaddr, get_interface_subnet($if)); /* Execute wol command and check return code. */ if (!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")) { - $savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s)%3$s'), $mac, $description, ".<br />"); + $savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s).'), $mac, $description) . "<br />"; $class = 'success'; } else { - $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'), '<a href="/status_logs.php">', '</a>', $description, $mac, ".<br />"); + $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully.'), '<a href="/status_logs.php">', '</a>', $description, $mac) . "<br />"; $class = 'warning'; } } @@ -127,7 +127,7 @@ if ($_POST || $_GET['mac']) { $savemsg .= sprintf(gettext("Sent magic packet to %s."), $mac); $class = 'success'; } else { - $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'), '<a href="/status_logs.php">', '</a>', $mac, ".<br />"); + $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully.'), '<a href="/status_logs.php">', '</a>', $mac) . "<br />"; $class = 'warning'; } } @@ -148,9 +148,9 @@ include("head.inc"); ?> <div class="infoblock blockopen"> <?php -print_info_box(gettext('This service can be used to wake up (power on) computers by sending special') . ' "' . gettext('Magic Packets') . '"<br />' . +print_info_box(gettext('This service can be used to wake up (power on) computers by sending special "Magic Packets".') . '<br />' . gettext('The NIC in the computer that is to be woken up must support Wake on LAN and must be properly configured (WOL cable, BIOS settings).'), - 'info'); + 'info', false); ?> </div> diff --git a/src/usr/local/www/shortcuts/pkg_upnp.php b/src/usr/local/www/shortcuts/pkg_upnp.inc index 3ee7f81..6554e10 100644 --- a/src/usr/local/www/shortcuts/pkg_upnp.php +++ b/src/usr/local/www/shortcuts/pkg_upnp.inc @@ -4,7 +4,7 @@ global $shortcuts; $shortcuts['upnp'] = array(); $shortcuts['upnp']['main'] = "pkg_edit.php?xml=miniupnpd.xml"; -$shortcuts['upnp']['log'] = "diag_logs_routing.php"; +$shortcuts['upnp']['log'] = "status_logs.php?logfile=routing"; $shortcuts['upnp']['status'] = "status_upnp.php"; $shortcuts['upnp']['service'] = "miniupnpd"; diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index d3adb88..1e4c091 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -259,7 +259,7 @@ else: <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div> <div class="panel-body"><br /> <?php - print_info_box(gettext("No captive portal zones have been configured. You may add new zones here: ") . '<a href="services_captiveportal_zones.php">' . gettext('Services->Captive portal') . '</a>'); + print_info_box(sprintf(gettext('No captive portal zones have been configured. You may add new zones here: %1$sServices->Captive portal%2$s'), '<a href="services_captiveportal_zones.php">', '</a>')); ?> </div> </div> diff --git a/src/usr/local/www/status_carp.php b/src/usr/local/www/status_carp.php index 07dde06..39d2a64 100644 --- a/src/usr/local/www/status_carp.php +++ b/src/usr/local/www/status_carp.php @@ -182,16 +182,16 @@ if ($carpcount == 0) { // Sadly this needs to be here so that it is inside the form if ($carp_detected_problems > 0) { print_info_box( - gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br/>" . - gettext("Check the link status on all interfaces with configured CARP VIPs.") . "<br/>" . - gettext("Search the") . - " <a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">" . - gettext("system log") . - "</a> " . - gettext("for CARP demotion-related events.") . "<br/><br/>" . + gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . + "<br/>" . + gettext("Check the link status on all interfaces with configured CARP VIPs.") . + "<br/>" . + sprintf(gettext('Search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") . + "<br/><br/>" . '<input type="submit" class="btn btn-warning" name="resetdemotion" id="resetdemotion" value="' . gettext("Reset CARP Demotion Status") . - '" />', 'danger' + '" />', + 'danger' ); } diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php index 089c759..8f8be60 100644 --- a/src/usr/local/www/status_dhcp_leases.php +++ b/src/usr/local/www/status_dhcp_leases.php @@ -170,6 +170,15 @@ $i = 0; $l = 0; $p = 0; +// Translate these once so we don't do it over and over in the loops below. +$online_string = gettext("online"); +$offline_string = gettext("offline"); +$active_string = gettext("active"); +$expired_string = gettext("expired"); +$reserved_string = gettext("reserved"); +$dynamic_string = gettext("dynamic"); +$static_string = gettext("static"); + // Put everything together again foreach ($leases_content as $lease) { /* split the line by space */ @@ -198,7 +207,7 @@ foreach ($leases_content as $lease) { continue 3; case "lease": $leases[$l]['ip'] = $data[$f+1]; - $leases[$l]['type'] = "dynamic"; + $leases[$l]['type'] = $dynamic_string; $f = $f+2; break; case "starts": @@ -233,15 +242,15 @@ foreach ($leases_content as $lease) { case "binding": switch ($data[$f+2]) { case "active": - $leases[$l]['act'] = "active"; + $leases[$l]['act'] = $active_string; break; case "free": - $leases[$l]['act'] = "expired"; - $leases[$l]['online'] = "offline"; + $leases[$l]['act'] = $expired_string; + $leases[$l]['online'] = $offline_string; break; case "backup": - $leases[$l]['act'] = "reserved"; - $leases[$l]['online'] = "offline"; + $leases[$l]['act'] = $reserved_string; + $leases[$l]['online'] = $offline_string; break; } $f = $f+1; @@ -258,9 +267,9 @@ foreach ($leases_content as $lease) { $leases[$l]['mac'] = $data[$f+2]; /* check if it's online and the lease is active */ if (in_array($leases[$l]['ip'], $arpdata_ip)) { - $leases[$l]['online'] = 'online'; + $leases[$l]['online'] = $online_string; } else { - $leases[$l]['online'] = 'offline'; + $leases[$l]['online'] = $offline_string; } $f = $f+2; break; @@ -306,15 +315,15 @@ foreach ($config['interfaces'] as $ifname => $ifarr) { foreach ($config['dhcpd'][$ifname]['staticmap'] as $static) { $slease = array(); $slease['ip'] = $static['ipaddr']; - $slease['type'] = "static"; + $slease['type'] = $static_string; $slease['mac'] = $static['mac']; $slease['if'] = $ifname; $slease['start'] = ""; $slease['end'] = ""; $slease['hostname'] = htmlentities($static['hostname']); $slease['descr'] = htmlentities($static['descr']); - $slease['act'] = "static"; - $slease['online'] = in_array(strtolower($slease['mac']), $arpdata_mac) ? 'online' : 'offline'; + $slease['act'] = $static_string; + $slease['online'] = in_array(strtolower($slease['mac']), $arpdata_mac) ? $online_string : $offline_string; $slease['staticmap_array_index'] = $staticmap_array_index; $leases[] = $slease; $staticmap_array_index++; @@ -383,19 +392,19 @@ $dhcp_leases_subnet_counter = array(); //array to sum up # of leases / subnet $iflist = get_configured_interface_with_descr(); //get interface descr for # of leases foreach ($leases as $data): - if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) { + if ($data['act'] != $active_string && $data['act'] != $static_string && $_GET['all'] != 1) { continue; } - if ($data['act'] == 'active') { + if ($data['act'] == $active_string) { $icon = 'fa-check-circle-o'; - } elseif ($data['act'] == 'expired') { + } elseif ($data['act'] == $expired_string) { $icon = 'fa-ban'; } else { $icon = 'fa-times-circle-o'; } - if ($data['act'] != "static") { + if ($data['act'] != $static_string) { $dlsc=0; foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) { if (!is_array($dhcpifconf['range'])) { @@ -428,7 +437,7 @@ foreach ($leases as $data): <?php endif; ?> </td> <td><?=htmlentities($data['hostname'])?></td> -<?php if ($data['type'] != "static"):?> +<?php if ($data['type'] != $static_string):?> <td><?=adjust_gmt($data['start'])?></td> <td><?=adjust_gmt($data['end'])?></td> <?php else: ?> @@ -437,17 +446,17 @@ foreach ($leases as $data): <td><?=$data['online']?></td> <td><?=$data['act']?></td> <td> -<?php if ($data['type'] == "dynamic"): ?> +<?php if ($data['type'] == $dynamic_string): ?> <a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&mac=<?=$data['mac']?>&hostname=<?=htmlspecialchars($data['hostname'])?>"></a> <?php else: ?> <a class="fa fa-pencil" title="<?=gettext('Edit static mapping')?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&id=<?=$data['staticmap_array_index']?>"></a> <?php endif; ?> <a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&mac=<?=$data['mac']?>&descr=<?=htmlentities($data['hostname'])?>"></a> -<?php if ($data['online'] != "online"):?> +<?php if ($data['online'] != $online_string):?> <a class="fa fa-power-off" title="<?=gettext("Send WOL packet")?>" href="services_wol.php?if=<?=$data['if']?>&mac=<?=$data['mac']?>"></a> <?php endif; ?> -<?php if ($data['type'] == "dynamic" && $data['online'] != "online"):?> +<?php if ($data['type'] == $dynamic_string && $data['online'] != $online_string):?> <a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcp_leases.php?deleteip=<?=$data['ip']?>&all=<?=intval($_GET['all'])?>"></a> <?php endif; ?> </td> diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php index cd6dcb3..cbac6ef 100644 --- a/src/usr/local/www/status_dhcpv6_leases.php +++ b/src/usr/local/www/status_dhcpv6_leases.php @@ -206,6 +206,16 @@ $i = 0; $l = 0; $p = 0; +// Translate these once so we don't do it over and over in the loops below. +$online_string = gettext("online"); +$offline_string = gettext("offline"); +$active_string = gettext("active"); +$expired_string = gettext("expired"); +$reserved_string = gettext("reserved"); +$released_string = gettext("released"); +$dynamic_string = gettext("dynamic"); +$static_string = gettext("static"); + // Put everything together again while ($i < $leases_count) { $entry = array(); @@ -257,23 +267,23 @@ while ($i < $leases_count) { } else { $entry['duid'] = $data[$f+1]; } - $entry['type'] = "dynamic"; + $entry['type'] = $dynamic_string; $f = $f+2; break; case "iaaddr": $entry['ip'] = $data[$f+1]; - $entry['type'] = "dynamic"; + $entry['type'] = $dynamic_string; if (in_array($entry['ip'], array_keys($ndpdata))) { - $entry['online'] = 'online'; + $entry['online'] = $online_string; } else { - $entry['online'] = 'offline'; + $entry['online'] = $offline_string; } $f = $f+2; break; case "iaprefix": $is_prefix = true; $entry['prefix'] = $data[$f+1]; - $entry['type'] = "dynamic"; + $entry['type'] = $dynamic_string; $f = $f+2; break; case "starts": @@ -303,19 +313,19 @@ while ($i < $leases_count) { case "binding": switch ($data[$f+2]) { case "active": - $entry['act'] = "active"; + $entry['act'] = $active_string; break; case "free": - $entry['act'] = "expired"; - $entry['online'] = "offline"; + $entry['act'] = $expired_string; + $entry['online'] = $offline_string; break; case "backup": - $entry['act'] = "reserved"; - $entry['online'] = "offline"; + $entry['act'] = $reserved_string; + $entry['online'] = $offline_string; break; case "released": - $entry['act'] = "released"; - $entry['online'] = "offline"; + $entry['act'] = $released_string; + $entry['online'] = $offline_string; } $f = $f+1; break; @@ -378,11 +388,11 @@ foreach ($config['interfaces'] as $ifname => $ifarr) { $slease['start'] = ""; $slease['end'] = ""; $slease['hostname'] = htmlentities($static['hostname']); - $slease['act'] = "static"; + $slease['act'] = $static_string; if (in_array($slease['ip'], array_keys($ndpdata))) { - $slease['online'] = 'online'; + $slease['online'] = $online_string; } else { - $slease['online'] = 'offline'; + $slease['online'] = $offline_string; } $leases[] = $slease; @@ -429,7 +439,7 @@ if (count($pools) > 0) { } if (empty($leases)) { - print '<div class="alert alert-warning" role="alert">'. gettext("No leases file found. Is the DHCP server active?") .'</div>'; + print '<div class="alert alert-warning" role="alert">' . gettext("No leases file found. Is the DHCP server active?") . '</div>'; } ?> @@ -455,19 +465,19 @@ if (empty($leases)) { <tbody> <?php foreach ($leases as $data): - if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) { + if ($data['act'] != $active_string && $data['act'] != $static_string && $_GET['all'] != 1) { continue; } - if ($data['act'] == 'active') { + if ($data['act'] == $active_string) { $icon = 'fa-check-circle-o'; - } elseif ($data['act'] == 'expired') { + } elseif ($data['act'] == $expired_string) { $icon = 'fa-ban'; } else { $icon = 'fa-times-circle-o'; } - if ($data['act'] == "static") { + if ($data['act'] == $static_string) { foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) { if (is_array($dhcpifconf['staticmap'])) { foreach ($dhcpifconf['staticmap'] as $staticent) { @@ -502,7 +512,7 @@ foreach ($leases as $data): <?php endif; ?> </td> <td><?=htmlentities($data['hostname'])?></td> -<?php if ($data['type'] != "static"):?> +<?php if ($data['type'] != $static_string):?> <td><?=adjust_gmt($data['start'])?></td> <td><?=adjust_gmt($data['end'])?></td> <?php else: ?> @@ -512,11 +522,11 @@ foreach ($leases as $data): <td><?=$data['online']?></td> <td><?=$data['act']?></td> <td> -<?php if ($data['type'] == "dynamic"): ?> +<?php if ($data['type'] == $dynamic_string): ?> <a <a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcpv6_edit.php?if=<?=$data['if']?>&duid=<?=$data['duid']?>&hostname=<?=htmlspecialchars($data['hostname'])?>"></a> <?php endif; ?> <a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&mac=<?=$data['mac']?>&descr=<?=htmlentities($data['hostname'])?>"></a> -<?php if ($data['type'] == "dynamic" && $data['online'] != "online"):?> +<?php if ($data['type'] == $dynamic_string && $data['online'] != $online_string):?> <a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcpv6_leases.php?deleteip=<?=$data['ip']?>&all=<?=intval($_GET['all'])?>"></a> <?php endif; ?> </td> @@ -544,19 +554,19 @@ foreach ($leases as $data): <tbody> <?php foreach ($prefixes as $data): - if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) { + if ($data['act'] != $active_string && $data['act'] != $static_string && $_GET['all'] != 1) { continue; } - if ($data['act'] == 'active') { + if ($data['act'] == $active_string) { $icon = 'fa-check-circle-o'; - } elseif ($data['act'] == 'expired') { + } elseif ($data['act'] == $expired_string) { $icon = 'fa-ban'; } else { $icon = 'fa-times-circle-o'; } - if ($data['act'] == "static") { + if ($data['act'] == $static_string) { foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) { if (is_array($dhcpifconf['staticmap'])) { foreach ($dhcpifconf['staticmap'] as $staticent) { @@ -590,7 +600,7 @@ foreach ($prefixes as $data): </td> <td><?=$data['iaid']?></td> <td><?=$data['duid']?></td> -<?php if ($data['type'] != "static"):?> +<?php if ($data['type'] != $static_string):?> <td><?=adjust_gmt($data['start'])?></td> <td><?=adjust_gmt($data['end'])?></td> <?php else: ?> diff --git a/src/usr/local/www/status_filter_reload.php b/src/usr/local/www/status_filter_reload.php index 443c358..f46e1b0 100644 --- a/src/usr/local/www/status_filter_reload.php +++ b/src/usr/local/www/status_filter_reload.php @@ -94,10 +94,10 @@ include("head.inc"); <div class="panel-heading"><h2 class="panel-title"><?=gettext("Filter Reload");?></h2></div> <div class="panel-body"> <form action="status_filter_reload.php" method="post" name="filter"> - <input type="submit" class="btn btn-success" value="Reload Filter" name="reloadfilter" id="reloadfilter" /> + <input type="submit" class="btn btn-success" value="<?=gettext("Reload Filter")?>" name="reloadfilter" id="reloadfilter" /> <?php if ($config['hasync'] && $config['hasync']["synchronizetoip"] != ""): ?> - <input type="submit" class="btn btn-default" value="Force Config Sync" name="syncfilter" id="syncfilter" /> + <input type="submit" class="btn btn-default" value="<?=gettext("Force Config Sync")?>" name="syncfilter" id="syncfilter" /> <?php endif; ?> @@ -114,7 +114,7 @@ endif; <br/> - <div id="reloadinfo"><?=gettext("This page will automatically refresh every 3 seconds until the filter is done reloading"); ?>.</div> + <div id="reloadinfo"><?=gettext("This page will automatically refresh every 3 seconds until the filter is done reloading."); ?></div> </div> </div> diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php index c5036b3..cf7c652 100644 --- a/src/usr/local/www/status_gateways.php +++ b/src/usr/local/www/status_gateways.php @@ -167,10 +167,10 @@ display_top_tabs($tab_array); $online = gettext("Offline"); $bgcolor = LIGHTCORAL; } elseif (stristr($status['status'], "loss")) { - $online = gettext("Warning, Packetloss").': '.$status['loss']; + $online = gettext("Warning, Packetloss") . ': ' . $status['loss']; $bgcolor = KHAKI; } elseif (stristr($status['status'], "delay")) { - $online = gettext("Warning, Latency").': '.$status['delay']; + $online = gettext("Warning, Latency") . ': ' . $status['delay']; $bgcolor = KHAKI; } elseif ($status['status'] == "none") { $online = gettext("Online"); @@ -194,7 +194,7 @@ display_top_tabs($tab_array); <td bgcolor="<?=$bgcolor?>"> <strong><?=$online?></strong> <?php if (!empty($lastchange)) { ?> - <br /><i>Last checked <?=$lastchange?></i> + <br /><i><?=gettext("Last checked")?> <?=$lastchange?></i> <?php } ?> </td> diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php index 9f7b862..8a366f3 100644 --- a/src/usr/local/www/status_graph.php +++ b/src/usr/local/www/status_graph.php @@ -84,14 +84,14 @@ if ($_POST['height']) { // Get configured interface list $ifdescrs = get_configured_interface_with_descr(); if (ipsec_enabled()) { - $ifdescrs['enc0'] = "IPsec"; + $ifdescrs['enc0'] = gettext("IPsec"); } foreach (array('server', 'client') as $mode) { if (is_array($config['openvpn']["openvpn-{$mode}"])) { foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { if (!isset($setting['disable'])) { - $ifdescrs['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); + $ifdescrs['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " " . $mode . ": ".htmlspecialchars($setting['description']); } } } @@ -249,7 +249,7 @@ events.push(function() { /* link the ipsec interface magically */ if (ipsec_enabled()) { - $ifdescrs['enc0'] = "IPsec"; + $ifdescrs['enc0'] = gettext("IPsec"); } ?> diff --git a/src/usr/local/www/status_graph_cpu.php b/src/usr/local/www/status_graph_cpu.php index f37a332..1b9d8e8 100644 --- a/src/usr/local/www/status_graph_cpu.php +++ b/src/usr/local/www/status_graph_cpu.php @@ -63,22 +63,21 @@ ##|*MATCH=status_graph_cpu.php* ##|-PRIV -$pgtitle = array(gettext("Status"), gettext("CPU load")); +$pgtitle = array(gettext("Status"), gettext("CPU Load Graph")); require("guiconfig.inc"); include("head.inc"); -$pgtitle = gettext("Status: CPU Graph"); - ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext("CPU Load graph");?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("CPU Load Graph");?></h2></div> <div class="panel-body text-center"> <embed src="graph_cpu.php" type="image/svg+xml" width="550" height="275" pluginspage="http://www.adobe.com/svg/viewer/install/auto" /> </div> - <p class="text-center"><strong><?=gettext("Note"); ?>:</strong><?=gettext("if you can't see the graph, you may have to install the")?> - <a href="http://www.adobe.com/svg/viewer/install/" target="_blank"><?=gettext("Adobe SVG viewer"); ?></a> + <p class="text-center"> + <strong><?=gettext("Note"); ?>:</strong> + <?=sprintf(gettext('If you cannot see the graph, you may have to install the %1$sAdobe SVG viewer%2$s'), '<a href="http://www.adobe.com/svg/viewer/install/" target="_blank">', '</a>')?> </p> </div> diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index d029fe6..09caa2a 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -519,5 +519,17 @@ function show_childsa(id, buttonid) { <?php unset($status); -print_info_box(gettext("You can configure IPsec ") . '<a href="vpn_ipsec.php">Here</a>'); +if (ipsec_enabled()) { +?> +<div class="infoblock"> +<?php +} else { +?> +<div class="infoblock blockopen"> +<?php +} +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +?> +</div> +<?php include("foot.inc"); ?> diff --git a/src/usr/local/www/status_ipsec_leases.php b/src/usr/local/www/status_ipsec_leases.php index 155f274..0778e90 100644 --- a/src/usr/local/www/status_ipsec_leases.php +++ b/src/usr/local/www/status_ipsec_leases.php @@ -152,6 +152,17 @@ if (isset($mobile['pool']) && is_array($mobile['pool'])) { print_info_box(gettext('No IPsec pools.')); } -print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>'); - +if (ipsec_enabled()) { +?> +<div class="infoblock"> +<?php +} else { +?> +<div class="infoblock blockopen"> +<?php +} +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +?> +</div> +<?php include("foot.inc"); diff --git a/src/usr/local/www/status_ipsec_sad.php b/src/usr/local/www/status_ipsec_sad.php index bbc9698..e213e50 100644 --- a/src/usr/local/www/status_ipsec_sad.php +++ b/src/usr/local/www/status_ipsec_sad.php @@ -135,7 +135,7 @@ if (count($sad)) { $args .= "&proto=" . rawurlencode($sa['proto']); $args .= "&spi=" . rawurlencode("0x" . $sa['spi']); ?> - <a class="btn btn-xs btn-danger" href="status_ipsec_sad.php?act=del&<?=$args?>">Delete</a> + <a class="btn btn-xs btn-danger" href="status_ipsec_sad.php?act=del&<?=$args?>"><?=gettext('Delete')?></a> </td> </tr> @@ -149,6 +149,17 @@ if (count($sad)) { print_info_box(gettext('No IPsec security associations.')); } -print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>'); - +if (ipsec_enabled()) { +?> +<div class="infoblock"> +<?php +} else { +?> +<div class="infoblock blockopen"> +<?php +} +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +?> +</div> +<?php include("foot.inc"); diff --git a/src/usr/local/www/status_ipsec_spd.php b/src/usr/local/www/status_ipsec_spd.php index 34a8619..f051d39 100644 --- a/src/usr/local/www/status_ipsec_spd.php +++ b/src/usr/local/www/status_ipsec_spd.php @@ -133,6 +133,17 @@ if (count($spd)) { print_info_box(gettext('No IPsec security policies configured.')); } -print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>'); - +if (ipsec_enabled()) { +?> +<div class="infoblock"> +<?php +} else { +?> +<div class="infoblock blockopen"> +<?php +} +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +?> +</div> +<?php include("foot.inc"); diff --git a/src/usr/local/www/status_lb_pool.php b/src/usr/local/www/status_lb_pool.php index 0b93843..57d320c 100644 --- a/src/usr/local/www/status_lb_pool.php +++ b/src/usr/local/www/status_lb_pool.php @@ -145,7 +145,7 @@ if ($_POST) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(gettext('The load balancer configuration has been changed. You must apply the changes in order for them to take effect.')); + print_apply_box(gettext("The load balancer configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index 8894b44..fe9cd29 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -233,6 +233,15 @@ if (!$rawfilter) { ?> </tbody> </table> + +<script type="text/javascript"> +//<![CDATA[ +events.push(function() { + $("#count").html(<?=$rows?>); +}); +//]]> +</script> + <?php if ($rows == 0) { print_info_box(gettext('No logs to display')); @@ -251,12 +260,4 @@ if (!$system_logs_manage_log_form_hidden) { } ?> -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - $("#count").html(<?=$rows?>); -}); -//]]> -</script> - <?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 f655a18..e1883d3 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -336,6 +336,15 @@ if (!$rawfilter) { ?> </tbody> </table> + +<script type="text/javascript"> +//<![CDATA[ +events.push(function() { + $("#count").html(<?=$rows?>); +}); +//]]> +</script> + <?php if ($rows == 0) { print_info_box(gettext('No logs to display')); @@ -441,13 +450,5 @@ events.push(function() { //]]> </script> -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - $("#count").html(<?=$rows?>); -}); -//]]> -</script> - <?php include("foot.inc"); ?> diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php index a092669..08b86ec 100755 --- a/src/usr/local/www/status_logs_filter_dynamic.php +++ b/src/usr/local/www/status_logs_filter_dynamic.php @@ -131,8 +131,11 @@ if ($system_logs_manage_log_form_hidden) { } -// Log Filter Submit - Firewall +// Force the formatted mode filter and form. Raw mode is not applicable in the dynamic view. $rawfilter = false; + + +// Log Filter Submit - Firewall filter_form_firewall(); @@ -165,15 +168,11 @@ system_log_filter(); $specific_log = basename($logfile, '.log') . '_settings'; if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $reverse = false; if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $reverse = true; - - if ($reverse) { - echo "var isReverse = true;\n"; - } else { - echo "var isReverse = false;\n"; - } ?> var filter_query_string = "<?=$filter_query_string . '&logfile=' . $logfile_path . '&nentries=' . $nentries?>"; + var isReverse = "<?=$reverse?>"; + /* Called by the AJAX updater */ function format_log_line(row) { if (row[8] == '6') { @@ -332,6 +331,8 @@ function update_table_rows(data) { move += rows.length; } + var tr_classes = 'text-nowrap'; + if (isReverse == false) { for (var i = move; i < rows.length; i++) { $(rows[i - move]).html($(rows[i]).html()); @@ -343,8 +344,9 @@ function update_table_rows(data) { var rowIndex = rows.length - move + i; if (rowIndex < rows.length) { $(rows[rowIndex]).html(data[i]); + $(rows[rowIndex]).className = tr_classes; } else { - $(tbody).append('<tr>' + data[i] + '</tr>'); + $(tbody).append('<tr class="' + tr_classes + '">' + data[i] + '</tr>'); } } } else { @@ -358,19 +360,15 @@ function update_table_rows(data) { var rowIndex = move - 1 - i; if (rowIndex >= 0) { $(rows[rowIndex]).html(data[i]); + $(rows[rowIndex]).className = tr_classes; } else { - $(tbody).prepend('<tr>' + data[i] + '</tr>'); + $(tbody).prepend('<tr class="' + tr_classes + '">' + data[i] + '</tr>'); } } } - // Much easier to go through each of the rows once they've all be added. - rows = $('#filter-log-entries>tr'); - for (var i = 0; i < rows.length; i++) { - rows[i].className = 'text-nowrap'; - } - - $("#count").html(rows.length); + var rowCount = $('#filter-log-entries>tr').length; + $("#count").html(rowCount); $('.fa').tooltip(); } @@ -408,7 +406,9 @@ function toggleListDescriptions() { <div class="panel-heading"> <h2 class="panel-title"> <?php + // Force the raw mode table panel title so that JQuery can update it dynamically. $rawfilter = true; + print(system_log_table_panel_title()); ?> <?=" " . gettext('Pause') . " "?><input type="checkbox" onclick="javascript:toggle_pause();" /> @@ -489,6 +489,15 @@ function toggleListDescriptions() { ?> </tbody> </table> + +<script type="text/javascript"> +//<![CDATA[ +events.push(function() { + $("#count").html(<?=count($filterlog);?>); +}); +//]]> +</script> + </div> </div> </div> @@ -523,12 +532,4 @@ events.push(function() { //]]> </script> -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - $("#count").html(<?=count($filterlog);?>); -}); -//]]> -</script> - <?php include("foot.inc"); diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php index df430d1..30d4e7b 100644 --- a/src/usr/local/www/status_logs_vpn.php +++ b/src/usr/local/www/status_logs_vpn.php @@ -261,6 +261,15 @@ if (!$rawfilter) { <pre><?php $rows = dump_clog_no_table($logfile_path, $nentries, true, array($filtertext)); ?></pre> + +<script type="text/javascript"> +//<![CDATA[ +events.push(function() { + $("#count").html(<?=$rows?>); +}); +//]]> +</script> + <?php if ($rows == 0) { print_info_box(gettext('No logs to display')); @@ -516,12 +525,4 @@ function filter_form_vpn() { } ?> -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - $("#count").html(<?=$rows?>); -}); -//]]> -</script> - <?php include("foot.inc"); ?> diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php index f887c53..e1fe2b9 100644 --- a/src/usr/local/www/status_ntpd.php +++ b/src/usr/local/www/status_ntpd.php @@ -209,38 +209,45 @@ include("head.inc"); </tr> </thead> <tbody> - <?php if (isset($config['ntpd']['noquery'])): ?> +<?php + if (isset($config['ntpd']['noquery'])): +?> <tr> <td class="warning" colspan="11"> <?=sprintf(gettext("Statistics unavailable because ntpq and ntpdc queries are disabled in the %sNTP service settings%s"), '<a href="services_ntpd.php">', '</a>');?> </td> </tr> - <?php elseif (count($ntpq_servers) == 0): ?> +<?php + elseif (count($ntpq_servers) == 0): +?> <tr> <td class="warning" colspan="11"> <?=sprintf(gettext("No peers found, %sis the ntp service running?%s"), '<a href="status_services.php">', '</a>');?> </td> </tr> - <?php else: +<?php + else: - $i = 0; - foreach ($ntpq_servers as $server): ?> - <tr> - <td><?=$server['status']?></td> - <td><?=$server['server']?></td> - <td><?=$server['refid']?></td> - <td><?=$server['stratum']?></td> - <td><?=$server['type']?></td> - <td><?=$server['when']?></td> - <td><?=$server['poll']?></td> - <td><?=$server['reach']?></td> - <td><?=$server['delay']?></td> - <td><?=$server['offset']?></td> - <td><?=$server['jitter']?></td> - </tr> <?php - $i++; - endforeach; - endif; + $i = 0; + foreach ($ntpq_servers as $server): +?> + <tr> + <td><?=$server['status']?></td> + <td><?=$server['server']?></td> + <td><?=$server['refid']?></td> + <td><?=$server['stratum']?></td> + <td><?=$server['type']?></td> + <td><?=$server['when']?></td> + <td><?=$server['poll']?></td> + <td><?=$server['reach']?></td> + <td><?=$server['delay']?></td> + <td><?=$server['offset']?></td> + <td><?=$server['jitter']?></td> + </tr> +<?php + $i++; + endforeach; + endif; ?> </tbody> </table> @@ -252,13 +259,14 @@ include("head.inc"); // GPS satellite information (if available) if (($gps_ok) && ($gps_lat) && ($gps_lon)): - $gps_goo_lnk = 2; ?> + $gps_goo_lnk = 2; +?> - <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext("GPS information");?></h2></div> - <div class="panel-body"> - <table class="table table-striped table-hover table-condensed"> - <thead> +<div class="panel panel-default"> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("GPS information");?></h2></div> + <div class="panel-body"> + <table class="table table-striped table-hover table-condensed"> + <thead> <tr> <th> <?=gettext("Clock Latitude"); ?> @@ -266,61 +274,76 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)): <th> <?=gettext("Clock Longitude"); ?> </th> - <?php if (isset($gps_alt)) { ?> - <th> - <?=gettext("Clock Altitude")?> - </th> - <?php $gps_goo_lnk++; - } +<?php + if (isset($gps_alt)) { +?> + <th> + <?=gettext("Clock Altitude")?> + </th> +<?php + $gps_goo_lnk++; + } - if (isset($gps_sat) || isset($gps_satview)) { ?> - <th> - <?=gettext("Satellites")?> - </th> <?php - $gps_goo_lnk++; - }?> - </tr> - </thead> + if (isset($gps_sat) || isset($gps_satview)) { +?> + <th> + <?=gettext("Satellites")?> + </th> +<?php + $gps_goo_lnk++; + } +?> + </tr> + </thead> - <tbody> - <tr> - <td> - <?=printf("%.5f", $gps_lat); ?> (<?=printf("%d", $gps_lat_deg); ?>° <?=printf("%.5f", $gps_lat_min*60); ?><?=$gps_vars[4]; ?>) - </td> - <td> - <?=printf("%.5f", $gps_lon); ?> (<?=printf("%d", $gps_lon_deg); ?>° <?=printf("%.5f", $gps_lon_min*60); ?><?=$gps_vars[6]; ?>) - </td> + <tbody> + <tr> + <td> + <?=printf("%.5f", $gps_lat); ?> (<?=printf("%d", $gps_lat_deg); ?>° <?=printf("%.5f", $gps_lat_min*60); ?><?=$gps_vars[4]; ?>) + </td> + <td> + <?=printf("%.5f", $gps_lon); ?> (<?=printf("%d", $gps_lon_deg); ?>° <?=printf("%.5f", $gps_lon_min*60); ?><?=$gps_vars[6]; ?>) + </td> - <?php if (isset($gps_alt)) { ?> - <td> - <?=$gps_alt . ' ' . $gps_alt_unit?> - </td> - } +<?php + if (isset($gps_alt)) { +?> + <td> + <?=$gps_alt . ' ' . $gps_alt_unit?> + </td> +<?php + } - if (isset($gps_sat) || isset($gps_satview)) { ?> - <td class="text-center"> <?php - if (isset($gps_satview)) { - print(gettext('in view ') . intval($gps_satview)); - } + if (isset($gps_sat) || isset($gps_satview)) { +?> + <td class="text-center"> +<?php + if (isset($gps_satview)) { + print(gettext('in view ') . intval($gps_satview)); + } - if (isset($gps_sat) && isset($gps_satview)) { - print(', '); - } - if (isset($gps_sat)) { - print(gettext('in use ') . $gps_sat); - } ?> - </td> <?php - } - ?> - </tr> - <tr> - <td colspan="<?=$gps_goo_lnk; ?>"><a target="_gmaps" href="http://maps.google.com/?q=<?=$gps_lat; ?>,<?=$gps_lon; ?>"><?=gettext("Google Maps Link");?></a></td> - </tr> - </tbody> - </table> - </div> + if (isset($gps_sat) && isset($gps_satview)) { + print(', '); + } + if (isset($gps_sat)) { + print(gettext('in use ') . $gps_sat); + } +?> + </td> +<?php + } +?> + </tr> + <tr> + <td colspan="<?=$gps_goo_lnk; ?>"><a target="_gmaps" href="http://maps.google.com/?q=<?=$gps_lat; ?>,<?=$gps_lon; ?>"><?=gettext("Google Maps Link");?></a></td> + </tr> + </tbody> + </table> </div> +</div> -<?php endif; +<?php +endif; -include("foot.inc"); ?> +include("foot.inc"); +?> diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php index d958a67..ca516b6 100644 --- a/src/usr/local/www/status_openvpn.php +++ b/src/usr/local/www/status_openvpn.php @@ -160,7 +160,7 @@ include("head.inc"); ?> <a onclick="killClient('<?=$server['mgmt'];?>', '<?=$conn['remote_host'];?>');" style="cursor:pointer;" id="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>" - title="<?php echo gettext("Kill client connection from") . " " . $conn['remote_host']; ?>"> + title="<?php echo sprintf(gettext("Kill client connection from %s"), $conn['remote_host']); ?>"> <i class="fa fa-times"></i> </a> </td> diff --git a/src/usr/local/www/status_pkglogs.php b/src/usr/local/www/status_pkglogs.php index 991a56a..b387fd3 100755 --- a/src/usr/local/www/status_pkglogs.php +++ b/src/usr/local/www/status_pkglogs.php @@ -127,7 +127,7 @@ if ($pkgwithlogging == false) { <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=printf(gettext('Last %1$s %2$s log entries'), $nentries, $curtab)?></h2></div> - <div>class="panel-body"> + <div class="panel-body"> <pre> <?php $package = $config['installedpackages']['package'][$apkgid]; diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php index 4e2eb94..4a3134d 100644 --- a/src/usr/local/www/status_rrd_graph.php +++ b/src/usr/local/www/status_rrd_graph.php @@ -572,7 +572,7 @@ $group->add(new Form_Select( ))->setHelp('Period'); if ($curcat == 'custom') { - $group->setHelp('Any changes to these option may not take affect until the next auto-refresh.'); + $group->setHelp('Any changes to these options may not take affect until the next auto-refresh.'); } $section->add($group); @@ -607,7 +607,7 @@ if ($curcat == 'custom') { ))->setHelp('End'); if ($curcat != 'custom') { - $group->setHelp('Any changes to these option may not take affect until the next auto-refresh'); + $group->setHelp('Any changes to these options may not take affect until the next auto-refresh'); } $section->add($group); diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php index bdd805d..4211a4e 100644 --- a/src/usr/local/www/status_wireless.php +++ b/src/usr/local/www/status_wireless.php @@ -244,9 +244,9 @@ display_top_tabs($tab_array); </form> <div class="infoblock"> <?php -print_info_box('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode<br />' . +print_info_box(gettext('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode<br />' . '<b>Capabilities:</b> E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' . - 'S = Short preamble, s = Short slot time', 'info'); + 'S = Short preamble, s = Short slot time'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php index c3a321c..5c937f7 100644 --- a/src/usr/local/www/system_advanced_misc.php +++ b/src/usr/local/www/system_advanced_misc.php @@ -229,9 +229,9 @@ if ($_POST) { unset($config['system']['powerd_enable']); } - $config['system']['powerd_ac_mode'] = $_POST['ac-power']; - $config['system']['powerd_battery_mode'] = $_POST['battery-power']; - $config['system']['powerd_normal_mode'] = $_POST['unknown-power']; + $config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode']; + $config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode']; + $config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode']; if ($_POST['crypto_hardware']) { $config['system']['crypto_hardware'] = $_POST['crypto_hardware']; diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php index 28b7fc1..d1c38e0 100644 --- a/src/usr/local/www/system_advanced_sysctl.php +++ b/src/usr/local/www/system_advanced_sysctl.php @@ -175,7 +175,7 @@ if ($savemsg) { } if (is_subsystem_dirty('sysctl') && ($act != "edit" )) { - print_apply_box(gettext("The firewall tunables have changed. You must apply the configuration for them to take affect.")); + print_apply_box(gettext("The firewall tunables have changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php index b1b82a2..aa69a84 100644 --- a/src/usr/local/www/system_gateway_groups.php +++ b/src/usr/local/www/system_gateway_groups.php @@ -131,7 +131,7 @@ if ($savemsg) { } if (is_subsystem_dirty('staticroutes')) { - print_apply_box(sprintf(gettext("The gateway configuration has been changed.%sYou must apply the changes in order for them to take effect."), "<br />")); + print_apply_box(gettext("The gateway configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php index 58495e6..4133234 100644 --- a/src/usr/local/www/system_update_settings.php +++ b/src/usr/local/www/system_update_settings.php @@ -65,39 +65,32 @@ require("guiconfig.inc"); require("pkg-utils.inc"); if ($_POST) { - unset($input_errors); - - /* input validation */ - if (($_POST['alturlenable'] == "yes") && (empty($_POST['firmwareurl']))) { - $input_errors[] = gettext("A Firmware Auto Update Base URL must be specified when \"Use an unofficial server for firmware upgrades\" is enabled."); - } - - if (!$input_errors) { - // Set the firmware branch, but only if we are not using it already - if ($_POST['fwbranch']) { - if (($_POST['fwbranch'] == "development") && is_pkg_installed($g['product_name'] . "-repo")) { - pkg_switch_repo(true); - } else if (($_POST['fwbranch'] == "stable") && is_pkg_installed($g['product_name'] . "-repo-devel")) { - pkg_switch_repo(false); - } - } - - if ($_POST['disablecheck'] == "yes") { - $config['system']['firmware']['disablecheck'] = true; - } else { - unset($config['system']['firmware']['disablecheck']); + // Set the firmware branch, but only if we are not using it already + if ($_POST['fwbranch']) { + if (($_POST['fwbranch'] == "development") && !is_pkg_installed($g['product_name'] . "-repo-devel")) { + pkg_switch_repo(true); + pkg_update(true); + } else if (($_POST['fwbranch'] == "stable") && !is_pkg_installed($g['product_name'] . "-repo")) { + pkg_switch_repo(false); + pkg_update(true); } + } - if ($_POST['synconupgrade'] == "yes") { - $config['system']['gitsync']['synconupgrade'] = true; - } else { - unset($config['system']['gitsync']['synconupgrade']); - } - $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; - $config['system']['gitsync']['branch'] = $_POST['branch']; + if ($_POST['disablecheck'] == "yes") { + $config['system']['firmware']['disablecheck'] = true; + } else { + unset($config['system']['firmware']['disablecheck']); + } - write_config(); + if ($_POST['synconupgrade'] == "yes") { + $config['system']['gitsync']['synconupgrade'] = true; + } else { + unset($config['system']['gitsync']['synconupgrade']); } + $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; + $config['system']['gitsync']['branch'] = $_POST['branch']; + + write_config(); } $curcfg = $config['system']['firmware']; @@ -208,34 +201,5 @@ if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) { } // e-o-if(file_exista() print($form); -?> - -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - // Update firmwareurl from preseturls or from the saved alternate if "Unofficial" is checked - function update_firmwareurl() { - if (!$('#alturlenable').prop('checked')) { - $('#firmwareurl').prop('readonly', true) - $('#firmwareurl').val($('#preseturls').val()); - } else { - $('#firmwareurl').prop('readonly', false) - $('#firmwareurl').val("<?=$config['system']['firmware']['alturl']['firmwareurl']?>"); - } - } - - // Call it when preseturls changes - - $('#preseturls, #alturlenable').on('change', function() { - update_firmwareurl(); - }) - - // And call it on page load - update_firmwareurl(); -}); - -//]]> -</script> -<?php include("foot.inc"); diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php index 0cc4620..d991896 100644 --- a/src/usr/local/www/vpn_ipsec.php +++ b/src/usr/local/www/vpn_ipsec.php @@ -268,7 +268,7 @@ display_top_tabs($tab_array); } if (is_subsystem_dirty('ipsec')) { - print_apply_box(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The IPsec tunnel configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } ?> diff --git a/src/usr/local/www/vpn_ipsec_keys.php b/src/usr/local/www/vpn_ipsec_keys.php index 004f274..78dd1d0 100644 --- a/src/usr/local/www/vpn_ipsec_keys.php +++ b/src/usr/local/www/vpn_ipsec_keys.php @@ -115,7 +115,7 @@ if ($savemsg) { } if (is_subsystem_dirty('ipsec')) { - print_apply_box(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The IPsec tunnel configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } ?> diff --git a/src/usr/local/www/vpn_ipsec_mobile.php b/src/usr/local/www/vpn_ipsec_mobile.php index 869cf6e..21e365a 100644 --- a/src/usr/local/www/vpn_ipsec_mobile.php +++ b/src/usr/local/www/vpn_ipsec_mobile.php @@ -437,7 +437,7 @@ if ($savemsg) { print_info_box($savemsg, 'success'); } if (is_subsystem_dirty('ipsec')) { - print_apply_box(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The IPsec tunnel configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } foreach ($a_phase1 as $ph1ent) { if (isset($ph1ent['mobile'])) { diff --git a/src/usr/local/www/vpn_l2tp_users.php b/src/usr/local/www/vpn_l2tp_users.php index 5191e16..a5c5a0e 100644 --- a/src/usr/local/www/vpn_l2tp_users.php +++ b/src/usr/local/www/vpn_l2tp_users.php @@ -110,7 +110,7 @@ if (isset($config['l2tp']['radius']['enable'])) { } if (is_subsystem_dirty('l2tpusers')) { - print_apply_box(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>"); + print_apply_box(gettext("The l2tp user list has been modified.") . "<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>"); } diff --git a/src/usr/local/www/widgets/widgets/log.widget.php b/src/usr/local/www/widgets/widgets/log.widget.php index 967d9dd..3940431 100644 --- a/src/usr/local/www/widgets/widgets/log.widget.php +++ b/src/usr/local/www/widgets/widgets/log.widget.php @@ -169,7 +169,7 @@ $filterlog = conv_log_filter($filter_logfile, $nentries, 50, $filterfieldsarray) <tr> <td><a href="#" onclick="javascript:getURL('status_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);" role="button" data-toggle="popover" data-trigger="hover" - data-title=<?=gettext("Rule that triggered this action")?> + data-title="<?=gettext("Rule that triggered this action")?>" data-content="<?=htmlspecialchars($rule)?>"> <i class="fa fa-<?=$iconfn?>"></i> </a></td> |