summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/filter.inc8
-rw-r--r--src/etc/inc/pkg-utils.inc82
-rw-r--r--src/etc/inc/services.inc56
-rw-r--r--src/etc/inc/shaper.inc90
-rw-r--r--src/etc/inc/system.inc8
-rw-r--r--src/etc/inetd.conf1
-rw-r--r--src/etc/pfSense.obsoletedfiles3
-rwxr-xr-xsrc/etc/rc.php_ini_setup6
-rwxr-xr-xsrc/etc/rc.restart_webgui7
-rw-r--r--src/usr/local/pkg/miniupnpd.inc3
-rwxr-xr-xsrc/usr/local/sbin/ovpn_auth_verify1
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade25
-rw-r--r--src/usr/local/www/diag_confbak.php15
-rwxr-xr-xsrc/usr/local/www/diag_dns.php6
-rw-r--r--src/usr/local/www/diag_nanobsd.php38
-rw-r--r--src/usr/local/www/diag_ndp.php4
-rw-r--r--src/usr/local/www/diag_pftop.php3
-rw-r--r--src/usr/local/www/diag_sockets.php4
-rw-r--r--src/usr/local/www/diag_tables.php77
-rw-r--r--src/usr/local/www/diag_traceroute.php2
-rw-r--r--src/usr/local/www/exec.php21
-rw-r--r--src/usr/local/www/filebrowser/browser.php12
-rw-r--r--src/usr/local/www/firewall_aliases.php4
-rw-r--r--src/usr/local/www/firewall_nat_1to1.php4
-rw-r--r--src/usr/local/www/firewall_nat_out.php4
-rw-r--r--src/usr/local/www/firewall_rules.php2
-rw-r--r--src/usr/local/www/firewall_schedule.php4
-rw-r--r--src/usr/local/www/firewall_schedule_edit.php13
-rw-r--r--src/usr/local/www/firewall_shaper.php4
-rw-r--r--src/usr/local/www/firewall_shaper_queues.php8
-rw-r--r--src/usr/local/www/firewall_shaper_vinterface.php55
-rw-r--r--src/usr/local/www/firewall_virtual_ip.php4
-rw-r--r--src/usr/local/www/firewall_virtual_ip_edit.php4
-rw-r--r--src/usr/local/www/guiconfig.inc10
-rwxr-xr-xsrc/usr/local/www/head.inc10
-rw-r--r--src/usr/local/www/index.php3
-rw-r--r--src/usr/local/www/interfaces.php21
-rw-r--r--src/usr/local/www/interfaces_assign.php10
-rw-r--r--src/usr/local/www/interfaces_groups.php4
-rw-r--r--src/usr/local/www/interfaces_lagg_edit.php11
-rw-r--r--src/usr/local/www/interfaces_qinq.php4
-rw-r--r--src/usr/local/www/interfaces_vlan.php4
-rw-r--r--src/usr/local/www/jquery/pfSenseHelpers.js31
-rw-r--r--src/usr/local/www/load_balancer_pool.php2
-rw-r--r--src/usr/local/www/load_balancer_virtual_server.php2
-rwxr-xr-xsrc/usr/local/www/pkg.php14
-rw-r--r--src/usr/local/www/pkg_edit.php19
-rw-r--r--src/usr/local/www/pkg_mgr.php218
-rw-r--r--src/usr/local/www/pkg_mgr_install.php2
-rw-r--r--src/usr/local/www/services_captiveportal.php44
-rw-r--r--src/usr/local/www/services_captiveportal_filemanager.php2
-rw-r--r--src/usr/local/www/services_captiveportal_hostname.php6
-rw-r--r--src/usr/local/www/services_captiveportal_ip.php6
-rw-r--r--src/usr/local/www/services_captiveportal_mac.php4
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers.php4
-rw-r--r--src/usr/local/www/services_dhcp.php2
-rw-r--r--src/usr/local/www/services_dhcpv6.php9
-rw-r--r--src/usr/local/www/services_dnsmasq.php18
-rw-r--r--src/usr/local/www/services_igmpproxy.php4
-rw-r--r--src/usr/local/www/services_ntpd.php39
-rw-r--r--src/usr/local/www/services_ntpd_gps.php22
-rw-r--r--src/usr/local/www/services_ntpd_pps.php34
-rw-r--r--src/usr/local/www/services_pppoe_edit.php28
-rw-r--r--src/usr/local/www/services_rfc2136_edit.php2
-rw-r--r--src/usr/local/www/services_snmp.php2
-rw-r--r--src/usr/local/www/services_unbound.php4
-rw-r--r--src/usr/local/www/services_wol.php15
-rw-r--r--src/usr/local/www/status_dhcp_leases.php38
-rw-r--r--src/usr/local/www/status_dhcpv6_leases.php36
-rw-r--r--src/usr/local/www/status_graph.php4
-rw-r--r--src/usr/local/www/status_graph_cpu.php4
-rwxr-xr-xsrc/usr/local/www/status_logs.php2
-rw-r--r--src/usr/local/www/status_logs_common.inc8
-rw-r--r--src/usr/local/www/status_logs_filter.php9
-rwxr-xr-xsrc/usr/local/www/status_logs_filter_dynamic.php6
-rw-r--r--src/usr/local/www/status_logs_filter_summary.php13
-rw-r--r--src/usr/local/www/status_logs_vpn.php2
-rw-r--r--src/usr/local/www/status_ntpd.php2
-rw-r--r--src/usr/local/www/status_queues.php12
-rw-r--r--src/usr/local/www/status_rrd_graph.php6
-rw-r--r--src/usr/local/www/status_wireless.php8
-rw-r--r--src/usr/local/www/system_advanced_admin.php6
-rw-r--r--src/usr/local/www/system_advanced_firewall.php4
-rw-r--r--src/usr/local/www/system_advanced_network.php4
-rw-r--r--src/usr/local/www/system_gateway_groups.php4
-rw-r--r--src/usr/local/www/system_gateways.php6
-rw-r--r--src/usr/local/www/system_groupmanager.php2
-rw-r--r--src/usr/local/www/system_groupmanager_addprivs.php2
-rw-r--r--src/usr/local/www/system_routes.php4
-rw-r--r--src/usr/local/www/system_usermanager.php4
-rw-r--r--src/usr/local/www/system_usermanager_addprivs.php2
-rw-r--r--src/usr/local/www/system_usermanager_passwordmg.php2
-rw-r--r--src/usr/local/www/vpn_ipsec.php4
-rw-r--r--src/usr/local/www/vpn_ipsec_mobile.php2
-rw-r--r--src/usr/local/www/vpn_ipsec_settings.php4
-rw-r--r--src/usr/local/www/vpn_l2tp.php6
-rw-r--r--src/usr/local/www/vpn_openvpn_client.php2
-rw-r--r--src/usr/local/www/widgets/widgets/services_status.widget.php2
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php4
-rw-r--r--src/usr/local/www/wizard.php13
100 files changed, 775 insertions, 640 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index a06b63e..7b8692b 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -4038,6 +4038,14 @@ function filter_generate_ipsec_rules($log = array()) {
if (strpos($ph1ent['interface'], "_vip")) {
$parentinterface = get_configured_carp_interface_list($ph1ent['interface'], '', 'iface');
+ } else if (is_ipaddr($ph1ent['interface'])) {
+ if (is_array($config['virtualip']['vip'])) {
+ foreach ($config['virtualip']['vip'] as $vip) {
+ if ($ph1ent['interface'] == $vip['subnet']) {
+ $parentinterface = $vip['interface'];
+ }
+ }
+ }
} else {
$parentinterface = $ph1ent['interface'];
}
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc
index fc0a126..55a0395 100644
--- a/src/etc/inc/pkg-utils.inc
+++ b/src/etc/inc/pkg-utils.inc
@@ -96,30 +96,7 @@ function pkg_remove_prefix(&$pkg_name) {
function pkg_update($force = false) {
global $g;
- $now = strftime('%s');
- $last_update_file="{$g['varrun_path']}/{$g['product_name']}-upgrade-last-update";
- if (!$force) {
- if (file_exists($last_update_file)) {
- $last_update = rtrim(file_get_contents($last_update_file), "\n");
- if (!is_numericint($last_update)) {
- $last_update = 0;
- }
- }
-
- if ($last_update > 0) {
- if ($now > $last_update && ($now - $last_update) <= (60 * 60)) {
- return true;
- }
- }
- }
-
- $rc = pkg_call("update -f");
-
- if ($rc) {
- file_put_contents($last_update_file, $now . "\n");
- }
-
- return $rc;
+ return pkg_call("update" . ($force ? " -f" : ""));
}
/* return an array with necessary environment vars for pkg */
@@ -128,8 +105,7 @@ function pkg_env() {
$pkg_env_vars = array(
"HTTP_USER_AGENT" => $user_agent,
- "ASSUME_ALWAYS_YES" => "true",
- "REPO_AUTOUPDATE" => "false"
+ "ASSUME_ALWAYS_YES" => "true"
);
if ($g['platform'] == "nanobsd" ||
@@ -142,7 +118,7 @@ function pkg_env() {
}
/* Execute a pkg call */
-function pkg_call($params, $mute = false, $readonly = false) {
+function pkg_call($params, $mute = false) {
global $g, $config;
if (empty($params)) {
@@ -159,18 +135,14 @@ function pkg_call($params, $mute = false, $readonly = false) {
2 => array("pipe", "w") /* stderr */
);
- if (!$readonly) {
- conf_mount_rw();
- }
+ conf_mount_rw();
pkg_debug("pkg_call(): {$params}\n");
$process = proc_open("/usr/sbin/pkg {$params}", $descriptorspec, $pipes,
'/', pkg_env());
if (!is_resource($process)) {
- if (!$readonly) {
- conf_mount_ro();
- }
+ conf_mount_ro();
return false;
}
@@ -222,9 +194,7 @@ function pkg_call($params, $mute = false, $readonly = false) {
fclose($pipes[2]);
proc_close($process);
- if (!$readonly) {
- conf_mount_ro();
- }
+ conf_mount_ro();
if (!isset($rc)) {
$rc = $status['exitcode'];
@@ -246,7 +216,7 @@ function pkg_call($params, $mute = false, $readonly = false) {
}
/* Execute pkg with $params, fill stdout and stderr and return pkg rc */
-function pkg_exec($params, &$stdout, &$stderr, $readonly = false) {
+function pkg_exec($params, &$stdout, &$stderr) {
global $g, $config;
if (empty($params)) {
@@ -263,18 +233,14 @@ function pkg_exec($params, &$stdout, &$stderr, $readonly = false) {
2 => array("pipe", "w") /* stderr */
);
- if (!$readonly) {
- conf_mount_rw();
- }
+ conf_mount_rw();
pkg_debug("pkg_exec(): {$params}\n");
$process = proc_open("/usr/sbin/pkg {$params}", $descriptorspec, $pipes,
'/', pkg_env());
if (!is_resource($process)) {
- if (!$readonly) {
- conf_mount_ro();
- }
+ conf_mount_ro();
return -1;
}
@@ -290,9 +256,7 @@ function pkg_exec($params, &$stdout, &$stderr, $readonly = false) {
}
fclose($pipes[2]);
- if (!$readonly) {
- conf_mount_ro();
- }
+ conf_mount_ro();
return proc_close($process);
}
@@ -308,7 +272,7 @@ function pkg_version_compare($v1, $v2) {
return '?';
}
- $rc = pkg_exec("version -t '{$v1}' '{$v2}'", $stdout, $stderr, true);
+ $rc = pkg_exec("version -t '{$v1}' '{$v2}'", $stdout, $stderr);
if ($rc != 0) {
return '?';
@@ -325,7 +289,7 @@ function is_pkg_installed($pkg_name) {
return false;
}
- return pkg_call("info -e " . $pkg_name, true, true);
+ return pkg_call("info -e " . $pkg_name, true);
}
/* Install package, $pkg_name should not contain prefix */
@@ -421,21 +385,7 @@ function get_pkg_info($pkgs = 'all', $info = 'all') {
$pkgs = $g['pkg_prefix'];
}
- /* Make sure repo metadata is up2date */
- update_status("\n" .
- gettext("Updating package repository metadada...") . "\n");
-
- if (!pkg_update()) {
- $input_errors[] = gettext(
- "ERROR: An error occurred when updating packages repository. Aborting...")
- . "\n";
- update_status("\n" . gettext(
- "ERROR: An error occurred when updating packages repository. Aborting...")
- . "\n");
- return array();
- }
-
- $rc = pkg_exec("search -U --raw-format json-compact " . $pkgs, $out, $err, true);
+ $rc = pkg_exec("search --raw-format json-compact " . $pkgs, $out, $err);
if ($rc != 0) {
update_status("\n" . gettext(
@@ -470,7 +420,7 @@ function get_pkg_info($pkgs = 'all', $info = 'all') {
if (is_pkg_installed($pkg_info['name'])) {
$pkg_info['installed'] = true;
- $rc = pkg_exec("query %v {$pkg_info['name']}", $out, $err, true);
+ $rc = pkg_exec("query %v {$pkg_info['name']}", $out, $err);
if ($rc != 0) {
update_status("\n" . gettext(
@@ -1005,10 +955,6 @@ function package_reinstall_all() {
sleep(1);
}
update_status("\n");
- } else {
- if (!pkg_update()) {
- return false;
- }
}
$pkg_info = get_pkg_info();
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 0a1d56a..7eec2ff 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -659,15 +659,39 @@ EOPP;
} else {
$newzone['domain-name'] = $config['system']['domain'];
}
- $revsubnet = explode(".", $subnet);
- $revsubnet = array_reverse($revsubnet);
- foreach ($revsubnet as $octet) {
- if ($octet != "0") {
+
+ $revsubnet = array_reverse(explode('.',$subnet));
+
+ /* Take care of full classes first */
+ switch ($ifcfgsn) {
+ case 8:
+ $start_octet = 3;
+ break;
+ case 16:
+ $start_octet = 2;
+ break;
+ case 24:
+ $start_octet = 1;
+ break;
+ default:
+ $start_octet = 0;
+ /* Add subnet bitmask to first octet */
+ $revsubnet[0] .= '-' . $ifcfgsn;
break;
+
+ }
+
+ $ptr_domain = '';
+ for ($octet = 0; $octet <= 3; $octet++) {
+ if ($octet < $start_octet) {
+ continue;
}
- array_shift($revsubnet);
+ $ptr_domain .= (empty($ptr_domain) ? '' : '.');
+ $ptr_domain .= $revsubnet[$octet];
}
- $newzone['ptr-domain'] = implode(".", $revsubnet) . ".in-addr.arpa";
+ $ptr_domain .= ".in-addr.arpa";
+ $newzone['ptr-domain'] = $ptr_domain;
+ unset($ptr_domain, $revsubnet, $start_octet);
}
if (is_array($dhcpifconf['dnsserver']) && ($dhcpifconf['dnsserver'][0])) {
@@ -1043,6 +1067,9 @@ EOD;
if ($newzone['domain-name']) {
if ($need_ddns_updates) {
$newzone['dns-servers'] = array($dhcpifconf['ddnsdomainprimary']);
+ $newzone['ddnsdomainkeyname'] = $dhcpifconf['ddnsdomainkeyname'];
+ $newzone['ddnsdomainkey'] = $dhcpifconf['ddnsdomainkey'];
+ $dhcpdconf .= dhcpdkey($dhcpifconf);
}
$ddns_zones[] = $newzone;
}
@@ -1052,8 +1079,7 @@ EOD;
$dhcpdconf .= "ddns-update-style interim;\n";
$dhcpdconf .= "update-static-leases on;\n";
- $dhcpdconf .= dhcpdkey($dhcpifconf);
- $dhcpdconf .= dhcpdzones($ddns_zones, $dhcpifconf);
+ $dhcpdconf .= dhcpdzones($ddns_zones);
}
/* write dhcpd.conf */
@@ -1098,7 +1124,7 @@ function dhcpdkey($dhcpifconf) {
return $dhcpdconf;
}
-function dhcpdzones($ddns_zones, $dhcpifconf) {
+function dhcpdzones($ddns_zones) {
$dhcpdconf = "";
if (is_array($ddns_zones)) {
@@ -1127,8 +1153,8 @@ function dhcpdzones($ddns_zones, $dhcpifconf) {
if (is_ipaddrv4($secondary)) {
$dhcpdconf .= " secondary {$secondary};\n";
}
- if ($dhcpifconf['ddnsdomainkeyname'] <> "" && $dhcpifconf['ddnsdomainkey'] <> "") {
- $dhcpdconf .= " key {$dhcpifconf['ddnsdomainkeyname']};\n";
+ if ($zone['ddnsdomainkeyname'] <> "" && $zone['ddnsdomainkey'] <> "") {
+ $dhcpdconf .= " key {$zone['ddnsdomainkeyname']};\n";
}
$dhcpdconf .= "}\n";
$added_zones[] = $zone['domain-name'];
@@ -1139,8 +1165,8 @@ function dhcpdzones($ddns_zones, $dhcpifconf) {
if (is_ipaddrv4($secondary)) {
$dhcpdconf .= " secondary {$secondary};\n";
}
- if ($dhcpifconf['ddnsdomainkeyname'] <> "" && $dhcpifconf['ddnsdomainkey'] <> "") {
- $dhcpdconf .= " key {$dhcpifconf['ddnsdomainkeyname']};\n";
+ if ($zone['ddnsdomainkeyname'] <> "" && $zone['ddnsdomainkey'] <> "") {
+ $dhcpdconf .= " key {$zone['ddnsdomainkeyname']};\n";
}
$dhcpdconf .= "}\n";
$added_zones[] = $zone['ptr-domain'];
@@ -1353,6 +1379,8 @@ EOD;
$newzone = array();
$newzone['domain-name'] = $dhcpv6ifconf['domain'];
$newzone['dns-servers'][] = $dhcpv6ifconf['ddnsdomainprimary'];
+ $newzone['ddnsdomainkeyname'] = $dhcpv6ifconf['ddnsdomainkeyname'];
+ $newzone['ddnsdomainkey'] = $dhcpv6ifconf['ddnsdomainkey'];
$ddns_zones[] = $newzone;
}
@@ -1461,7 +1489,7 @@ EOD;
if ($dhcpv6ifconf['domain']) {
$dhcpdv6conf .= dhcpdkey($dhcpv6ifconf);
- $dhcpdv6conf .= dhcpdzones($ddns_zones, $dhcpv6ifconf);
+ $dhcpdv6conf .= dhcpdzones($ddns_zones);
}
if ($config['dhcpdv6'][$dhcpv6if]['ramode'] <> "unmanaged" && isset($config['interfaces'][$dhcpv6if]['enable'])) {
diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc
index 25afd86..0294154 100644
--- a/src/etc/inc/shaper.inc
+++ b/src/etc/inc/shaper.inc
@@ -292,7 +292,7 @@ class altq_root_queue {
var $interface;
var $tbrconfig ;
var $bandwidth;
- var $bandwidthtype; /* b, Kb, Mb */
+ var $bandwidthtype; /* b, Kb, Mb, Gb, % */
var $scheduler;
var $qlimit;
var $queues = array();
@@ -383,6 +383,28 @@ class altq_root_queue {
$this->qlimit = $limit;
}
+ function GetBwscaleText() {
+ switch ($this->bandwidthtype) {
+ case "b":
+ $bwscaletext = "Bit/s";
+ break;
+ case "Kb":
+ $bwscaletext = "Kbit/s";
+ break;
+ case "Mb":
+ $bwscaletext = "Mbit/s";
+ break;
+ case "Gb":
+ $bwscaletext = "Gbit/s";
+ break;
+ default:
+ /* For others that do not need translating like % */
+ $bwscaletext = $this->bandwidthtype;
+ break;
+ }
+ return $bwscaletext;
+ }
+
function validate_input($data, &$input_errors) {
$reqdfields[] = "bandwidth";
@@ -719,7 +741,7 @@ class altq_root_queue {
$form .= 'Bandwidth';
$form .= ' </dt>';
$form .= ' <dd>';
- $form .= $this->GetBandwidth() . '&nbsp;' . $this->GetBwscale();
+ $form .= $this->GetBandwidth() . '&nbsp;' . $this->GetBwscaleText();
$form .= ' </dd>';
$form .= ' <dt>';
@@ -792,10 +814,10 @@ class altq_root_queue {
'bandwidthtype',
null,
$this->GetBwscale(),
- array('Kb' => 'Kb',
- 'Mb' => 'Mb',
- 'Gb' => 'Gb',
- 'b' => 'b',
+ array('Kb' => 'Kbit/s',
+ 'Mb' => 'Mbit/s',
+ 'Gb' => 'Gbit/s',
+ 'b' => 'Bit/s',
'%' => '%')
));
@@ -1022,6 +1044,28 @@ class priq_queue {
$this->qack = $ack;
}
+ function GetBwscaleText() {
+ switch ($this->qbandwidthtype) {
+ case "b":
+ $bwscaletext = "Bit/s";
+ break;
+ case "Kb":
+ $bwscaletext = "Kbit/s";
+ break;
+ case "Mb":
+ $bwscaletext = "Mbit/s";
+ break;
+ case "Gb":
+ $bwscaletext = "Gbit/s";
+ break;
+ default:
+ /* For others that do not need translating like % */
+ $bwscaletext = $this->qbandwidthtype;
+ break;
+ }
+ return $bwscaletext;
+ }
+
function build_javascript() {
$javascript = "<script type=\"text/javascript\">";
$javascript .= "//<![CDATA[\n";
@@ -1449,7 +1493,7 @@ class priq_queue {
$form .= 'Bandwidth';
$form .= ' </dt>';
$form .= ' <dd>';
- $form .= $this->GetBandwidth() . '&nbsp;' . $this->GetBwscale();
+ $form .= $this->GetBandwidth() . '&nbsp;' . $this->GetBwscaleText();
$form .= ' </dd>';
$tmpvalue = $this->GetQpriority();
@@ -2220,10 +2264,10 @@ EOJS;
'bandwidthtype',
null,
$this->GetBwscale(),
- array('Kb' => 'Kb',
- 'Mb' => 'Mb',
- 'Gb' => 'Gb',
- 'b' => 'b',
+ array('Kb' => 'Kbit/s',
+ 'Mb' => 'Mbit/s',
+ 'Gb' => 'Gbit/s',
+ 'b' => 'Bit/s',
'%' => '%')
));
@@ -2778,10 +2822,10 @@ class cbq_queue extends priq_queue {
'bandwidthtype',
null,
$this->GetBwscale(),
- array('Kb' => 'Kb',
- 'Mb' => 'Mb',
- 'Gb' => 'Gb',
- 'b' => 'b',
+ array('Kb' => 'Kbit/s',
+ 'Mb' => 'Mbit/s',
+ 'Gb' => 'Gbit/s',
+ 'b' => 'Bit/s',
'%' => '%')
));
@@ -3079,10 +3123,10 @@ class fairq_queue extends priq_queue {
'bandwidthtype',
null,
$this->GetBwscale(),
- array('Kb' => 'Kb',
- 'Mb' => 'Mb',
- 'Gb' => 'Gb',
- 'b' => 'b',
+ array('Kb' => 'Kbit/s',
+ 'Mb' => 'Mbit/s',
+ 'Gb' => 'Gbit/s',
+ 'b' => 'Bit/s',
'%' => '%')
));
@@ -3803,13 +3847,13 @@ EOD;
$form .= "</select>";
$form .= "</td>";
$form .= '<td>';
- $form .= '<a type="button" class="btn btn-default" onclick="removeBwRow(this); return false;">' . gettext('Remove') . '</a>';
+ $form .= '<a class="btn btn-default" onclick="removeBwRow(this); return false;">' . gettext('Remove') . '</a>';
$form .= "</td></tr>";
}
}
$form .= "</tbody></table></div><br />";
- $form .= '<a type="button" class="btn btn-sm btn-success" onclick="javascript:addBwRowTo(\'maintable\'); return false;" >';
+ $form .= '<a class="btn btn-sm btn-success" onclick="javascript:addBwRowTo(\'maintable\'); return false;" >';
$form .= gettext("Add another schedule") . "</a>";
return($form);
@@ -3909,7 +3953,7 @@ EOD;
null,
$mask['bitsv6'],
array_combine(range(128, 1, -1), range(128, 1, -1))
- ))->setHelp('IPV6 mask bits' . '<br />' . '<font face="consolas">ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/?</font>');
+ ))->setHelp('IPV6 mask bits' . '<br />' . '<span style="font-family:consolas">ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/?</span>');
$section->add($group);
@@ -4213,7 +4257,7 @@ class dnqueue_class extends dummynet_class {
null,
$mask['bitsv6'],
array_combine(range(128, 1, -1), range(128, 1, -1))
- ))->setHelp('IPV6 mask bits' . '<br />' . '<font face="consolas">ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/?</font>');
+ ))->setHelp('IPV6 mask bits' . '<br />' . '<span style="font-family:consolas">ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/?</span>');
$section->add($group);
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index cc3d184..77d5876 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -1182,7 +1182,8 @@ function system_generate_nginx_config($filename,
$cp_hostcheck .= "\t\t}\n";
}
}
- if (isset($config['captiveportal'][$captive_portal]['httpsname'])) {
+ if (isset($config['captiveportal'][$captive_portal]['httpsname']) &&
+ is_domain($config['captiveportal'][$captive_portal]['httpsname'])) {
$cp_hostcheck .= "\t\tif (\$http_host = {$config['captiveportal'][$captive_portal]['httpsname']}) {\n";
$cp_hostcheck .= "\t\t\tset \$cp_redirect no;\n";
$cp_hostcheck .= "\t\t}\n";
@@ -1278,15 +1279,16 @@ EOD;
$nginx_config .= "\t\tssl_certificate_key {$g['varetc_path']}/{$key_location};\n";
$nginx_config .= "\t\tssl_session_timeout 10m;\n";
$nginx_config .= "\t\tkeepalive_timeout 70;\n";
- $nginx_config .= "\t\tssl_session_cache shared:SSL:100m;\n";
+ $nginx_config .= "\t\tssl_session_cache shared:SSL:10m;\n";
$nginx_config .= "\t\tssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n";
$nginx_config .= "\t\tssl_ciphers \"EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH\";\n";
$nginx_config .= "\t\tssl_prefer_server_ciphers on;\n";
- $nginx_config .= "\t\tadd_header Strict-Transport-Security \"max-age=31536000; preload\";\n";
+ $nginx_config .= "\t\tadd_header Strict-Transport-Security \"max-age=31536000\";\n";
$nginx_config .= "\t\tadd_header X-Content-Type-Options nosniff;\n";
$nginx_config .= "\t\tssl_session_tickets off;\n";
$nginx_config .= "\t\tssl_stapling on;\n";
$nginx_config .= "\t\tssl_stapling_verify on;\n";
+ $nginx_config .= "\t\tssl_dhparam /etc/dh-parameters.4096;\n";
$nginx_config .= "\n";
}
diff --git a/src/etc/inetd.conf b/src/etc/inetd.conf
deleted file mode 100644
index 0ff37ae..0000000
--- a/src/etc/inetd.conf
+++ /dev/null
@@ -1 +0,0 @@
-tftp-proxy dgram udp wait root /usr/libexec/tftp-proxy tftp-proxy \ No newline at end of file
diff --git a/src/etc/pfSense.obsoletedfiles b/src/etc/pfSense.obsoletedfiles
index ec737bc..4f6f453 100644
--- a/src/etc/pfSense.obsoletedfiles
+++ b/src/etc/pfSense.obsoletedfiles
@@ -22,6 +22,7 @@
/etc/inc/sysctl.inc
/etc/inc/uuid.php
/etc/inc/zeromq.inc
+/etc/inetd.conf
/etc/isdn
/etc/locate.rc
/etc/mail.rc
@@ -68,6 +69,7 @@
/etc/rc.d/hcsecd
/etc/rc.d/idmapd
/etc/rc.d/ike
+/etc/rc.d/inetd
/etc/rc.d/ip6fw
/etc/rc.d/ipxrouted
/etc/rc.d/isdnd
@@ -839,6 +841,7 @@
/usr/sbin/config_lock.sh
/usr/sbin/config_unlock.sh
/usr/sbin/freebsd-update
+/usr/sbin/inetd
/usr/sbin/ispcvt
/usr/sbin/local-unbound-setup
/usr/sbin/manctl
diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup
index dbc5af0..c0b37c8 100755
--- a/src/etc/rc.php_ini_setup
+++ b/src/etc/rc.php_ini_setup
@@ -181,6 +181,7 @@ implicit_flush = true
magic_quotes_gpc = Off
max_execution_time = 900
max_input_time = 1800
+max_input_vars = 5000
register_argc_argv = On
register_long_arrays = Off
variables_order = "GPCS"
@@ -198,6 +199,8 @@ log_errors=on
error_log=/tmp/PHP_errors.log
extension_dir=${EXTENSIONSDIR}
date.timezone="${TIMEZONE}"
+session.hash_bits_per_character = 5
+session.hash_function = 1
; Extensions
@@ -249,15 +252,12 @@ fi
/bin/cat >>/usr/local/etc/php.ini <<EOF
[suhosin]
-suhosin.get.max_array_depth = 5000
suhosin.get.max_array_index_length = 256
suhosin.get.max_vars = 5000
suhosin.get.max_value_length = 500000
-suhosin.post.max_array_depth = 5000
suhosin.post.max_array_index_length = 256
suhosin.post.max_vars = 5000
suhosin.post.max_value_length = 500000
-suhosin.request.max_array_depth = 5000
suhosin.request.max_array_index_length = 256
suhosin.request.max_vars = 5000
suhosin.request.max_value_length = 500000
diff --git a/src/etc/rc.restart_webgui b/src/etc/rc.restart_webgui
index d65b4d3..45034ac 100755
--- a/src/etc/rc.restart_webgui
+++ b/src/etc/rc.restart_webgui
@@ -10,7 +10,12 @@ require_once("rrd.inc");
echo "Restarting webConfigurator...";
-sigkillbypid("{$g['varrun_path']}/nginx-webConfigurator.pid", "TERM");
+/* Stop all running nginx processes */
+$pidfiles = glob("{$g['varrun_path']}/nginx*.pid");
+
+foreach ($pidfiles as $pidfile) {
+ killbypid($pidfile);
+}
system_webgui_start();
diff --git a/src/usr/local/pkg/miniupnpd.inc b/src/usr/local/pkg/miniupnpd.inc
index 8b258e0..ecf187b 100644
--- a/src/usr/local/pkg/miniupnpd.inc
+++ b/src/usr/local/pkg/miniupnpd.inc
@@ -224,6 +224,9 @@
$config_text .= "system_uptime=yes\n";
}
+ /* set secure_mode */
+ $config_text .= "secure_mode=yes\n";
+
/* set webgui url */
if (!empty($config['system']['webgui']['protocol'])) {
$config_text .= "presentation_url={$config['system']['webgui']['protocol']}://{$webgui_ip}";
diff --git a/src/usr/local/sbin/ovpn_auth_verify b/src/usr/local/sbin/ovpn_auth_verify
index b38fcb9..e7b8c6c 100755
--- a/src/usr/local/sbin/ovpn_auth_verify
+++ b/src/usr/local/sbin/ovpn_auth_verify
@@ -4,6 +4,7 @@ if [ "$1" = "tls" ]; then
RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.tls-verify.php -d "servercn=$2&depth=$3&certdepth=$4&certsubject=$5")
else
# Single quoting $password breaks getting the value from the variable.
+ # Base64 and urlEncode usernames and passwords
password=$(echo -n "${password}" | openssl enc -base64 | sed -e 's/=/%3D/g')
username=$(echo -n "${username}" | openssl enc -base64 | sed -e 's/=/%3D/g')
RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.auth-user.php -d "username=$username&password=$password&cn=$common_name&strictcn=$3&authcfg=$2&modeid=$4")
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 297476d..2ce7421 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -244,25 +244,10 @@ pkg_update() {
local _force=""
if [ "${1}" = "force" ]; then
- local _force=1
+ _force=" -f"
fi
- if [ -z "${_force}" -a -f ${last_update_file} ]; then
- local _last_update=$(head -n 1 ${last_update_file})
- # Verify if content contains only numbers
- if echo "${_last_update}" | grep -E -q '^[0-9]+$'; then
- local _now=$(date +%s)
- # Only run update hourly, and if last update is in the future
- [ ${_now} -gt ${_last_update} -a $((${_now} - ${_last_update})) -le $((60 * 60)) ] \
- && unset _run_update
- fi
- fi
-
- [ -z "${_run_update}" ] \
- && return 0
-
- _exec "pkg ${pkg_chroot} update" "Updating repositories" mute
- date +%s > ${last_update_file}
+ _exec "pkg ${pkg_chroot} update${_force}" "Updating repositories metadata"
}
pkg_upgrade() {
@@ -609,8 +594,6 @@ pkg_install() {
_exit 1
fi
- pkg_update
-
if is_pkg_installed ${_pkg_name}; then
local _cversion=$(compare_pkg_version ${_pkg_name})
@@ -672,16 +655,12 @@ do_reboot() {
}
pid_file="/var/run/$(basename $0).pid"
-last_update_file="/var/run/$(basename $0)-last-update"
logfile="/cf/conf/upgrade_log.txt"
stdout='/dev/null'
# pkg should not ask for confirmations
export ASSUME_ALWAYS_YES=true
-# Disable automatic update
-export REPO_AUTOUPDATE=false
-
export product=$(/usr/local/bin/php -n /usr/local/sbin/read_global_var product_name pfSense)
export pkg_prefix=$(/usr/local/bin/php -n /usr/local/sbin/read_global_var pkg_prefix pfSense-pkg-)
export platform=$(cat /etc/platform)
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php
index 5b817bc..a14bdcd 100644
--- a/src/usr/local/www/diag_confbak.php
+++ b/src/usr/local/www/diag_confbak.php
@@ -206,9 +206,18 @@ $form->add($section);
print($form);
if (is_array($confvers)) {
- print_info_box(gettext('To view the differences between an older configuration and a newer configuration, ' .
- 'select the older configuration using the left column of radio options and select the newer configuration in the right column, ' .
- 'then press the "Diff" button.'));
+?>
+<div>
+ <div class="infoblock_open">
+ <?=print_info_box(
+ gettext(
+ 'To view the differences between an older configuration and a newer configuration, ' .
+ 'select the older configuration using the left column of radio options and select the newer configuration in the right column, ' .
+ 'then press the "Diff" button.'),
+ 'info', false)?>
+ </div>
+</div>
+<?php
}
?>
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php
index d413def..3b64cd3 100755
--- a/src/usr/local/www/diag_dns.php
+++ b/src/usr/local/www/diag_dns.php
@@ -260,7 +260,7 @@ if (!$input_errors && $type) {
</ul>
</div>
</div>
-<? endif?>
+<?php endif; ?>
<!-- Second table displays the server resolution times -->
<div class="panel panel-default">
@@ -275,11 +275,11 @@ if (!$input_errors && $type) {
</thead>
<tbody>
-<? foreach ((array)$dns_speeds as $qt):?>
+<?php foreach ((array)$dns_speeds as $qt):?>
<tr>
<td><?=$qt['dns_server']?></td><td><?=$qt['query_time']?></td>
</tr>
-<? endforeach?>
+<?php endforeach; ?>
</tbody>
</table>
</div>
diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php
index f2847d0..22bf0be 100644
--- a/src/usr/local/www/diag_nanobsd.php
+++ b/src/usr/local/www/diag_nanobsd.php
@@ -81,7 +81,7 @@ global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE, $ACTIVE_SLICE;
nanobsd_detect_slice_info();
$NANOBSD_SIZE = nanobsd_get_size();
-$class='alert-warning';
+$class = 'alert-warning';
if ($_POST['bootslice']) {
if (!DEBUG) {
@@ -91,7 +91,7 @@ if ($_POST['bootslice']) {
}
$savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice();
- $class='alert-success';
+ $class = 'alert-success';
// Survey slice info
nanobsd_detect_slice_info();
}
@@ -101,10 +101,10 @@ if ($_POST['destslice'] && $_POST['duplicateslice']) {
if (!DEBUG && nanobsd_clone_slice($_POST['destslice'])) {
$savemsg = gettext("The slice has been duplicated.") . "<p/>" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area.");
- $class='alert-success';
+ $class = 'alert-success';
} else {
$savemsg = gettext("There was an error while duplicating the slice. Operation aborted.");
- $class='alert-danger';
+ $class = 'alert-danger';
}
// Re-Survey slice info
nanobsd_detect_slice_info();
@@ -122,8 +122,12 @@ if ($_POST['setrw']) {
if (!DEBUG) {
conf_mount_rw();
if (isset($_POST['nanobsd_force_rw'])) {
+ $savemsg = gettext("Permanent read/write has been set successfully.");
+ $class = 'alert-success';
$config['system']['nanobsd_force_rw'] = true;
} else {
+ $savemsg = gettext('Permanent read/write has been cleared successfully.');
+ $class = 'alert-success';
unset($config['system']['nanobsd_force_rw']);
}
@@ -158,8 +162,9 @@ $section->addInput(new Form_StaticText(
$ACTIVE_SLICE . ' ' . $slicebtn
));
+$refcount = refcount_read(1000);
+
if (is_writable("/")) {
- $refcount = refcount_read(1000);
/* refcount_read returns -1 when shared memory section does not exist */
/* refcount can be zero here when the user has set nanobsd_force_rw */
/* refcount 1 is normal, so only display the count for abnormal values */
@@ -169,30 +174,31 @@ if (is_writable("/")) {
$refdisplay = " (Reference count " . $refcount . ")";
}
$lbl = gettext("Read/Write") . $refdisplay;
- if (!isset($config['system']['nanobsd_force_rw'])) {
- $btnlbl = gettext("Switch to Read-Only");
- }
+ $btnlbl = gettext("Switch to Read-Only");
} else {
$lbl = gettext("Read-Only");
- if (!isset($config['system']['nanobsd_force_rw'])) {
- $btnlbl = gettext("Switch to Read/Write");
- }
+ $btnlbl = gettext("Switch to Read/Write");
}
-$robtn = new Form_Button('changero', $btnlbl);
-$robtn->removeClass('btn-primary')->addClass('btn-default btn-sm');
+// Only show the changero button if force read/write is off, or the file system is not in writable state, or there is an unusual refcount.
+// If force read/write is on, and the file system is in writable state, and refcount is normal then the user has no reason to mess about.
+if (!isset($config['system']['nanobsd_force_rw']) || !is_writable("/") || ($refcount > 1)) {
+ $robtn = new Form_Button('changero', $btnlbl);
+ $robtn->removeClass('btn-primary')->addClass('btn-default btn-sm');
+ $lbl .= ' ' . $robtn;
+}
$section->addInput(new Form_StaticText(
'Read/Write status',
- $lbl . ' ' . $robtn
-));
+ $lbl
+))->setHelp('This setting is only temporary, and can be switched dynamically in the background.');
$section->addInput(new Form_Checkbox(
'nanobsd_force_rw',
'Permanent Read/Write',
'Keep media mounted read/write at all times. ',
isset($config['system']['nanobsd_force_rw'])
-))->setHelp('This setting is only temporary, and can be switched dynamically in the background.');
+));
$permbtn = new Form_Button('setrw', 'Save');
$permbtn->removeClass('btn-primary')->addClass('btn-default btn-sm');
diff --git a/src/usr/local/www/diag_ndp.php b/src/usr/local/www/diag_ndp.php
index 348002d..fb5a487 100644
--- a/src/usr/local/www/diag_ndp.php
+++ b/src/usr/local/www/diag_ndp.php
@@ -154,9 +154,9 @@ include("head.inc");
?>
<?=$mac?>
- <? if (isset($mac_man[$mac_hi])):?>
+ <?php if (isset($mac_man[$mac_hi])):?>
(<?=$mac_man[$mac_hi]?>)
- <?endif?>
+ <?php endif; ?>
</td>
<td>
diff --git a/src/usr/local/www/diag_pftop.php b/src/usr/local/www/diag_pftop.php
index 2225a16..cece7aa 100644
--- a/src/usr/local/www/diag_pftop.php
+++ b/src/usr/local/www/diag_pftop.php
@@ -190,8 +190,7 @@ print $form;
});
//]]>
</script>
-<?php
-?>
+
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Output')?></h2></div>
<div class="panel panel-body">
diff --git a/src/usr/local/www/diag_sockets.php b/src/usr/local/www/diag_sockets.php
index 578934f..517e8c7 100644
--- a/src/usr/local/www/diag_sockets.php
+++ b/src/usr/local/www/diag_sockets.php
@@ -133,7 +133,7 @@ $showAllOption = $showAll ? "" : "?showAll";
?>
<div>
-<div id="infoblock">
+<div class="infoblock">
<?php
print_info_box(gettext('Socket information - explanation.') . '<br /><br />' .
gettext('This page shows the output for the commands: "sockstat -4lL" and "sockstat -6lL".' . '<br />' .
@@ -148,7 +148,7 @@ gettext('This page shows the output for the commands: "sockstat -4lL" and "socks
'<dt>ADDRESS</dt> <dd>(UNIX sockets only) For bound sockets, this is the file-name of the socket. For other sockets, it is the name, PID and file descriptor number of the peer, or "(none)" if the socket is neither bound nor connected.</dd>' .
'<dt>LOCAL ADDRESS</dt> <dd>(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).</dd>' .
'<dt>FOREIGN ADDRESS</dt><dd>(Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)).</dd>' .
- '</dl>'), info);
+ '</dl>'), 'info', false);
?>
</div>
</div>
diff --git a/src/usr/local/www/diag_tables.php b/src/usr/local/www/diag_tables.php
index 36b41f7..1eaa306 100644
--- a/src/usr/local/www/diag_tables.php
+++ b/src/usr/local/www/diag_tables.php
@@ -82,7 +82,7 @@ if ($_REQUEST['delete']) {
exit;
}
-if ($_POST['deleteall']) {
+if ($_POST['clearall']) {
exec("/sbin/pfctl -t " . escapeshellarg($tablename) . " -T show", $entries);
if (is_array($entries)) {
foreach ($entries as $entryA) {
@@ -90,6 +90,7 @@ if ($_POST['deleteall']) {
exec("/sbin/pfctl -t " . escapeshellarg($tablename) . " -T delete " . escapeshellarg($entry), $delete);
}
}
+ unset($entries);
}
if (($tablename == "bogons") || ($tablename == "bogonsv6")) {
@@ -122,22 +123,55 @@ exec("/sbin/pfctl -sT", $tables);
include("head.inc");
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
-$form = new Form('Show');
+$form = new Form(false);
$section = new Form_Section('Table to display');
+$group = new Form_Group("Table");
-$section->addInput(new Form_Select(
+$group->add(new Form_Select(
'type',
- 'Table',
+ null,
$tablename,
array_combine($tables, $tables)
));
+if ($bogons || !empty($entries)) {
+ if ($bogons) {
+ $group->add(new Form_Button(
+ 'Download',
+ 'Update'
+ ))->removeClass('btn-primary')->addClass('btn-success btn-sm');
+ } elseif (!empty($entries)) {
+ $group->add(new Form_Button(
+ 'clearall',
+ 'Clear Table'
+ ))->removeClass('btn-primary')->addClass('btn-danger btn-sm');
+ }
+}
+
+$section->add($group);
$form->add($section);
print $form;
+
+if ($bogons || !empty($entries)) {
+?>
+<div>
+ <div class="infoblock_open">
+<?php
+ $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename) . '|cut -d"(" -f2|tr -d ")" ');
+ if ($last_updated != "") {
+ print_info_box(gettext("Table last updated on ") . $last_updated, 'info', false);
+ } else {
+ print_info_box(gettext("Date of last update of table is unknown"), 'info', false);
+ }
+?>
+ </div>
+</div>
+<?php
+}
?>
<script type="text/javascript">
@@ -159,6 +193,11 @@ events.push(function() {
},
});
});
+
+ // Auto-submit the form on table selector change
+ $('#type').on('change', function() {
+ $('form').submit();
+ });
});
//]]>
</script>
@@ -196,32 +235,4 @@ events.push(function() {
<?php
-if ($bogons || !empty($entries)) {
- $form = new Form;
-
- $section = new Form_Section('Table Data');
-
- if ($bogons) {
- $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename) . '|cut -d"(" -f2|tr -d ")" ');
-
- $section->addInput(new Form_StaticText(
- 'Last update',
- $last_updated
- ));
-
- $section->addInput(new Form_Button(
- 'Download',
- 'Download'
- ))->setHelp('Download the latest bogon data')->addClass('btn-warning');
- } elseif (!empty($entries)) {
- $section->addInput(new Form_Button(
- 'deleteall',
- 'Clear Table'
- ))->setHelp('Clear all of the entries in this table')->addClass('btn-danger');
- }
-
- $form->add($section);
- print $form;
-}
-
include("foot.inc");
diff --git a/src/usr/local/www/diag_traceroute.php b/src/usr/local/www/diag_traceroute.php
index ee76c0c..7253019 100644
--- a/src/usr/local/www/diag_traceroute.php
+++ b/src/usr/local/www/diag_traceroute.php
@@ -210,7 +210,7 @@ if (!$input_errors && $do_traceroute) {
<div class="panel-body">
<?php
if ($result = shell_exec($cmd)) {
- print(nl2br($result));
+ print('<pre>'.$result.'</pre>');
} else {
print('Error: ' . $host . ' ' . gettext("could not be traced/resolved"));
}
diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php
index 44a2136..6d6d386 100644
--- a/src/usr/local/www/exec.php
+++ b/src/usr/local/www/exec.php
@@ -226,21 +226,19 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel-heading"><h2 class="panel-title">Shell Output - <?=htmlspecialchars($_POST['txtCommand'])?></h2></div>
<div class="panel-body">
<div class="content">
- <pre>
<?php
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
$output = array();
exec($_POST['txtCommand'] . ' 2>&1', $output);
- foreach ($output as $line) {
- print(htmlspecialchars($line) . "\r\n");
- }
+
+ $output = implode("\n", $output);
+ print("<pre>" . htmlspecialchars($output) . "</pre>");
?>
- </pre>
</div>
</div>
</div>
-<? endif ?>
+<?php endif; ?>
<form action="exec.php" method="post" enctype="multipart/form-data" name="frmExecPlus" onsubmit="return frmExecPlus_onSubmit( this );">
<div class="panel panel-default">
@@ -289,7 +287,7 @@ if (!isBlank($_POST['txtCommand'])):?>
// This is intended to prevent bad code from breaking the GUI
if (!isBlank($_POST['txtPHPCommand'])) {
puts("<div class=\"panel panel-success responsive\"><div class=\"panel-heading\">PHP response</div>");
- puts("<pre>");
+
$tmpname = tempnam("/tmp", "");
$phpfile = fopen($tmpname, "w");
fwrite($phpfile, "<?php\n");
@@ -299,16 +297,15 @@ if (!isBlank($_POST['txtCommand'])):?>
fwrite($phpfile, "?>\n");
fclose($phpfile);
+ $output = array();
exec("/usr/local/bin/php " . $tmpname, $output);
- for ($i=0; $i < count($output); $i++) {
- print($output[$i] . "\n");
- }
-
unlink($tmpname);
+ $output = implode("\n", $output);
+ print("<pre>" . htmlspecialchars($output) . "</pre>");
+
// echo eval($_POST['txtPHPCommand']);
- puts("&nbsp;</pre>");
puts("</div>");
?>
<script type="text/javascript">
diff --git a/src/usr/local/www/filebrowser/browser.php b/src/usr/local/www/filebrowser/browser.php
index fcbed78..30876aa 100644
--- a/src/usr/local/www/filebrowser/browser.php
+++ b/src/usr/local/www/filebrowser/browser.php
@@ -45,16 +45,16 @@ if (is_file($path)) {
?>
<table width="100%">
<tr>
- <td class="fbHome" width="25px" align="left">
+ <td class="fbHome text-left" width="25px">
<img onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('/');" src="/filebrowser/images/icon_home.gif" alt="Home" title="Home" />
</td>
<td><b><?=$path;?></b></td>
- <td class="fbClose" align="right">
+ <td class="fbClose text-right">
<img onClick="jQuery('#fbBrowser').fadeOut();" border="0" src="/filebrowser/images/icon_cancel.gif" alt="Close" title="Close" />
</td>
</tr>
<tr>
- <td id="fbCurrentDir" colspan="3" class="vexpl" align="left">
+ <td id="fbCurrentDir" colspan="3" class="vexpl text-left">
<?php
// ----- read contents -----
@@ -81,7 +81,7 @@ foreach ($dirs as $dir):
?>
<tr>
<td></td>
- <td class="fbDir vexpl" id="<?=$realDir;?>" align="left">
+ <td class="fbDir vexpl text-left" id="<?=$realDir;?>">
<div onClick="jQuery('#fbTarget').val('<?=$realDir?>'); fbBrowse('<?=$realDir?>');">
<img src="/filebrowser/images/folder_generic.gif" />
&nbsp;<?=$dir;?>
@@ -147,14 +147,14 @@ foreach ($files as $file):
?>
<tr>
<td></td>
- <td class="fbFile vexpl" id="<?=$fqpn;?>" align="left">
+ <td class="fbFile vexpl text-left" id="<?=$fqpn;?>">
<?php $filename = str_replace("//","/", "{$path}/{$file}"); ?>
<div onClick="jQuery('#fbTarget').val('<?=$filename?>'); loadFile(); jQuery('#fbBrowser').fadeOut();">
<img src="/filebrowser/images/file_<?=$type;?>.gif" alt="" title="">
&nbsp;<?=$file;?>
</div>
</td>
- <td align="right" class="vexpl">
+ <td class="vexpl text-right">
<?=$size;?>
</td>
</tr>
diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php
index 9862ebb..8a5b675 100644
--- a/src/usr/local/www/firewall_aliases.php
+++ b/src/usr/local/www/firewall_aliases.php
@@ -311,11 +311,11 @@ display_top_tabs($tab_array);
<!-- Information section. Icon ID must be "showinfo" and the information <div> ID must be "infoblock".
That way jQuery (in pfenseHelpers.js) will automatically take care of the display. -->
<div>
- <div id="infoblock">
+ <div class="infoblock">
<?=print_info_box(gettext('Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number ' .
'of changes that have to be made if a host, network or port changes. <br />' .
'You can enter the name of an alias instead of the host, network or port where indicated. The alias will be resolved according to the list above.' . '<br />' .
- 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'), info)?>
+ 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'), 'info', false)?>
</div>
</div>
diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php
index a9dded2..e1859bb 100644
--- a/src/usr/local/www/firewall_nat_1to1.php
+++ b/src/usr/local/www/firewall_nat_1to1.php
@@ -277,13 +277,13 @@ display_top_tabs($tab_array);
</nav>
</form>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('Depending on the way your WAN connection is setup, you may also need a ') . '<a href="firewall_virtual_ip.php">' .
gettext("Virtual IP.") . '</a>' . '<br />' .
gettext('If you add a 1:1 NAT entry for any of the interface IPs on this system, ' .
'it will make this system inaccessible on that IP address. i.e. if ' .
'you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) ' .
- 'using the WAN IP address will no longer function.'), info)?>
+ 'using the WAN IP address will no longer function.'), 'info', false)?>
</div>
diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php
index 5b51d2d..f5ab98f 100644
--- a/src/usr/local/www/firewall_nat_out.php
+++ b/src/usr/local/www/firewall_nat_out.php
@@ -660,7 +660,7 @@ endif;
</div>
</form>
-<div id="infoblock">
+<div class="infoblock">
<?php
print_info_box(gettext('If automatic outbound NAT is selected, a mapping is automatically generated for each interface\'s subnet (except WAN-type connections) and the rules ' .
'on the "Mappings" section of this page are ignored.' . '<br />' .
@@ -670,7 +670,7 @@ endif;
'If disable outbound NAT is selected, no rules will be used.' . '<br />' .
'If a target address other than an interface\'s IP address is used, then depending on the way the WAN connection is setup, a ') .
'<a href="firewall_virtual_ip.php">' . gettext("Virtual IP") . '</a>' . gettext(" may also be required."),
- info);
+ 'info', false);
?>
</div>
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php
index 2a4c970..807d5a7 100644
--- a/src/usr/local/www/firewall_rules.php
+++ b/src/usr/local/www/firewall_rules.php
@@ -695,7 +695,7 @@ for ($i = 0; isset($a_filter[$i]); $i++):
</nav>
</form>
-<div id="infoblock">
+<div class="infoblock">
<div class="alert alert-info clearfix" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><div class="pull-left">
<dl class="dl-horizontal responsive">
<!-- Legend -->
diff --git a/src/usr/local/www/firewall_schedule.php b/src/usr/local/www/firewall_schedule.php
index c057b0a..0f4ba12 100644
--- a/src/usr/local/www/firewall_schedule.php
+++ b/src/usr/local/www/firewall_schedule.php
@@ -279,8 +279,8 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
- <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), info)?>
+<div class="infoblock">
+ <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php
index 190a1d0..31238d0 100644
--- a/src/usr/local/www/firewall_schedule_edit.php
+++ b/src/usr/local/www/firewall_schedule_edit.php
@@ -286,8 +286,8 @@ function build_date_table() {
$mostr .= '" class="col-md-6">';
$mostr .=
- '<table class="table table-condensed" border="1" cellspacing="1" cellpadding="1" id="calTable' . $monthcounter . $yearcounter . '" >
- <thead><tr class="info"><td colspan="7" align="center" ><b>' . date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter))) . '</b></td>
+ '<table class="table table-condensed table-bordered" id="calTable' . $monthcounter . $yearcounter . '" >
+ <thead><tr class="info"><td colspan="7" class="text-center"><b>' . date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter))) . '</b></td>
</tr>
<tr>
<th class="text-center" style="cursor: pointer;" onclick="daytoggle(\'w1p1\');">' . gettext("Mon") . '</th>
@@ -325,7 +325,14 @@ function build_date_table() {
$mostr .= '<td class="text-center"></td>';
}
- if ($positioncounter == 7 || $daycounter > $numberofdays) {
+ if ($daycounter > $numberofdays) {
+ while ($positioncounter < 7) {
+ $mostr .= '<td class="text-center"></td>';
+ $positioncounter++;
+ }
+ }
+
+ if ($positioncounter == 7) {
$positioncounter = 1;
$mostr .= "</tr>";
} else {
diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php
index 4b008d4..079a8ce 100644
--- a/src/usr/local/www/firewall_shaper.php
+++ b/src/usr/local/www/firewall_shaper.php
@@ -506,8 +506,8 @@ if (!$dfltmsg && $sform) {
if ($dfltmsg) {
?>
<div>
- <div id="infoblock">
- <?=print_info_box($default_shaper_msg, info)?>
+ <div class="infoblock">
+ <?=print_info_box($default_shaper_msg, 'info', false)?>
</div>
</div>
<?php
diff --git a/src/usr/local/www/firewall_shaper_queues.php b/src/usr/local/www/firewall_shaper_queues.php
index 7cd5b1f..dfe7584 100644
--- a/src/usr/local/www/firewall_shaper_queues.php
+++ b/src/usr/local/www/firewall_shaper_queues.php
@@ -204,8 +204,10 @@ if ($_POST['apply']) {
$savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message($retval);
+ $class = 'alert-success';
} else {
$savemsg = $retval;
+ $class = 'alert-danger';
}
/* reset rrd queues */
@@ -230,7 +232,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
if (is_subsystem_dirty('shaper')) {
@@ -248,7 +250,7 @@ display_top_tabs($tab_array);
<form action="firewall_shaper_queues.php" method="post" name="iform" id="iform">
<div class="panel panel-default">
- <div class="panel-heading" align="center"><h2 class="panel-title"><?=$qname?></h2></div>
+ <div class="panel-heading text-center"><h2 class="panel-title"><?=$qname?></h2></div>
<div class="panel-body">
<div class="form-group">
<div class="col-sm-2 ">
@@ -263,5 +265,5 @@ display_top_tabs($tab_array);
</form>
<?php
-
include("foot.inc");
+?>
diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php
index e888606..f1e7165 100644
--- a/src/usr/local/www/firewall_shaper_vinterface.php
+++ b/src/usr/local/www/firewall_shaper_vinterface.php
@@ -170,19 +170,21 @@ if ($_GET) {
if (write_config()) {
$retval = 0;
$retval = filter_configure();
- $savemsg = get_std_save_message($retval);
- if (stristr($retval, "error") != true) {
- $savemsg = get_std_save_message($retval);
+ if (stristr($retval, "error") != true) {
+ $savemsg = get_std_save_message($retval);
+ $class = 'success';
+ } else {
+ $savemsg = $retval;
+ $class = 'danger';
+ }
+
} else {
- $savemsg = $retval;
+ $savemsg = gettext("Unable to write config.xml (Access Denied?)");
+ $class = 'danger';
}
- } else {
- $savemsg = gettext("Unable to write config.xml (Access Denied?)");
- }
-
- $dfltmsg = true;
+ $dfltmsg = true;
break;
case "add":
@@ -305,12 +307,13 @@ if ($_POST) {
$retval = 0;
$retval = filter_configure();
- $savemsg = get_std_save_message($retval);
if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
+ $class = 'success';
} else {
$savemsg = $retval;
+ $class = 'danger';
}
/* XXX: TODO Make dummynet pretty graphs */
@@ -401,7 +404,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg, 'success');
+ print_info_box($savemsg, $class);
}
if (is_subsystem_dirty('shaper')) {
@@ -430,15 +433,15 @@ display_top_tabs($tab_array);
<?php
if ($dfltmsg) {
- print_info_box($dn_default_shaper_msg);
+ print_info_box($dn_default_shaper_msg, 'info');
} else {
// Add global buttons
if (!$dontshow || $newqueue) {
- if ($can_add || $addnewaltq) {
+ if ($can_add && ($action != "add")) {
if ($queue) {
$url = 'firewall_shaper_vinterface.php?pipe=' . $pipe . '&queue=' . $queue->GetQname() . '&action=add';
} else {
- $url = 'firewall_shaper.php?pipe='. $pipe . '&action=add';
+ $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&action=add';
}
$sform->addGlobal(new Form_Button(
@@ -448,21 +451,23 @@ if ($dfltmsg) {
))->removeClass('btn-default')->addClass('btn-success');
}
- if ($queue) {
- $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&queue=' . $queue->GetQname() . '&action=delete';
- } else {
- $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&action=delete';
- }
+ if ($action != "add") {
+ if ($queue) {
+ $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&queue=' . $queue->GetQname() . '&action=delete';
+ } else {
+ $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&action=delete';
+ }
- $sform->addGlobal(new Form_Button(
- 'delete',
- $queue ? 'Delete this queue':'Delete',
- $url
- ))->removeClass('btn-default')->addClass('btn-danger');
+ $sform->addGlobal(new Form_Button(
+ 'delete',
+ ($queue && ($qname != $pipe)) ? 'Delete this queue':'Delete Limiter',
+ $url
+ ))->removeClass('btn-default')->addClass('btn-danger');
+ }
}
// Print the form
- if($sform) {
+ if ($sform) {
$sform->setAction("firewall_shaper_vinterface.php");
print($sform);
}
diff --git a/src/usr/local/www/firewall_virtual_ip.php b/src/usr/local/www/firewall_virtual_ip.php
index 59ac887..3c5d0c8 100644
--- a/src/usr/local/www/firewall_virtual_ip.php
+++ b/src/usr/local/www/firewall_virtual_ip.php
@@ -364,9 +364,9 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('The virtual IP addresses defined on this page may be used in ') . '<a href="firewall_nat.php">' . gettext('NAT') . '</a>' . gettext(' mappings.') . '<br />' .
- gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="status_carp.php">' . gettext('here') . '</a>', info)?>
+ gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="status_carp.php">' . gettext('here') . '</a>', 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php
index a4a91f1..9556b53 100644
--- a/src/usr/local/www/firewall_virtual_ip_edit.php
+++ b/src/usr/local/www/firewall_virtual_ip_edit.php
@@ -489,9 +489,9 @@ $form->add($section);
print($form);
?>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext("Proxy ARP and Other type Virtual IPs cannot be bound to by anything running on the firewall, such as IPsec, OpenVPN, etc. Use a CARP or IP Alias type address for these types.") . '<br />' .
- sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), info)?>
+ sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), 'info', false)?>
</div>
<script type="text/javascript">
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index c5372df..170215a 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -298,7 +298,7 @@ function verify_gzip_file($fname) {
}
}
-function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning") {
+function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning",$showbtn = true) {
global $g;
if (strpos($class, "alert-") !== 0) {
@@ -319,7 +319,7 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl
}
$msg .= '</form>';
- } else {
+ } else if ($showbtn) {
$msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'. $msg;
}
@@ -374,13 +374,11 @@ EOFnp;
}
-function print_info_box($msg, $class="alert-warning") {
- print_info_box_np($msg, null, null, false, $class);
-
+function print_info_box($msg, $class="alert-warning", $showbtn = true) {
+ print_info_box_np($msg, null, null, false, $class, $showbtn);
}
function get_std_save_message($ok) {
- global $d_sysrebootreqd_path;
$filter_related = false;
$filter_pages = array("nat", "filter");
$to_return = gettext("The changes have been applied successfully.");
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index c8e99dd..e94cf22 100755
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -488,7 +488,7 @@ echo '<li>'. get_shortcut_log_link($shortcut_section, false). '</li>';
?>
<?php if (!$g['disablehelpicon']): ?>
<li>
- <a href="<?=$helpurl?>" title="<?=gettext("Help for items on this page")?>" class="help-icon">
+ <a href="<?=$helpurl?>" target="_blank" title="<?=gettext("Help for items on this page")?>" class="help-icon">
<i class="fa fa-question-circle"></i>
</a>
</li>
@@ -499,14 +499,14 @@ echo '<li>'. get_shortcut_log_link($shortcut_section, false). '</li>';
/* if upgrade in progress, alert user */
if (is_subsystem_dirty('packagelock') || file_exists('/conf/needs_package_sync' && platform_booting())) {
if (file_exists('/conf/needs_package_sync') && platform_booting()) {
- $info_text = sprintf(gettext("%s is booting then packages will be reinstalled in the background.<p>Do not make changes in the GUI until this is complete."), $g['product_name']);
+ $warning_text = sprintf(gettext("%s is booting then packages will be reinstalled in the background.<p>Do not make changes in the GUI until this is complete."), $g['product_name']);
} else {
$pgtitle = array(gettext("System"), gettext("Package Manager"));
- $info_text = gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.");
- $info_text .= gettext("<p>If the above message is still displayed after a couple of hours, use the 'Clear Package Lock' button on the <a href='diag_backup.php' title='Backup/Restore'>Backup/Restore page</a> and reinstall packages manually.");
+ $warning_text = gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.");
+ $warning_text .= gettext("<p>If the above message is still displayed after a couple of hours, use the 'Clear Package Lock' button on the <a href='diag_backup.php' title='Backup/Restore'>Backup/Restore page</a> and reinstall packages manually.");
}
- print_info_box($info_text);
+ print_info_box($warning_text);
}
$pgtitle_output = true;
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index 613ba78..10444cd 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -108,6 +108,7 @@ if ($g['disablecrashreporter'] != true) {
if ($x > 0) {
$savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information.";
+ $class = "warning";
}
}
}
@@ -304,7 +305,7 @@ $pgtitle = array(gettext("Status"), gettext("Dashboard"));
include("head.inc");
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 0ad0958..0d82dd5 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -2081,17 +2081,19 @@ $section = new Form_Section('DHCP6 client configuration');
$section->addClass('dhcp6');
$section->addInput(new Form_Checkbox(
- 'dhcp6adv',
+ 'adv_dhcp6_config_advanced',
'Advanced',
'Show DHCPv6 advanced options',
- $pconfig['adv_dhcp6_config_advanced']
+ $pconfig['adv_dhcp6_config_advanced'],
+ 'Selected'
));
$section->addInput(new Form_Checkbox(
'adv_dhcp6_config_file_override',
'Config file override',
'Override the configuration from this file',
- $pconfig['adv_dhcp6_config_file_override']
+ $pconfig['adv_dhcp6_config_file_override'],
+ 'Selected'
));
$section->addInput(new Form_Checkbox(
@@ -2143,7 +2145,8 @@ $section->addInput(new Form_Checkbox(
'adv_dhcp6_interface_statement_information_only_enable',
'Information only',
null,
- $pconfig['adv_dhcp6_interface_statement_information_only_enable']
+ $pconfig['adv_dhcp6_interface_statement_information_only_enable'],
+ 'Selected'
));
$section->addInput(new Form_Input(
@@ -2178,7 +2181,8 @@ $group->add(new Form_Checkbox(
'adv_dhcp6_id_assoc_statement_address_enable',
null,
'Non-Temporary Address Allocation',
- $pconfig['adv_dhcp6_id_assoc_statement_address_enable']
+ $pconfig['adv_dhcp6_id_assoc_statement_address_enable'],
+ 'Selected'
));
$group->add(new Form_Input(
@@ -2217,7 +2221,8 @@ $group->add(new Form_Checkbox(
'adv_dhcp6_id_assoc_statement_prefix_enable',
null,
'Prefix Delegation ',
- $pconfig['adv_dhcp6_id_assoc_statement_prefix_enable']
+ $pconfig['adv_dhcp6_id_assoc_statement_prefix_enable'],
+ 'Selected'
));
$group->add(new Form_Input(
@@ -3505,7 +3510,7 @@ events.push(function() {
function show_dhcp6adv() {
var ovr = $('#adv_dhcp6_config_file_override').prop('checked');
- var adv = $('#dhcp6adv').prop('checked');
+ var adv = $('#adv_dhcp6_config_advanced').prop('checked');
hideCheckbox('dhcp6usev4iface', ovr);
hideCheckbox('dhcp6prefixonly', ovr);
@@ -3627,7 +3632,7 @@ events.push(function() {
setDHCPoptions();
});
- $('#dhcp6adv').click(function () {
+ $('#adv_dhcp6_config_advanced').click(function () {
show_dhcp6adv();
});
diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php
index 95f949d..0570d39 100644
--- a/src/usr/local/www/interfaces_assign.php
+++ b/src/usr/local/www/interfaces_assign.php
@@ -274,6 +274,7 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
write_config();
$savemsg = gettext("Interface has been added.");
+ $class = "success";
}
} else if (isset($_POST['apply'])) {
@@ -284,12 +285,13 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
write_config();
$retval = filter_configure();
- $savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message($retval);
+ $class = "success";
} else {
$savemsg = $retval;
+ $class = "danger";
}
}
@@ -461,6 +463,7 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
link_interface_to_vlans($realid, "update");
$savemsg = gettext("Interface has been deleted.");
+ $class = "success";
}
}
}
@@ -486,11 +489,14 @@ if (file_exists("/var/run/interface_mismatch_reboot_needed")) {
if ($_POST) {
if ($rebootingnow) {
$savemsg = gettext("The system is now rebooting. Please wait.");
+ $class = "success";
} else {
$savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
+ $class = "warning";
}
} else {
$savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards.");
+ $class = "warning";
}
}
@@ -499,7 +505,7 @@ if (file_exists("/tmp/reload_interfaces")) {
print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));
echo "<br /></p>\n";
} elseif ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
diff --git a/src/usr/local/www/interfaces_groups.php b/src/usr/local/www/interfaces_groups.php
index 5d4156d..90a992d 100644
--- a/src/usr/local/www/interfaces_groups.php
+++ b/src/usr/local/www/interfaces_groups.php
@@ -156,9 +156,9 @@ display_top_tabs($tab_array);
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('Interface Groups allow you to setup rules for multiple interfaces without duplicating the rules.<br />' .
- 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'), info)?>
+ 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'), 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/interfaces_lagg_edit.php b/src/usr/local/www/interfaces_lagg_edit.php
index ea26d3c..6c38740 100644
--- a/src/usr/local/www/interfaces_lagg_edit.php
+++ b/src/usr/local/www/interfaces_lagg_edit.php
@@ -174,7 +174,7 @@ if ($_POST) {
if (is_array($_POST['members'])) {
foreach ($_POST['members'] as $member) {
if (!does_interface_exist($member)) {
- $input_errors[] = gettext("Interface supplied as member is invalid");
+ $input_errors[] = sprintf(gettext("Interface supplied as member (%s) is invalid"), $member);
}
}
} else if (!does_interface_exist($_POST['members'])) {
@@ -221,17 +221,16 @@ if ($_POST) {
function build_member_list() {
global $pconfig, $portlist, $realifchecklist;
- $memberlist = array('list' => array(),
- 'selected' => array());
+ $memberlist = array('list' => array(), 'selected' => array());
foreach ($portlist as $ifn => $ifinfo) {
if (array_key_exists($ifn, $realifchecklist)) {
continue;
}
- $memberlist['list'][$ifn] = $ifn . '(' . $ifinfo['mac'] . ')';
+ $memberlist['list'][$ifn] = $ifn . ' (' . $ifinfo['mac'] . ')';
- if (stristr($pconfig['members'], $ifn)) {
+ if (in_array($ifn, explode(",", $pconfig['members']))) {
array_push($memberlist['selected'], $ifn);
}
}
@@ -254,7 +253,7 @@ $section = new Form_Section('LAGG Configuration');
$memberslist = build_member_list();
$section->addInput(new Form_Select(
- 'members[]',
+ 'members',
'Parent Interfaces',
$memberslist['selected'],
$memberslist['list'],
diff --git a/src/usr/local/www/interfaces_qinq.php b/src/usr/local/www/interfaces_qinq.php
index 53babb3..a7a47bf 100644
--- a/src/usr/local/www/interfaces_qinq.php
+++ b/src/usr/local/www/interfaces_qinq.php
@@ -182,10 +182,10 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q QinQ tagging properly. <br />On cards that do not explicitly support it, ' .
'QinQ tagging will still work, but the reduced MTU may cause problems.<br />' .
- 'See the %s handbook for information on supported cards.'), $g['product_name']), info)?>
+ 'See the %s handbook for information on supported cards.'), $g['product_name']), 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php
index acad30e..0f82756 100644
--- a/src/usr/local/www/interfaces_vlan.php
+++ b/src/usr/local/www/interfaces_vlan.php
@@ -170,11 +170,11 @@ display_top_tabs($tab_array);
</div>
</form>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN '.
'tagging will still work, but the reduced MTU may cause problems.<br />See the '.
- '%s handbook for information on supported cards.'), $g['product_name']), info)?>
+ '%s handbook for information on supported cards.'), $g['product_name']), 'info', false)?>
</div>
<script type="text/javascript">
//<![CDATA[
diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js
index 1959301..e2a871e 100644
--- a/src/usr/local/www/jquery/pfSenseHelpers.js
+++ b/src/usr/local/www/jquery/pfSenseHelpers.js
@@ -384,23 +384,36 @@ $('[id^=delete]').click(function(event) {
alert('You may not delete the last row!');
});
-// "More information" handlers
+// "More information" handlers --------------------------------------------------------------------
// If there is an infoblock, automatically add an info icon that toggles its display
-if($('#infoblock').length != 0) {
- $('#infoblock').before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7;; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo" title="More information"></i>');
+// If there is n=more than one infoblock on a page, each must use a unique class suffic. e.g.: infoblock_01 or infoblock_open_19
- // and remove the 'X' button from the last text box (Which we assume to be the infoblock)
- $('.close :last').remove();
-}
+$('[class^="infoblock"], [class^="infoblock_open"]').each(function() {
+ var classname = $(this).attr("class");
+ var sfx = '';
+
+ if (classname.indexOf("infoblock_open")) {
+ sfx = classname.substr(15);
+ $(this).hide();
+ } else {
+ sfx = "_" + classname.substr(10);
+ }
+
+ $(this).before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo' + sfx + '" title="More information"></i>');
+});
// Hide information on page load
-$('#infoblock').hide();
+//$('.infoblock,#infoblock').hide();
// Show the help on clicking the info icon
-$('#showinfo').click(function() {
- $('#infoblock').toggle();
+$('[id^="showinfo"]').click(function() {
+ var id = $(this).attr("id");
+ var target = "infoblock" + id.substr(8);
+
+ $('.' + target).toggle();
});
+// ------------------------------------------------------------------------------------------------
// Put a dummy row into any empty table to keep IE happy
$('tbody').each(function(){
diff --git a/src/usr/local/www/load_balancer_pool.php b/src/usr/local/www/load_balancer_pool.php
index fee5f4b..cb82855 100644
--- a/src/usr/local/www/load_balancer_pool.php
+++ b/src/usr/local/www/load_balancer_pool.php
@@ -128,7 +128,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('loadbalancer')) {
diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php
index f0fb0dd..f4f79c6 100644
--- a/src/usr/local/www/load_balancer_virtual_server.php
+++ b/src/usr/local/www/load_balancer_virtual_server.php
@@ -128,7 +128,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('loadbalancer')) {
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 63e36f9..1ef9589 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -339,7 +339,7 @@ if ($savemsg) {
$display_maximum_rows = $field['display_maximum_rows'];
}
}
- echo "<tr><td colspan='$colspan' align='center'>";
+ echo "<tr><td colspan='$colspan' class='text-center'>";
echo "Filter by: ";
$isfirst = true;
for ($char = 65; $char < 91; $char++) {
@@ -350,7 +350,7 @@ if ($savemsg) {
$isfirst = false;
}
echo "</td></tr>";
- echo "<tr><td colspan='$colspan' align='center'>";
+ echo "<tr><td colspan='$colspan' class='text-center'>";
if ($field['sortablefields']) {
echo "Filter field: <select name='pkg_filter_type'>";
foreach ($field['sortablefields']['item'] as $si) {
@@ -395,8 +395,8 @@ if ($savemsg) {
echo "<tr><th colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>";
echo "<table width='100%' summary=''>";
echo "<tr>";
- echo "<td align='left'>Displaying page $page of $totalpages</b></td>";
- echo "<td align='right'>Rows per page: <select onchange='document.pkgform.submit();' name='display_maximum_rows'>";
+ echo "<td class='text-left'>Displaying page $page of $totalpages</b></td>";
+ echo "<td class='text-right'>Rows per page: <select onchange='document.pkgform.submit();' name='display_maximum_rows'>";
for ($x = 0; $x < 250; $x++) {
if ($x == $display_maximum_rows) {
$SELECTED = "selected";
@@ -546,7 +546,7 @@ if ($savemsg) {
$final_footer = "";
$final_footer .= "<tr><td colspan='$colcount'>";
$final_footer .= "<table width='100%' summary=''><tr>";
- $final_footer .= "<td align='left'>";
+ $final_footer .= "<td class='text-left'>";
$startingat = $startdisplayingat - $display_maximum_rows;
if ($startingat > -1) {
$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat={$startingat}&amp;display_maximum_rows={$display_maximum_rows}'>";
@@ -559,10 +559,10 @@ if ($savemsg) {
} else {
$endingrecord = $tmppp + $display_maximum_rows;
}
- $final_footer .= "</td><td align='center'>";
+ $final_footer .= "</td><td class='text-center'>";
$tmppp++;
$final_footer .= "<font size='2'>Displaying {$tmppp} - {$endingrecord} / " . count($evaledvar) . " records";
- $final_footer .= "</font></td><td align='right'>&nbsp;";
+ $final_footer .= "</font></td><td class='text-right'>&nbsp;";
if (($i+1) < count($evaledvar)) {
$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat=" . ($startdisplayingat + $display_maximum_rows) . "&amp;display_maximum_rows={$display_maximum_rows}'>";
}
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php
index 57e51ef..e6e089a 100644
--- a/src/usr/local/www/pkg_edit.php
+++ b/src/usr/local/www/pkg_edit.php
@@ -666,6 +666,9 @@ $js_array = array();
// Now loop through all of the fields defined in the XML
foreach ($pkg['fields']['field'] as $pkga) {
+ $action = "";
+ $uid = "";
+
if ($pkga['type'] == "sorting") {
continue;
}
@@ -684,7 +687,19 @@ foreach ($pkg['fields']['field'] as $pkga) {
$form->add($section);
}
- $section = new Form_Section(strip_tags($pkga['name']));
+ if (isset($pkga['collapse'])) {
+ $uid = uniqid("section");
+
+ $action = COLLAPSIBLE;
+
+ if ($pkga['collapse'] == "open") {
+ $action |= SEC_OPEN;
+ } else {
+ $action |= SEC_CLOSED;
+ }
+ }
+
+ $section = new Form_Section(strip_tags($pkga['name']), $uid, $action);
}
continue;
@@ -1471,7 +1486,7 @@ if (!empty($advanced)) {
print($form);
if ($pkg['note'] != "") {
- print_info_box($pkg['note']);
+ print_info_box($pkg['note'], 'info');
}
if ($pkg['custom_php_after_form_command']) {
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php
index 1c6c9fa..61569a0 100644
--- a/src/usr/local/www/pkg_mgr.php
+++ b/src/usr/local/www/pkg_mgr.php
@@ -76,66 +76,99 @@ if (is_subsystem_dirty('packagelock')) {
exit;
}
-$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Available Packages"));
-include("head.inc");
+// We are being called only to get the pacakge data, not to display anything
+if (($_REQUEST) && ($_REQUEST['ajax'])) {
+ print(get_pkg_table());
+ exit;
+}
-$tab_array = array();
-$tab_array[] = array(gettext("Available Packages"), true, "pkg_mgr.php");
-$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
-display_top_tabs($tab_array);
+// THe content for the table of packages is created here and fetched by Ajax. This allows us to draw the page and dispay
+// any required messages while the table it being downloaded/populated. On very small/slow systems, that can take a while
+function get_pkg_table() {
-$pkg_info = get_pkg_info();
-if ($pkg_info) {
- // Check categories
- $categories = array();
- foreach ($pkg_info as $pkg_data) {
- if (isset($pkg_data['categories'][0])) {
- $categories[$pkg_data['categories'][0]]++;
- }
- }
+ $pkg_info = get_pkg_info();
- ksort($categories, SORT_STRING|SORT_FLAG_CASE);
- $cm_count = 0;
- $tab_array = array();
- $visible_categories = array();
- $categories_min_count = ($g['pkg_categories_min_count'] ? $g['pkg_categories_min_count'] : 3);
- $categories_max_display = ($g['pkg_categories_max_display'] ? $g['pkg_categories_max_display'] : 6);
-
- // check selected category or define default category to show
- if (isset($_REQUEST['category'])) {
- $menu_category = $_REQUEST['category'];
- } elseif (isset($g['pkg_default_category'])) {
- $menu_category = $g['pkg_default_category'];
- } else {
- $menu_category = "All";
+ if (!$pkg_info) {
+ print("error");
+ exit;
}
- $menu_category = (isset($_REQUEST['category']) ? $_REQUEST['category'] : "All");
- $show_category = ($menu_category == "Other" || $menu_category == "All");
+ $pkgtbl = '<table id="pkgtable" class="table table-striped table-hover">' . "\n";
+ $pkgtbl .= '<thead>' . "\n";
+ $pkgtbl .= '<tr>' . "\n";
+ $pkgtbl .= '<th>' . gettext("Name") . "</th>\n";
+ $pkgtbl .= '<th>' . gettext("Version") . "</th>\n";
+ $pkgtbl .= '<th>' . gettext("Description") . "</th>\n";
+ $pkgtbl .= '<th></th>' . "\n";
+ $pkgtbl .= '</tr>' . "\n";
+ $pkgtbl .= '</thead>' . "\n";
+ $pkgtbl .= '<tbody>' . "\n";
+
+ foreach ($pkg_info as $index) {
+ if (isset($index['installed'])) {
+ continue;
+ }
+
+ $pkgtbl .= '<tr>' . "\n";
+ $pkgtbl .= '<td>' . "\n";
+
+ if ($index['www']) {
+ $pkgtbl .= '<a title="' . gettext("Visit official website") . '" target="_blank" href="' . htmlspecialchars($index['www']) . '">' . "\n";
+ }
+
+ $pkgtbl .= htmlspecialchars($index['shortname']);
+ $pkgtbl .= '</a>' . "\n";
+ $pkgtbl .= '</td>' . "\n";
+ $pkgtbl .= '<td>' . "\n";
+
+ if (!$g['disablepackagehistory']) {
+ $pkgtbl .= '<a target="_blank" title="' . gettext("View changelog") . '" href="' . htmlspecialchars($index['changeloglink']) . '">' . "\n";
+ $pkgtbl .= htmlspecialchars($index['version']) . '</a>' . "\n";
+ } else {
+ $pkgtbl .= htmlspecialchars($index['version']);
+ }
+
+ $pkgtbl .= '</td>' . "\n";
+ $pkgtbl .= '<td>' . "\n";
+ $pkgtbl .= $index['desc'];
+
+ if (is_array($index['deps']) && count($index['deps'])) {
+ $pkgtbl .= '<br /><br />' . gettext("Package Dependencies") . ":<ul>\n";
+
+ foreach ($index['deps'] as $pdep) {
+ $pkgtbl .= '<a target="_blank" href="https://freshports.org/' . $pdep['origin'] . '" class="fa fa-globe"><small>&nbsp;' . basename($pdep['origin']) . '-' . $pdep['version'] . '</small></a>&emsp;' . "\n";
+ }
+
+ $pkgtbl .= '</ul>' . "\n";
+ }
+
+ $pkgtbl .= '</td>' . "\n";
+ $pkgtbl .= '<td>' . "\n";
+ $pkgtbl .= '<a title="' . gettext("Click to install") . '" href="pkg_mgr_install.php?id=' . $index['name'] . '" class="btn btn-success btn-sm">install</a>' . "\n";
- $tab_array[] = array(gettext("All"), $menu_category == "All" ? true : false, "pkg_mgr.php?category=All");
- foreach ($categories as $category => $c_count) {
- if ($c_count >= $categories_min_count && $cm_count <= $categories_max_display) {
- $tab_array[] = array(gettext($category) , $menu_category == $category ? true : false, "pkg_mgr.php?category={$category}");
- $visible_categories[] = $category;
- $cm_count++;
+ if (!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']) {
+ $pkgtbl .= '<a target="_blank" title="' . gettext("View more information") . '" href="' . htmlspecialchars($index['pkginfolink']) . '" class="btn btn-default btn-sm">info</a>' . "\n";
}
+
+ $pkgtbl .= '</td>' . "\n";
+ $pkgtbl .= '</tr>' . "\n";
}
- $tab_array[] = array(gettext("Other Categories"), $menu_category == "Other" ? true : false, "pkg_mgr.php?category=Other");
+ $pkgtbl .= '</tbody>' . "\n";
+ $pkgtbl .= '</table>' . "\n";
-// if (count($categories) > 1)
-// display_top_tabs($tab_array);
+ return ($pkgtbl);
}
-if (!$pkg_info || !is_array($pkg_info)):?>
-
-<div class="alert alert-warning">
- <?=gettext("There are currently no packages available for installation.")?>
-</div>
-<?php else:?>
+$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Available Packages"));
+include("head.inc");
-<div class="panel panel-default" id="search-panel">
+$tab_array = array();
+$tab_array[] = array(gettext("Available Packages"), true, "pkg_mgr.php");
+$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
+display_top_tabs($tab_array);
+?>
+<div class="panel panel-default" id="search-panel" style="display: none;">
<div class="panel-heading"><?=gettext('Search')?>
<span class="widget-heading-icon pull-right">
<a data-toggle="collapse" href="#search-panel_panel-body">
@@ -169,69 +202,20 @@ if (!$pkg_info || !is_array($pkg_info)):?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Packages')?></h2></div>
- <div class="panel-body table-responsive">
- <table id="pkgtable" class="table table-striped table-hover">
- <thead>
- <tr>
- <th><?=gettext("Name")?></th>
- <th><?=gettext("Version")?></th>
- <th><?=gettext("Description")?></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
-
-<?php foreach ($pkg_info as $index):
- if (isset($index['installed'])) {
- continue;
- }
+ <div id="pkgtbl" class="panel-body table-responsive">
+ <div id="waitmsg">
+ <?=print_info_box(gettext("Please wait while the list of packages is retrieved and formatted") . '&nbsp;<i class="fa fa-cog fa-spin"></i>')?>
+ </div>
- if ($menu_category != "All" && $index['categories'][0] != $menu_category &&
- !($menu_category == "Other" && !in_array($index['categories'][0], $visible_categories))) {
- continue;
- }
-?>
- <tr>
- <td>
-<?php if ($index['www']):?>
- <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>">
-<?php endif;?>
- <?=htmlspecialchars($index['shortname'])?>
- </a>
- </td>
- <td>
-<?php if (!$g['disablepackagehistory']):?>
- <a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($index['changeloglink'])?>">
- <?=htmlspecialchars($index['version'])?></a>
-<?php else:?>
- <?=htmlspecialchars($index['version'])?>
-<?php endif;?>
- </td>
- <td>
- <?=$index['desc']?>
-<?php if (is_array($index['deps']) && count($index['deps'])):?>
- <br /><br /><?= gettext("Package Dependencies")?>:<ul>
- <?php foreach ($index['deps'] as $pdep):?>
- <a target="_blank" href="https://freshports.org/<?=$pdep['origin']?>" class="fa fa-globe"><small>&nbsp;<?= basename($pdep['origin']) . '-' . $pdep['version']?></small></a>&emsp;
- <?php endforeach;?></ul>
-<?php endif;?>
- </td>
- <td>
- <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
-<?php if (!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?>
- <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a>
-<?php endif;?>
- </td>
- </tr>
-<?php endforeach;?>
- </tbody>
- </table>
+ <div id="errmsg" style="display: none;">
+ <?=print_info_box("<ul><li>" . gettext("Error: Unable to retrieve package information.") . "</li></ul>", 'danger')?>
+ </div>
</div>
</div>
-<?php endif;?>
<script type="text/javascript">
//<![CDATA[
+
events.push(function() {
// Initial state & toggle icons of collapsed panel
@@ -271,7 +255,7 @@ events.push(function() {
$(this).show();
}
} else {
- $(this).show(); // A blank search string shows all
+ $(this).show(); // A blank search string shows all
}
});
});
@@ -293,6 +277,30 @@ events.push(function() {
$("#btnsearch").get(0).click();
}
});
+
+ // Retrieve the table formatted pacakge information and display it in the "Packages" panel
+ // (Or display an appropriate error message)
+ var ajaxRequest;
+
+ $.ajax({
+ url: "/pkg_mgr.php",
+ type: "post",
+ data: { ajax: "ajax"},
+ success: function(data) {
+ if (data == "error") {
+ $('#waitmsg').hide();
+ $('#errmsg').show();
+ } else {
+ $('#pkgtbl').html(data);
+ $('#search-panel').show();
+ }
+ },
+ error: function() {
+ $('#waitmsg').hide();
+ $('#errmsg').show();
+ }
+ });
+
});
//]]>
</script>
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php
index d702beb..b603b06 100644
--- a/src/usr/local/www/pkg_mgr_install.php
+++ b/src/usr/local/www/pkg_mgr_install.php
@@ -374,7 +374,7 @@ if ($input_errors) {
<?php endif;
if ($firmwareupdate && !$firmwareversion) {
- print_info_box(gettext("Unable to retrieve system versions"), danger);
+ print_info_box(gettext("Unable to retrieve system versions"), 'danger');
}
if ($_POST['mode'] == 'delete') {
diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php
index 5289cf1..ce4c96c 100644
--- a/src/usr/local/www/services_captiveportal.php
+++ b/src/usr/local/www/services_captiveportal.php
@@ -567,6 +567,7 @@ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_fil
display_top_tabs($tab_array, true);
$form = new Form();
+$form->setMultipartEncoding();
$section = new Form_Section('Captive Portal Configuration');
@@ -753,6 +754,7 @@ $section->addInput(new Form_Checkbox(
));
$group = new Form_Group('RADIUS protocol');
+$group->addClass("radiusproto");
$group->add(new Form_Checkbox(
'radius_protocol',
@@ -1077,24 +1079,34 @@ $section->addInput(new Form_Input(
&nbsp;&nbsp;&nbsp;&lt;input name=&quot;accept&quot; type=&quot;submit&quot; value=&quot;Continue&quot;&gt;<br />
&lt;/form&gt;')->addClass('btn btn-info btn-sm');
+list($host) = explode(":", $_SERVER['HTTP_HOST']);
+$zoneid = $pconfig['zoneid'] ? $pconfig['zoneid'] : 8000;
+if ($pconfig['httpslogin_enable']) {
+ $port = $pconfig['listenporthttps'] ? $pconfig['listenporthttps'] : ($zoneid + 8001);
+ $href = "https://{$host}:{$port}";
+} else {
+ $port = $pconfig['listenporthttp'] ? $pconfig['listenporthttp'] : ($zoneid + 8000);
+ $href = "http://{$host}:{$port}";
+}
+
if ($pconfig['page']['htmltext']) {
$section->addInput(new Form_Button(
'btnview',
'View current page',
$href
- ))->removeClass('btn-primary')->addClass('btn btn-default btn-xs');
+ ))->removeClass('btn-primary')->addClass('btn btn-default btn-xs')->setAttribute("target", "_blank");
$section->addInput(new Form_Button(
'btndownload',
'Download current page',
- '?zone=' . $cpzone . '&amp;act=gethtmlhtml'
- ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs');
+ '?zone=' . $cpzone . '&act=gethtmlhtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs')->setAttribute("target", "_blank");
$section->addInput(new Form_Button(
'btndownload',
'Restore default portal page',
- '?zone=' . $cpzone . '&amp;act=delhtmlhtml'
- ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs');
+ '?zone=' . $cpzone . '&act=delhtmlhtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs')->setAttribute("target", "_blank");
}
$section->addInput(new Form_Input(
@@ -1116,14 +1128,14 @@ if ($pconfig['page']['errtext']) {
$section->addInput(new Form_Button(
'btndownload',
'Download current page',
- '?zone=' . $cpzone . '&amp;act=geterrhtml'
- ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs');
+ '?zone=' . $cpzone . '&act=geterrhtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs')->setAttribute("target", "_blank");
$section->addInput(new Form_Button(
'btndownload',
'Restore default error page',
- '?zone=' . $cpzone . '&amp;act=delerrhtml'
- ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs');
+ '?zone=' . $cpzone . '&act=delerrhtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs')->setAttribute("target", "_blank");
}
$section->addInput(new Form_Input(
@@ -1137,20 +1149,20 @@ if ($pconfig['page']['logouttext']) {
$section->addInput(new Form_Button(
'btnview',
'View current page',
- '?zone=' . $cpzone . '&amp;act=viewlogouthtml'
- ))->removeClass('btn-primary')->addClass('btn btn-default btn-xs');
+ '?zone=' . $cpzone . '&act=viewlogouthtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-default btn-xs')->setAttribute("target", "_blank");
$section->addInput(new Form_Button(
'btndownload',
'Download current page',
- '?zone=' . $cpzone . '&amp;act=getlogouthtml'
- ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs');
+ '?zone=' . $cpzone . '&act=getlogouthtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-info btn-xs')->setAttribute("target", "_blank");
$section->addInput(new Form_Button(
'btndownload',
'Restore default logout page',
- '?zone=' . $cpzone . '&amp;act=dellogouthtml'
- ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs');
+ '?zone=' . $cpzone . '&act=dellogouthtml'
+ ))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs')->setAttribute("target", "_blank");
}
$section->addInput(new Form_Input(
'zone',
@@ -1192,7 +1204,7 @@ events.push(function() {
disableInput('localauth_priv', !($('input[name="auth_method"]:checked').val() == 'local'));
hideCheckbox('localauth_priv', !($('input[name="auth_method"]:checked').val() == 'local'));
- hideCheckbox('radius_protocol', !($('input[name="auth_method"]:checked').val() == 'radius'));
+ hideClass("radiusproto", !($('input[name="auth_method"]:checked').val() == 'radius'));
}
function hideHTTPS() {
diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php
index 9ef63c8..fcbfbbe 100644
--- a/src/usr/local/www/services_captiveportal_filemanager.php
+++ b/src/usr/local/www/services_captiveportal_filemanager.php
@@ -271,7 +271,7 @@ endif;
// The notes displayed on the page are large, the page content comparitively small. A "Note" button
// is provided so that you only see the notes if you ask for them
?>
-<div id="infoblock" class="panel panel-default">
+<div class="infoblock panel panel-default">
<div class="panel-heading"><h2 class="panel-title">Notes</h2></div>
<div class="panel-body">
<?=gettext("Any files that you upload here with the filename prefix of captiveportal- will " .
diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php
index c40694a..6ccf0d9 100644
--- a/src/usr/local/www/services_captiveportal_hostname.php
+++ b/src/usr/local/www/services_captiveportal_hostname.php
@@ -131,7 +131,7 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
include("head.inc");
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$tab_array = array();
@@ -196,8 +196,8 @@ endif;
</a>
</nav>
-<div id="infoblock">
- <?=print_info_box($notestr)?>
+<div class="infoblock">
+ <?=print_info_box($notestr, 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php
index 6d8c40b..bdba3f7 100644
--- a/src/usr/local/www/services_captiveportal_ip.php
+++ b/src/usr/local/www/services_captiveportal_ip.php
@@ -124,7 +124,7 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
include("head.inc");
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$tab_array = array();
@@ -192,9 +192,9 @@ endif;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. ' .
- 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'), info)?>
+ 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'), 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php
index d9eb4be..fca42ef 100644
--- a/src/usr/local/www/services_captiveportal_mac.php
+++ b/src/usr/local/www/services_captiveportal_mac.php
@@ -255,8 +255,8 @@ endif;
</a>
</nav>
-<div id="infoblock">
- <?=print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'), info)?>
+<div class="infoblock">
+ <?=print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'), 'info', false)?>
</div>
<?php
include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php
index 100e4cc..cfc6ae9 100644
--- a/src/usr/local/www/services_captiveportal_vouchers.php
+++ b/src/usr/local/www/services_captiveportal_vouchers.php
@@ -431,7 +431,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg. 'success');
+ print_info_box($savemsg, 'success');
}
$tab_array = array();
@@ -639,7 +639,7 @@ print($form);
<div class="rolledit">
<?php
print_info_box(gettext('Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings. ' .
- 'Specifying the Voucher Database Synchronization options will not record any other value from the other options. They will be retrieved/synced from the master.'), info);
+ 'Specifying the Voucher Database Synchronization options will not record any other value from the other options. They will be retrieved/synced from the master.'), 'info');
?>
</div>
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index da24b93..4650051 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -938,7 +938,7 @@ if (!is_numeric($pool) && !($act == "newpool")) {
'Failover peer IP',
$pconfig['failover_peerip']
))->setHelp('Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP.' .
- 'Interface\'s advskew determines whether the DHCPd process is Primary or Secondary. Ensure one machine\'s advskew < 20 (and the other is > 20).');
+ 'Interface\'s advskew determines whether the DHCPd process is Primary or Secondary. Ensure one machine\'s advskew &lt; 20 (and the other is &gt; 20).');
}
if (!is_numeric($pool) && !($act == "newpool")) {
diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php
index 7f7a6b3..84c299d 100644
--- a/src/usr/local/www/services_dhcpv6.php
+++ b/src/usr/local/www/services_dhcpv6.php
@@ -887,14 +887,17 @@ $section->addInput(new Form_Input(
));
print($form);
-
+?>
+<div class="infoblock_open">
+<?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.'));
+ gettext('Status: DHCPv6 leases') . '</a>' . gettext(' page.'),
+ 'info');
?>
-
+</div>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">DHCPv6 Static Mappings for this interface.</h2></div>
<div class="panel-body table-responsive">
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php
index 3936420..c46ffa7 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -341,7 +341,9 @@ $section->addInput(new Form_Textarea(
$form->add($section);
print($form);
-
+?>
+<div class="infoblock_open_01">
+<?php
print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP".
" service (if enabled) will automatically serve the LAN IP".
" address as a DNS server to DHCP clients so they will use".
@@ -352,8 +354,9 @@ print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP".
" is checked. If you don't use that option (or if you use".
" a static IP address on WAN), you must manually specify at".
" least one DNS server on the %sSystem:".
- "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'), info);
+ "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'), 'info', false);
?>
+</div>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Host Overrides")?></h2></div>
@@ -430,10 +433,12 @@ endforeach;
</a>
</nav>
+<div class="infoblock_open_02">
<?php
print_info_box(gettext("Entries in this section override individual results from the forwarders.") .
- gettext("Use these for changing DNS results or for adding custom DNS records."), info);
+ gettext("Use these for changing DNS results or for adding custom DNS records."), 'info', false);
?>
+</div>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Domain Overrides")?></h2></div>
@@ -494,8 +499,11 @@ events.push(function() {
// });
//]]>
</script>
+<div class="infoblock_open_03">
<?php
print_info_box(gettext("Entries in this area override an entire domain, and subdomains, by specifying an".
- " authoritative DNS server to be queried for that domain."), info);
-
+ " authoritative DNS server to be queried for that domain."), 'info', false);
+?>
+</div>
+<?php
include("foot.inc");
diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php
index 4e531ce..89ddf68 100644
--- a/src/usr/local/www/services_igmpproxy.php
+++ b/src/usr/local/www/services_igmpproxy.php
@@ -183,9 +183,9 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. ' .
- 'Only one "upstream" interface can be configured.'), info)?>
+ 'Only one "upstream" interface can be configured.'), 'info', false)?>
</div>
<?php
include("foot.inc");
diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php
index 0600045..adde884 100644
--- a/src/usr/local/www/services_ntpd.php
+++ b/src/usr/local/www/services_ntpd.php
@@ -300,7 +300,7 @@ $section->addInput(new Form_Select(
$timeservers = explode(' ', $config['system']['timeservers']);
$maxrows = max(count($timeservers), 1);
for ($counter=0; $counter < $maxrows; $counter++) {
- $group = new Form_Group($counter == 0 ? 'Time servers':'');
+ $group = new Form_Group($counter == 0 ? 'Time Servers':'');
$group->addClass('repeatable');
$group->add(new Form_Input(
@@ -347,7 +347,7 @@ $section->addInput(new Form_StaticText(
$section->addInput(new Form_Input(
'ntporphan',
- 'Orphan mode',
+ 'Orphan Mode',
'text',
$pconfig['ntporphan']
))->setHelp('Orphan mode allows the system clock to be used when no other clocks are available. ' .
@@ -363,15 +363,15 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Checkbox(
'logpeer',
- 'Syslog logging',
- 'Enable logging of peer messages (default: disabled).',
+ 'Logging',
+ 'Log peer messages (default: disabled).',
$pconfig['logpeer']
));
$section->addInput(new Form_Checkbox(
'logsys',
null,
- 'Enable logging of system messages (default: disabled).',
+ '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>');
@@ -385,28 +385,28 @@ $btnadvstats = new Form_Button(
$btnadvstats->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText(
- 'Statistics logging',
+ 'Statistics Logging',
$btnadvstats
))->setHelp('Warning: These options will create persistent daily log files in /var/log/ntp.');
$section->addInput(new Form_Checkbox(
'clockstats',
null,
- 'Enable logging of reference clock statistics (default: disabled).',
+ 'Log reference clock statistics (default: disabled).',
$pconfig['clockstats']
));
$section->addInput(new Form_Checkbox(
'loopstats',
null,
- 'Enable logging of clock discipline statistics (default: disabled).',
+ 'Log clock discipline statistics (default: disabled).',
$pconfig['loopstats']
));
$section->addInput(new Form_Checkbox(
'peerstats',
null,
- 'Enable logging of NTP peer statistics (default: disabled).',
+ 'Log NTP peer statistics (default: disabled).',
$pconfig['peerstats']
));
@@ -426,43 +426,43 @@ $section->addInput(new Form_StaticText(
$section->addInput(new Form_Checkbox(
'kod',
null,
- 'Enable Kiss-o\'-death packets (default: enabled).',
- $pconfig['kod']
+ 'Enable Kiss-o\'-death packets (default: checked).',
+ !$pconfig['kod']
));
$section->addInput(new Form_Checkbox(
'nomodify',
null,
- 'Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled).',
- $pconfig['nomodify']
+ 'Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: checked).',
+ !$pconfig['nomodify']
));
$section->addInput(new Form_Checkbox(
'noquery',
null,
- 'Disable ntpq and ntpdc queries (default: disabled).',
+ 'Disable ntpq and ntpdc queries (default: unchecked).',
$pconfig['noquery']
));
$section->addInput(new Form_Checkbox(
'noserve',
null,
- 'Disable all except ntpq and ntpdc queries (default: disabled).',
+ 'Disable all except ntpq and ntpdc queries (default: unchecked).',
$pconfig['noserve']
));
$section->addInput(new Form_Checkbox(
'nopeer',
null,
- 'Deny packets that attempt a peer association (default: enabled).',
- $pconfig['nopeer']
+ 'Deny packets that attempt a peer association (default: checked).',
+ !$pconfig['nopeer']
));
$section->addInput(new Form_Checkbox(
'notrap',
null,
- 'Deny mode 6 control message trap service (default: enabled).',
- $pconfig['notrap']
+ 'Deny mode 6 control message trap service (default: checked).',
+ !$pconfig['notrap']
))->addClass('advrestrictions');
// Leap seconds section
@@ -522,6 +522,7 @@ events.push(function() {
// On click, show the controls in the restrictions section
$("#btnadvrestr").click(function() {
+ hideCheckbox('kod', false);
hideCheckbox('nomodify', false);
hideCheckbox('noquery', false);
hideCheckbox('noserve', false);
diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php
index fc60424..5b68470 100644
--- a/src/usr/local/www/services_ntpd_gps.php
+++ b/src/usr/local/www/services_ntpd_gps.php
@@ -249,7 +249,7 @@ $gpstypes = array('Custom', 'Default', 'Generic', 'Garmin', 'MediaTek', 'SiRF',
$section->addInput(new Form_Select(
'gpstype',
- 'GPS',
+ 'GPS Type',
$pconfig['type'],
array_combine($gpstypes, $gpstypes)
))->setHelp('This option allows you to select a predefined configuration. ' .
@@ -268,7 +268,7 @@ if (!empty($serialports)) {
$section->addInput(new Form_Select(
'gpsport',
- 'Serial port',
+ 'Serial Port',
$pconfig['port'],
$splist
))->setHelp('All serial ports are listed, be sure to pick the port with the GPS attached. ');
@@ -294,14 +294,14 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Input(
'gpsfudge1',
- 'Fudge time 1',
+ 'Fudge Time 1',
'text',
$pconfig['fudge1']
))->setHelp('Fudge time 1 is used to specify the GPS PPS signal offset (default: 0.0).');
$section->addInput(new Form_Input(
'gpsfudge2',
- 'Fudge time 2',
+ 'Fudge Time 2',
'text',
$pconfig['fudge2']
))->setHelp('Fudge time 2 is used to specify the GPS time offset (default: 0.0).');
@@ -316,49 +316,49 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Checkbox(
'gpsprefer',
'Flags',
- 'NTP should prefer this clock (default: enabled).',
+ 'Prefer this clock (default: checked).',
!$pconfig['prefer']
));
$section->addInput(new Form_Checkbox(
'gpsselect',
null,
- 'NTP should not use this clock, it will be displayed for reference only (default: disabled).',
+ 'Do not use this clock, display for reference only (default: unchecked).',
$pconfig['noselect']
));
$section->addInput(new Form_Checkbox(
'gpsflag1',
null,
- 'Enable PPS signal processing (default: enabled).',
+ 'Enable PPS signal processing (default: checked).',
$pconfig['flag1']
));
$section->addInput(new Form_Checkbox(
'gpsflag2',
null,
- 'Enable falling edge PPS signal processing (default: rising edge).',
+ 'Enable falling edge PPS signal processing (default: unchecked, rising edge).',
$pconfig['flag2']
));
$section->addInput(new Form_Checkbox(
'gpsflag3',
null,
- 'Enable kernel PPS clock discipline (default: enabled).',
+ 'Enable kernel PPS clock discipline (default: checked).',
$pconfig['flag3']
));
$section->addInput(new Form_Checkbox(
'gpsflag4',
null,
- 'Obscure location in timestamp (default: unobscured).',
+ 'Obscure location in timestamp (default: unchecked, unobscured).',
$pconfig['flag4']
));
$section->addInput(new Form_Checkbox(
'gpssubsec',
null,
- 'Log the sub-second fraction of the received time stamp (default: Not logged).',
+ 'Log the sub-second fraction of the received time stamp (default: unchecked, not logged).',
$pconfig['subsec']
))->setHelp('Enabling this will rapidly fill the log, but is useful for tuning Fudge time 2.');
diff --git a/src/usr/local/www/services_ntpd_pps.php b/src/usr/local/www/services_ntpd_pps.php
index 98c1b37..b050168 100644
--- a/src/usr/local/www/services_ntpd_pps.php
+++ b/src/usr/local/www/services_ntpd_pps.php
@@ -167,24 +167,24 @@ $section->addInput(new Form_StaticText(
$serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
if (!empty($serialports)) {
- $splist = array();
-
- foreach ($serialports as $port) {
- $shortport = substr($port, 5);
- $splist[$shortport] = $shortport;
- }
-
- $section->addInput(new Form_Select(
- 'ppsport',
- 'Serial port',
- $pconfig['port'],
- $splist
- ))->setHelp('All serial ports are listed, be sure to pick the port with the PPS source attached. ');
+ $splist = array();
+
+ foreach ($serialports as $port) {
+ $shortport = substr($port, 5);
+ $splist[$shortport] = $shortport;
+ }
+
+ $section->addInput(new Form_Select(
+ 'ppsport',
+ 'Serial Port',
+ $pconfig['port'],
+ $splist
+ ))->setHelp('All serial ports are listed, be sure to pick the port with the PPS source attached. ');
}
$section->addInput(new Form_Input(
'ppsfudge1',
- 'Fudge time',
+ 'Fudge Time',
'text',
$pconfig['fudge1']
))->setHelp('Fudge time is used to specify the PPS signal offset from the actual second such as the transmission delay between the transmitter and the receiver. (default: 0.0).');
@@ -199,21 +199,21 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Checkbox(
'ppsflag2',
'Flags',
- 'Enable falling edge PPS signal processing (default: rising edge).',
+ 'Enable falling edge PPS signal processing (default: unchecked, rising edge).',
$pconfig['flag2']
));
$section->addInput(new Form_Checkbox(
'ppsflag3',
null,
- 'Enable kernel PPS clock discipline (default: disabled).',
+ 'Enable kernel PPS clock discipline (default: unchecked).',
$pconfig['flag3']
));
$section->addInput(new Form_Checkbox(
'ppsflag4',
null,
- 'Record a timestamp once for each second, useful for constructing Allan deviation plots (default: disabled).',
+ 'Record a timestamp once for each second, useful for constructing Allan deviation plots (default: unchecked).',
$pconfig['flag4']
));
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index b1b53ad..e34fcb0 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -352,10 +352,10 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'n_pppoe_units',
- 'No. of PPPoE Users',
+ 'PPPoE User Count',
$pconfig['n_pppoe_units'],
array_combine(range(1, 255, 1), range(1, 255, 1))
-));
+))->setHelp('The number of PPPoE users allowed to connect to this server simultaneously.');
$section->addInput(new Form_IpAddress(
'localip',
@@ -394,22 +394,22 @@ $section->addInput(new Form_IpAddress(
$section->addInput(new Form_Checkbox(
'radiusenable',
'RADIUS',
- 'Use a RADIUS Server for authentication',
+ 'Use RADIUS Authentication',
$pconfig['radiusenable']
-))->setHelp('All users will be authenticated using the RADIUS server specified below. The local user database ' .
+))->setHelp('Users will be authenticated using the RADIUS server specified below. The local user database ' .
'will not be used');
$section->addInput(new Form_Checkbox(
'radacct_enable',
null,
- 'Enable RADIUS Accounting',
+ 'Use RADIUS Accounting',
$pconfig['radacct_enable']
))->setHelp('Sends accounting packets to the RADIUS server');
$section->addInput(new Form_Checkbox(
'radiussecenable',
null,
- 'Use backup RADIUS server',
+ 'Use a Backup RADIUS Authentication Server',
$pconfig['radiussecenable']
))->setHelp('If primary server fails all requests will be sent via backup server');
@@ -417,7 +417,7 @@ $section->addInput(new Form_IpAddress(
'radius_nasip',
'NAS IP Address',
$pconfig['radius_nasip']
-))->setHelp('RADIUS server NAS IP Address');
+))->setHelp('NAS IP Address sent to the RADIUS Server');
$section->addInput(new Form_Input(
'radius_acct_update',
@@ -428,12 +428,12 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Checkbox(
'radiusissueips',
- 'Radius Issued IPs',
- 'Issue IP Addresses via RADIUS server',
+ 'Radius Issued IP Addresses',
+ 'Assign IP Addresses to users via RADIUS server reply attributes',
$pconfig['radiusissueips']
));
-$group = new Form_Group('RADIUS server Primary');
+$group = new Form_Group('Primary RADIUS Server');
$group->add(new Form_IpAddress(
'radiusserver',
@@ -461,12 +461,12 @@ $section->add($group);
$section->addPassword(new Form_Input(
'radiussecret',
- 'RADIUS primary shared secret',
+ 'Primary RADIUS Server Shared Secret',
'password',
$pconfig['radiussecret']
))->setHelp('Enter the shared secret that will be used to authenticate to the RADIUS server.');
-$group = new Form_Group('RADIUS server Secondary');
+$group = new Form_Group('Secondary RADIUS Server');
$group->add(new Form_IpAddress(
'radiusserver2',
@@ -494,7 +494,7 @@ $section->add($group);
$section->addPassword(new Form_Input(
'radiussecret2',
- 'RADIUS secondary shared secret',
+ 'Secondary RADIUS Server Shared Secret',
'password',
$pconfig['radiussecret2']
))->setHelp('Enter the shared secret that will be used to authenticate to the backup RADIUS server.');
@@ -530,7 +530,7 @@ if ($usernames != "") {
null,
'text',
$user
- ))->setHelp($numrows == $counter ? 'User name':null);
+ ))->setHelp($numrows == $counter ? 'Username':null);
$group->add(new Form_Input(
'password' . $counter,
diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php
index 88da96f..6456072 100644
--- a/src/usr/local/www/services_rfc2136_edit.php
+++ b/src/usr/local/www/services_rfc2136_edit.php
@@ -165,7 +165,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$form = new Form;
diff --git a/src/usr/local/www/services_snmp.php b/src/usr/local/www/services_snmp.php
index 58e1b44..16ef69f 100644
--- a/src/usr/local/www/services_snmp.php
+++ b/src/usr/local/www/services_snmp.php
@@ -217,7 +217,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$form = new Form();
diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php
index 6ee8d0f..92b0c2f 100644
--- a/src/usr/local/www/services_unbound.php
+++ b/src/usr/local/www/services_unbound.php
@@ -542,7 +542,7 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(sprintf(gettext("If the DNS Resolver 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".
@@ -550,7 +550,7 @@ endforeach;
" entered in %sSystem: General setup%s".
" or those obtained via DHCP or PPP on WAN if &quot;Allow".
" DNS server list to be overridden by DHCP/PPP on WAN&quot;".
- " is checked."), '<a href="system.php">', '</a>'), info)?>
+ " is checked."), '<a href="system.php">', '</a>'), 'info', false)?>
</div>
<?php include("foot.inc");
diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php
index 8d91c19..606234f 100644
--- a/src/usr/local/www/services_wol.php
+++ b/src/usr/local/www/services_wol.php
@@ -84,8 +84,10 @@ if ($_GET['wakeall'] != "") {
/* 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 />");
+ $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 />");
+ $class = 'warning';
}
}
}
@@ -123,8 +125,10 @@ if ($_POST || $_GET['mac']) {
/* Execute wol command and check return code. */
if (!mwexec("/usr/local/bin/wol -i {$bcip} " . escapeshellarg($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 />");
+ $class = 'warning';
}
}
}
@@ -141,12 +145,15 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Services"), gettext("Wake on LAN"));
include("head.inc");
-
+?>
+<div class="infoblock_open">
+<?php
print_info_box(gettext('This service can be used to wake up (power on) computers by sending special') . ' "' . gettext('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).'));
+ 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');
?>
-
+</div>
<?php
if ($input_errors) {
@@ -154,7 +161,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
$form = new Form('Send');
diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php
index 60fa055..2ebbe88 100644
--- a/src/usr/local/www/status_dhcp_leases.php
+++ b/src/usr/local/www/status_dhcp_leases.php
@@ -312,6 +312,7 @@ foreach ($config['interfaces'] as $ifname => $ifarr) {
$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['staticmap_array_index'] = $staticmap_array_index;
@@ -342,7 +343,7 @@ if (count($pools) > 0) {
</tr>
</thead>
<tbody>
-<? foreach ($pools as $data):?>
+<?php foreach ($pools as $data):?>
<tr>
<td><?=$data['name']?></td>
<td><?=$data['mystate']?></td>
@@ -350,7 +351,7 @@ if (count($pools) > 0) {
<td><?=$data['peerstate']?></td>
<td><?=adjust_gmt($data['peerdate'])?></td>
</tr>
-<? endforeach?>
+<?php endforeach; ?>
</tbody>
</table>
</div>
@@ -423,36 +424,35 @@ foreach ($leases as $data):
<td>
<?=$mac?>
- <? if (isset($mac_man[$mac_hi])):?>
+ <?php if (isset($mac_man[$mac_hi])):?>
(<?=$mac_man[$mac_hi]?>)
- <?endif?>
+ <?php endif; ?>
</td>
<td><?=htmlentities($data['hostname'])?></td>
-<? if ($data['type'] != "static"):?>
+<?php if ($data['type'] != "static"):?>
<td><?=adjust_gmt($data['start'])?></td>
<td><?=adjust_gmt($data['end'])?></td>
-<? else: ?>
- <td>n/a</td>
- <td>n/a</td>
-<? endif; ?>
+<?php else: ?>
+ <td colspan="2"><?=htmlentities($data['descr'])?></td>
+<?php endif; ?>
<td><?=$data['online']?></td>
<td><?=$data['act']?></td>
<td>
-<? if ($data['type'] == "dynamic"): ?>
+<?php if ($data['type'] == "dynamic"): ?>
<a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>"></a>
-<? else: ?>
+<?php else: ?>
<a class="fa fa-pencil" title="<?=gettext('Edit static mapping')?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;id=<?=$data['staticmap_array_index']?>"></a>
-<? endif; ?>
+<?php endif; ?>
<a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>"></a>
-<? if ($data['online'] != "online"):?>
+<?php if ($data['online'] != "online"):?>
<a class="fa fa-power-off" title="<?=gettext("Send WOL packet")?>" href="services_wol.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>"></a>
-<? endif; ?>
+<?php endif; ?>
-<? if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
+<?php if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
<a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcp_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>"></a>
-<? endif?>
+<?php endif; ?>
</td>
-<? endforeach; ?>
+<?php endforeach; ?>
</tr>
</tbody>
</table>
@@ -472,14 +472,14 @@ foreach ($leases as $data):
</tr>
</thead>
<tbody>
-<? foreach ($dhcp_leases_subnet_counter as $listcounters):?>
+<?php foreach ($dhcp_leases_subnet_counter as $listcounters):?>
<tr>
<td><?=$iflist[$listcounters['dhcpif']]?></td>
<td><?=$listcounters['from']?></td>
<td><?=$listcounters['to']?></td>
<td><?=$listcounters['count']?></td>
</tr>
-<? endforeach; ?>
+<?php endforeach; ?>
</tbody>
</table>
</div>
diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php
index e557906..e8259d4 100644
--- a/src/usr/local/www/status_dhcpv6_leases.php
+++ b/src/usr/local/www/status_dhcpv6_leases.php
@@ -411,7 +411,7 @@ if (count($pools) > 0) {
</tr>
</thead>
<tbody>
-<? foreach ($pools as $data):?>
+<?php foreach ($pools as $data):?>
<tr>
<td><?=$data['name']?></td>
<td><?=$data['mystate']?></td>
@@ -419,7 +419,7 @@ if (count($pools) > 0) {
<td><?=$data['peerstate']?></td>
<td><?=adjust_gmt($data['peerdate'])?></td>
</tr>
-<? endforeach?>
+<?php endforeach; ?>
</tbody>
</table>
</div>
@@ -496,30 +496,30 @@ foreach ($leases as $data):
<td>
<?=$mac?>
- <? if (isset($mac_man[$mac_hi])):?>
+ <?php if (isset($mac_man[$mac_hi])):?>
(<?=$mac_man[$mac_hi]?>)
- <?endif?>
+ <?php endif; ?>
</td>
<td><?=htmlentities($data['hostname'])?></td>
-<? if ($data['type'] != "static"):?>
+<?php if ($data['type'] != "static"):?>
<td><?=adjust_gmt($data['start'])?></td>
<td><?=adjust_gmt($data['end'])?></td>
-<? else: ?>
+<?php else: ?>
<td>n/a</td>
<td>n/a</td>
-<? endif; ?>
+<?php endif; ?>
<td><?=$data['online']?></td>
<td><?=$data['act']?></td>
<td>
-<? if ($data['type'] == "dynamic"): ?>
+<?php if ($data['type'] == "dynamic"): ?>
<a <a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcpv6_edit.php?if=<?=$data['if']?>&amp;duid=<?=$data['duid']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>"></a>
-<? endif; ?>
+<?php endif; ?>
<a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>"></a>
-<? if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
+<?php if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
<a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcpv6_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>"></a>
-<? endif?>
+<?php endif; ?>
</td>
-<? endforeach; ?>
+<?php endforeach; ?>
</tr>
</tbody>
</table>
@@ -582,22 +582,22 @@ foreach ($prefixes as $data):
<td><i class="fa <?=$icon?>"></i></td>
<td>
<?=$data['prefix']?>
-<? if ($mappings[$data['iaid'] . $data['duid']]): ?>
+<?php if ($mappings[$data['iaid'] . $data['duid']]): ?>
<br />
<?=gettext('Routed To')?>: <?=$mappings[$data['iaid'] . $data['duid']]?>
-<? endif; ?>
+<?php endif; ?>
</td>
<td><?=$data['iaid']?></td>
<td><?=$data['duid']?></td>
-<? if ($data['type'] != "static"):?>
+<?php if ($data['type'] != "static"):?>
<td><?=adjust_gmt($data['start'])?></td>
<td><?=adjust_gmt($data['end'])?></td>
-<? else: ?>
+<?php else: ?>
<td>n/a</td>
<td>n/a</td>
-<? endif; ?>
+<?php endif; ?>
<td><?=$data['act']?></td>
-<? endforeach; ?>
+<?php endforeach; ?>
</tr>
</tbody>
</table>
diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php
index 8625682..62fe385 100644
--- a/src/usr/local/www/status_graph.php
+++ b/src/usr/local/www/status_graph.php
@@ -262,8 +262,8 @@ if (ipsec_enabled()) {
<object data="graph.php?ifnum=<?=htmlspecialchars($curif);?>&amp;ifname=<?=rawurlencode($ifdescrs[htmlspecialchars($curif)]);?>">
<param name="id" value="graph" />
<param name="type" value="image/svg+xml" />
- <param name="width" value="<? echo $width; ?>" />
- <param name="height" value="<? echo $height; ?>" />
+ <param name="width" value="<?php echo $width; ?>" />
+ <param name="height" value="<?php echo $height; ?>" />
<param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" />
</object>
</div>
diff --git a/src/usr/local/www/status_graph_cpu.php b/src/usr/local/www/status_graph_cpu.php
index 4581b19..8533160 100644
--- a/src/usr/local/www/status_graph_cpu.php
+++ b/src/usr/local/www/status_graph_cpu.php
@@ -72,12 +72,12 @@ $pgtitle = gettext("Status: CPU Graph");
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">CPU Load graph</h2></div>
- <div class="panel-body" align="center">
+ <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 align="center"><strong><?=gettext("Note"); ?>:</strong><?=gettext("if you can't see the graph, you may have to install the")?>
+ <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>
</div>
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php
index 963932e..9ae722d 100755
--- a/src/usr/local/www/status_logs.php
+++ b/src/usr/local/www/status_logs.php
@@ -129,7 +129,7 @@ $pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_log
include("head.inc");
if (!$input_errors && $savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
$manage_log_active = false;
}
diff --git a/src/usr/local/www/status_logs_common.inc b/src/usr/local/www/status_logs_common.inc
index 35098ee..56bbdd7 100644
--- a/src/usr/local/www/status_logs_common.inc
+++ b/src/usr/local/www/status_logs_common.inc
@@ -516,7 +516,7 @@ function status_logs_build_if_list() {
// Manage Log Section - Code
function manage_log_code() {
- global $logfile, $specific_log, $config, $pconfig, $rawfilter, $save_settings, $input_errors;
+ global $logfile, $specific_log, $config, $pconfig, $rawfilter, $save_settings, $input_errors, $savemsg;
$specific_log = basename($logfile) . '_settings';
@@ -649,12 +649,12 @@ function manage_log_code() {
write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false);
$retval = 0;
$retval = system_syslogd_start();
+ $savemsg = gettext("The changes have been applied successfully.");
} else {
write_config($desc = "Log Display Settings Saved (no backup, no sync): " . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true);
+ $savemsg = '';
}
- $savemsg = gettext("The changes have been applied successfully.");
-
// Specific to System General (main) Log
if ($logfile == 'system') {
if ($nginx_logging_changed) {
@@ -753,7 +753,7 @@ function manage_log_section() {
'GUI Log Entries',
'number',
$pconfig['nentries'],
- ['min' => 5, 'max' => 2000, 'placeholder' => $config['syslog']['nentries']]
+ ['min' => 5, 'max' => 2000, 'placeholder' => $config['syslog']['nentries'] ? $config['syslog']['nentries'] : "50"]
))->setWidth(2);
$group->setHelp('This is the number of log entries displayed in the GUI. It does not affect how many entries are contained in the log.');
diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
index 2a28239..007a621 100644
--- a/src/usr/local/www/status_logs_filter.php
+++ b/src/usr/local/www/status_logs_filter.php
@@ -136,7 +136,7 @@ $pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_log
include("head.inc");
if (!$input_errors && $savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
$manage_log_active = false;
}
@@ -349,14 +349,11 @@ if (!$rawfilter) {
}
?>
-<div id="infoblock">
-
+<div class="infoblock">
<?php
-
print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR' . '<br />' .
- '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve');
-
+ '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve', 'info', false);
?>
</div>
diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php
index 211b5c8..4a8b6d6 100755
--- a/src/usr/local/www/status_logs_filter_dynamic.php
+++ b/src/usr/local/www/status_logs_filter_dynamic.php
@@ -116,7 +116,7 @@ $pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_log
include("head.inc");
if (!$input_errors && $savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
$manage_log_active = false;
}
@@ -477,10 +477,10 @@ function toggleListDescriptions() {
<?php
if ($tcpcnt > 0) {
?>
-<div id="infoblock">
+<div class="infoblock">
<?php
print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
- gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR');
+ gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR', 'info', false);
?>
</div>
<?php
diff --git a/src/usr/local/www/status_logs_filter_summary.php b/src/usr/local/www/status_logs_filter_summary.php
index 4e23f93..9830167 100644
--- a/src/usr/local/www/status_logs_filter_summary.php
+++ b/src/usr/local/www/status_logs_filter_summary.php
@@ -102,7 +102,7 @@ $pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_log
include("head.inc");
if (!$input_errors && $savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
$manage_log_active = false;
}
@@ -153,11 +153,14 @@ foreach ($filterlog as $fe) {
}
}
-
print("<br />");
-$infomsg = sprintf('This is a summary of the last %1$s lines of the firewall log (Max %2$s).', $gotlines, $lines);
-print_info_box($infomsg, info);
+$infomsg = sprintf(gettext('This is a summary of the last %1$s lines of the firewall log (Max %2$s).'), $gotlines, $lines);
?>
+<div>
+ <div class="infoblock_open">
+ <?=print_info_box($infomsg, 'info', false);?>
+ </div>
+</div>
<script src="d3pie/d3pie.min.js"></script>
<script src="d3pie/d3.min.js"></script>
@@ -350,4 +353,4 @@ var pie = new d3pie("pieChart<?=$chartnum?>", {
<?php
include("foot.inc");
-?> \ No newline at end of file
+?>
diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php
index ca4e887..d5457e3 100644
--- a/src/usr/local/www/status_logs_vpn.php
+++ b/src/usr/local/www/status_logs_vpn.php
@@ -118,7 +118,7 @@ $pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_log
include("head.inc");
if (!$input_errors && $savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
$manage_log_active = false;
}
diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php
index 2f07e4a..c231908 100644
--- a/src/usr/local/www/status_ntpd.php
+++ b/src/usr/local/www/status_ntpd.php
@@ -298,7 +298,7 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)):
}
if (isset($gps_sat) || isset($gps_satview)) { ?>
- <td align="center"> <?php
+ <td class="text-center"> <?php
if (isset($gps_satview)) {
print('in view ' . intval($gps_satview));
}
diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php
index c67cf93..64ade5d 100644
--- a/src/usr/local/www/status_queues.php
+++ b/src/usr/local/www/status_queues.php
@@ -211,20 +211,16 @@ else: ?>
<?php endif; ?>
</tbody>
</table>
- <br />
+ <br />
+ <div class="infoblock_open">
<?php
- print_info_box(gettext("Queue graphs take 5 seconds to sample data"));
+ print_info_box(gettext("Queue graphs take 5 seconds to sample data"), 'info');
?>
+ </div>
</div>
</div>
<br/>
-<?php
-
-
-
-?>
-
<script type="text/javascript">
//<![CDATA[
function StatsShowHide(classname) {
diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php
index 11a45d0..0ae10c0 100644
--- a/src/usr/local/www/status_rrd_graph.php
+++ b/src/usr/local/www/status_rrd_graph.php
@@ -613,7 +613,7 @@ if ($curcat == 'custom') {
$id = preg_replace('/\./', '_', $id);
?>
<div class="panel panel-default">
- <img align="center" name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
+ <img class="img-responsive center-block" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
</div>
<?php
@@ -690,8 +690,8 @@ if ($curcat == 'custom') {
$start = $dates['start'];
$end = $dates['end'];
?>
- <div class="panel panel-default" align="center">
- <img name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
+ <div class="panel panel-default">
+ <img class="img-responsive center-block" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
</div>
<?php
}
diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php
index dfe3659..bdd805d 100644
--- a/src/usr/local/www/status_wireless.php
+++ b/src/usr/local/www/status_wireless.php
@@ -242,10 +242,12 @@ display_top_tabs($tab_array);
</button>
</nav>
</form>
-
+<div class="infoblock">
<?php
print_info_box('<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');
+?>
+</div>
+<?php
include("foot.inc");
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php
index 257f4e8..56367a1 100644
--- a/src/usr/local/www/system_advanced_admin.php
+++ b/src/usr/local/www/system_advanced_admin.php
@@ -393,7 +393,7 @@ $section->addInput(new Form_Input(
'users/browsers to access the GUI concurrently.');
$section->addInput(new Form_Checkbox(
- 'disablehttpredirect',
+ 'webgui-redirect',
'WebGUI redirect',
'Disable webConfigurator redirect rule',
$pconfig['disablehttpredirect']
@@ -413,7 +413,7 @@ $section->addInput(new Form_Checkbox(
'this option).');
$section->addInput(new Form_Checkbox(
- 'quietlogin',
+ 'webgui-login-messages',
'WebGUI login messages',
'Disable logging of webConfigurator successful logins',
$pconfig['quietlogin']
@@ -597,4 +597,4 @@ if ($restart_webgui) {
log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
send_event("service restart webgui");
}
-?> \ No newline at end of file
+?>
diff --git a/src/usr/local/www/system_advanced_firewall.php b/src/usr/local/www/system_advanced_firewall.php
index 518b59e..43af9bc 100644
--- a/src/usr/local/www/system_advanced_firewall.php
+++ b/src/usr/local/www/system_advanced_firewall.php
@@ -393,8 +393,10 @@ if ($_POST) {
$retval = filter_configure();
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message($retval);
+ $class = 'success';
} else {
$savemsg = $retval;
+ $class = 'warning';
}
}
}
@@ -406,7 +408,7 @@ if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
$tab_array = array();
diff --git a/src/usr/local/www/system_advanced_network.php b/src/usr/local/www/system_advanced_network.php
index 32dfe8e..6b271e2 100644
--- a/src/usr/local/www/system_advanced_network.php
+++ b/src/usr/local/www/system_advanced_network.php
@@ -162,8 +162,10 @@ if ($_POST) {
$retval = filter_configure();
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message(gettext($retval));
+ $class = 'success';
} else {
$savemsg = gettext($retval);
+ $class = 'warning';
}
}
}
@@ -175,7 +177,7 @@ if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
$tab_array = array();
diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php
index 1ccf60f..8240de1 100644
--- a/src/usr/local/www/system_gateway_groups.php
+++ b/src/usr/local/www/system_gateway_groups.php
@@ -201,10 +201,10 @@ endforeach;
</a>
</nav>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' .
'or policy-based routing.' . '<br />' .
- 'Without rules directing traffic into the Gateway Groups, they will not be used.'), info)?>
+ 'Without rules directing traffic into the Gateway Groups, they will not be used.'), 'info', false)?>
</div>
<?php
include("foot.inc");
diff --git a/src/usr/local/www/system_gateways.php b/src/usr/local/www/system_gateways.php
index 0a6905f..e73d00b 100644
--- a/src/usr/local/www/system_gateways.php
+++ b/src/usr/local/www/system_gateways.php
@@ -319,7 +319,7 @@ foreach ($a_gateways as $i => $gateway):
<a href="system_gateways_edit.php?id=<?=$i?>" class="fa fa-pencil" title="<?=gettext('Edit');?>"></a>
<a href="system_gateways_edit.php?dup=<?=$i?>" class="fa fa-clone" title="<?=gettext('Copy')?>"></a>
-<? if (is_numeric($gateway['attribute'])): ?>
+<?php if (is_numeric($gateway['attribute'])): ?>
<?php if (isset($gateway['disabled'])) {
?>
<a href="?act=toggle&amp;id=<?=$i?>" class="fa fa-check-square-o" title="<?=gettext('Enable')?>"></a>
@@ -330,10 +330,10 @@ foreach ($a_gateways as $i => $gateway):
?>
<a href="system_gateways.php?act=del&amp;id=<?=$i?>" class="fa fa-trash" title="<?=gettext('Delete')?>"></a>
-<? endif?>
+<?php endif; ?>
</td>
</tr>
-<? endforeach?>
+<?php endforeach; ?>
</tbody>
</table>
diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php
index a934ad3..b903dc7 100644
--- a/src/usr/local/www/system_groupmanager.php
+++ b/src/usr/local/www/system_groupmanager.php
@@ -265,7 +265,7 @@ if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$tab_array = array();
diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php
index be2b88f..c705a93 100644
--- a/src/usr/local/www/system_groupmanager_addprivs.php
+++ b/src/usr/local/www/system_groupmanager_addprivs.php
@@ -150,7 +150,7 @@ if ($_POST) {
/* if ajax is calling, give them an update message */
if (isAjax()) {
- print_info_box_np($savemsg);
+ print_info_box_np($savemsg, '', '', false, 'success');
}
function build_priv_list() {
diff --git a/src/usr/local/www/system_routes.php b/src/usr/local/www/system_routes.php
index 5e5e41e..3787f06 100644
--- a/src/usr/local/www/system_routes.php
+++ b/src/usr/local/www/system_routes.php
@@ -251,7 +251,7 @@ if ($input_errors) {
print_input_errors($input_errors);
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('staticroutes')) {
print_info_box_np(gettext("The static route configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
@@ -315,7 +315,7 @@ foreach ($a_routes as $i => $route):
</td>
</tr>
-<? endforeach?>
+<?php endforeach; ?>
</table>
<nav class="action-buttons">
diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php
index c8ef99a..33c0658 100644
--- a/src/usr/local/www/system_usermanager.php
+++ b/src/usr/local/www/system_usermanager.php
@@ -542,14 +542,14 @@ foreach ($a_user as $i => $userent):
</nav>
</form>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box(gettext("Additional users can be added here. User permissions for accessing " .
"the webConfigurator can be assigned directly or inherited from group memberships. " .
"An icon that appears grey indicates that it is a system defined object. " .
"Some system object properties can be modified but they cannot be deleted.") .
'<br /><br />' .
gettext("Accounts added here are also used for other parts of the system " .
- "such as OpenVPN, IPsec, and Captive Portal."), info)?>
+ "such as OpenVPN, IPsec, and Captive Portal."), 'info', false)?>
</div>
<?php
diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php
index 61984bd..d683da6 100644
--- a/src/usr/local/www/system_usermanager_addprivs.php
+++ b/src/usr/local/www/system_usermanager_addprivs.php
@@ -154,7 +154,7 @@ function build_priv_list() {
/* if ajax is calling, give them an update message */
if (isAjax()) {
- print_info_box_np($savemsg);
+ print_info_box_np($savemsg, '', '', false, 'success');
}
include("head.inc");
diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php
index 1d2ce05..00e6ea1 100644
--- a/src/usr/local/www/system_usermanager_passwordmg.php
+++ b/src/usr/local/www/system_usermanager_passwordmg.php
@@ -117,7 +117,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
if ($islocal == false) {
diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php
index 9c5b68c..27034b7 100644
--- a/src/usr/local/www/vpn_ipsec.php
+++ b/src/usr/local/www/vpn_ipsec.php
@@ -561,11 +561,11 @@ display_top_tabs($tab_array);
</nav>
</form>
-<div id="infoblock">
+<div class="infoblock">
<?=print_info_box('<strong>' . gettext("Note:") . '</strong><br />' .
gettext("You can check your IPsec status at ") . '<a href="status_ipsec.php">' . gettext("Status:IPsec") . '</a>.<br />' .
gettext("IPsec Debug Mode can be enabled at ") . '<a href="vpn_ipsec_settings.php">' .gettext("VPN:IPsec:Advanced Settings") . '</a>.<br />' .
- gettext("IPsec can be set to prefer older SAs at ") . '<a href="vpn_ipsec_settings.php">' . gettext("VPN:IPsec:Advanced Settings") . '</a>', info)?>
+ gettext("IPsec can be set to prefer older SAs at ") . '<a href="vpn_ipsec_settings.php">' . gettext("VPN:IPsec:Advanced Settings") . '</a>', 'info', false)?>
</div>
<script type="text/javascript">
diff --git a/src/usr/local/www/vpn_ipsec_mobile.php b/src/usr/local/www/vpn_ipsec_mobile.php
index 8543772..03c8aa8 100644
--- a/src/usr/local/www/vpn_ipsec_mobile.php
+++ b/src/usr/local/www/vpn_ipsec_mobile.php
@@ -434,7 +434,7 @@ include("head.inc");
<?php
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('ipsec')) {
print_info_box_np(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_settings.php b/src/usr/local/www/vpn_ipsec_settings.php
index 2062716..a6e858a 100644
--- a/src/usr/local/www/vpn_ipsec_settings.php
+++ b/src/usr/local/www/vpn_ipsec_settings.php
@@ -210,8 +210,10 @@ if ($_POST) {
$retval = filter_configure();
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message(gettext($retval));
+ $class = 'success';
} else {
$savemsg = gettext($retval);
+ $class = 'warning';
}
vpn_ipsec_configure($needsrestart);
@@ -253,7 +255,7 @@ function maxmss_checked(obj) {
<?php
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
if ($input_errors) {
diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php
index 1251355..588ada8 100644
--- a/src/usr/local/www/vpn_l2tp.php
+++ b/src/usr/local/www/vpn_l2tp.php
@@ -215,7 +215,7 @@ if ($_POST) {
/* if ajax is calling, give them an update message */
if (isAjax()) {
- print_info_box_np($savemsg);
+ print_info_box_np($savemsg, '', '', false, 'success');
}
}
}
@@ -229,7 +229,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, 'success');
}
$tab_array = array();
@@ -368,7 +368,7 @@ $form->add($section);
print($form);
-print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!"), info);
+print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!"), 'info');
?>
<script type="text/javascript">
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php
index 5763585..5698468 100644
--- a/src/usr/local/www/vpn_openvpn_client.php
+++ b/src/usr/local/www/vpn_openvpn_client.php
@@ -673,7 +673,7 @@ if ($act=="new" || $act=="edit"):
'IPv4 Tunnel Network',
'text',
$pconfig['tunnel_network']
- ))->setHelp('This is the IPv4 virtual network used for private communications between this client and the sercer ' .
+ ))->setHelp('This is the IPv4 virtual network used for private communications between this client and the server ' .
'expressed using CIDR (eg. 10.0.8.0/24). The first network address will be assigned to ' .
'the client virtual interface.');
diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php
index bb64dfe..5973fb1 100644
--- a/src/usr/local/www/widgets/widgets/services_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/services_status.widget.php
@@ -116,7 +116,7 @@ if (count($services) > 0) {
<?php
}
} else {
- echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . " . </td></tr>\n";
+ echo "<tr><td colspan=\"3\" class=\"text-center\">" . gettext("No services found") . " . </td></tr>\n";
}
?>
</tbody>
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index c5da475..45bb113 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -124,8 +124,8 @@ $filesystems = get_mounted_filesystems();
<br />
<span title="<?php echo php_uname("a"); ?>"><?php echo php_uname("s") . " " . php_uname("r"); ?></span>
<?php endif; ?>
- <br/><br/>
<?php if (!isset($config['system']['firmware']['disablecheck'])): ?>
+ <br /><br />
<div id='updatestatus'><?php echo gettext("Obtaining update status "); ?><i class="fa fa-cog fa-spin"></i></div>
<?php endif; ?>
</td>
@@ -190,7 +190,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<th><?=gettext("DNS server(s)");?></th>
<td>
- <ul>
+ <ul style="margin-bottom:0px">
<?php
$dns_servers = get_dns_servers();
foreach($dns_servers as $dns) {
diff --git a/src/usr/local/www/wizard.php b/src/usr/local/www/wizard.php
index 9914c5b..6bf58ab 100644
--- a/src/usr/local/www/wizard.php
+++ b/src/usr/local/www/wizard.php
@@ -215,7 +215,8 @@ do {
} while ($oldstepid != $stepid);
$pgtitle = array(gettext("Wizard"), gettext($pkg['step'][0]['title'])); //First step is main title of the wizard in the breadcrumb
-$pgtitle[] = ($stepid > 0 ? gettext($pkg['step'][$stepid]['title']):''); //Following steps are sub-level breadcrumbs.
+$pgtitle[] = ($stepid > 0 ? gettext($pkg['step'][$stepid]['title']):'&nbsp;'); //Following steps are sub-level breadcrumbs.
+$shortcut_section = "Wizard";
include("head.inc");
if ($pkg['step'][$stepid]['fields']['field'] != "") { ?>
@@ -448,7 +449,7 @@ $completion = ($stepid == 0) ? 0:($stepid * 100) / ($totalsteps -1);
?>
<!-- Present the pfSense logo -->
-<div class="text-center"><p><a href="<?=$ip?>"><img border="0" src="logo-black.png" alt="logo-black" align="middle" height="45" width="180" /></a></p></div><br /><br/>
+<div class="text-center"><p><a href="<?=$ip?>"><img src="logo-black.png" alt="logo-black" style="border:0px; vertical-align:middle" height="45" width="180" /></a></p></div><br /><br/>
<!-- Draw a progress bar to show step progress -->
<div class="progress">
@@ -536,7 +537,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
'text',
$value
))->setHelp($field['description'])
- ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")":"");
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, \"" . $field['validate'] . "\", \"" . $field['message'] . "\")":"");
break;
case "text":
@@ -557,7 +558,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$onchange = "";
if ($field['validate']) {
- $onchange="FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")";
+ $onchange="FieldValidate(this.value, \"" . $field['validate'] . "\", \"" . $field['message'] . "\")";
}
$section->addInput(new Form_Input(
@@ -647,7 +648,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
'password',
$value
))->setHelp($field['description'])
- ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] .")":"");
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, \"" . $field['validate'] . "\", \"" . $field['message'] ."\")":"");
break;
case "certca_selection":
@@ -804,7 +805,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$value
))->setHelp($field['description'])
->setAttribute('rows', $field['rows'])
- ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")":"");
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, \"" . $field['validate'] . "\", \"" . $field['message'] . "\")":"");
break;
case "submit":
OpenPOWER on IntegriCloud