diff options
author | k-paulius <k.dash.paulius@gmail.com> | 2016-02-13 17:12:08 -0600 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-02-14 15:09:54 -0500 |
commit | 1bd5e62dced82f354e9d769cab8384955f0b1d82 (patch) | |
tree | d4e511d139c82ec35a2421e555d01cd616d7c275 /src/usr/local/www/diag_testport.php | |
parent | 7c945f74712d3c2ef8d1beee65b881cfcf80e6bd (diff) | |
download | pfsense-1bd5e62dced82f354e9d769cab8384955f0b1d82.zip pfsense-1bd5e62dced82f354e9d769cab8384955f0b1d82.tar.gz |
Use print_info_box() to generate alerts
Diffstat (limited to 'src/usr/local/www/diag_testport.php')
-rw-r--r-- | src/usr/local/www/diag_testport.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usr/local/www/diag_testport.php b/src/usr/local/www/diag_testport.php index 9ac7278..570289b 100644 --- a/src/usr/local/www/diag_testport.php +++ b/src/usr/local/www/diag_testport.php @@ -225,20 +225,20 @@ if ($input_errors) { // User asked for a port test if ($retval == 0) { // Good host & port - $alert_text = '<div class="alert alert-success" role="alert">' . sprintf(gettext('Port test to host: %1$s Port: %2$s successful'), $host, $port); + $alert_text = sprintf(gettext('Port test to host: %1$s Port: %2$s successful.'), $host, $port); if ($showtext) { $alert_text .= ' ' . gettext('Any text received from the host will be shown below the form.'); } + print_info_box($alert_text, 'success', false); } else { // netcat exit value != 0 - $alert_text = '<div class="alert alert-danger" role="alert">'; if ($showtext) { - $alert_text .= gettext('No output received, or connection failed. Try with "Show Remote Text" unchecked first.'); + $alert_text = gettext('No output received, or connection failed. Try with "Show Remote Text" unchecked first.'); } else { - $alert_text .= gettext('Connection failed.'); + $alert_text = gettext('Connection failed.'); } + print_info_box($alert_text, 'danger', false); } - print ($alert_text . '</div>'); } else { // First time, new page print_info_box(gettext('This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port.') . " " . |