summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorChristopher Fazendin <cfazendin@gmail.com>2016-05-05 15:07:25 -0500
committerChristopher Fazendin <cfazendin@gmail.com>2016-05-05 15:07:25 -0500
commit1d12996755ee6fb9b9e163d292bdba160a926e64 (patch)
tree5199e00a86bf4632c1993cf9227a186e2d1f5e58 /src/usr
parent5c97738b3c8aaa3663988ce1a740e74b82b952be (diff)
downloadpfsense-1d12996755ee6fb9b9e163d292bdba160a926e64.zip
pfsense-1d12996755ee6fb9b9e163d292bdba160a926e64.tar.gz
Added option to System > General Setup > webConfigurator to change the title of the Help menu in the navbar to either the system hostname or fqdn.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/head.inc30
-rw-r--r--src/usr/local/www/system.php14
2 files changed, 34 insertions, 10 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index cd5257e..78a7bb9 100644
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -448,16 +448,26 @@ if (($pagename === "index.php") && ($numColumns > 2)) {
</div>
<div class="collapse navbar-collapse" id="pf-navbar">
<ul class="nav navbar-nav">
- <?php foreach ([
- ['name' => 'System', 'menu' => $system_menu, 'href' => null],
- ['name' => 'Interfaces', 'menu' => $interfaces_menu, 'href' => null],
- ['name' => 'Firewall', 'menu' => $firewall_menu, 'href' => null],
- ['name' => 'Services', 'menu' => $services_menu, 'href' => null],
- ['name' => 'VPN', 'menu' => $vpn_menu, 'href' => null],
- ['name' => 'Status', 'menu' => $status_menu, 'href' => null],
- ['name' => 'Diagnostics', 'menu' => $diagnostics_menu, 'href' => null],
- ['name' => 'Gold', 'menu' => $gold_menu, 'href' => '_blank'],
- ['name' => 'Help', 'menu' => $help_menu, 'href' => '_blank']
+ <?php
+ if ($config['system']['webgui']['webguihostnamemenu'] == 'hostonly') {
+ $help_menu_title = htmlspecialchars($config['system']['hostname']);
+ }
+ elseif ($config['system']['webgui']['webguihostnamemenu'] == 'fqdn') {
+ $help_menu_title = htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']);
+ }
+ else {
+ $help_menu_title = 'Help';
+ }
+ foreach ([
+ ['name' => 'System', 'menu' => $system_menu, 'href' => null],
+ ['name' => 'Interfaces', 'menu' => $interfaces_menu, 'href' => null],
+ ['name' => 'Firewall', 'menu' => $firewall_menu, 'href' => null],
+ ['name' => 'Services', 'menu' => $services_menu, 'href' => null],
+ ['name' => 'VPN', 'menu' => $vpn_menu, 'href' => null],
+ ['name' => 'Status', 'menu' => $status_menu, 'href' => null],
+ ['name' => 'Diagnostics', 'menu' => $diagnostics_menu, 'href' => null],
+ ['name' => 'Gold', 'menu' => $gold_menu, 'href' => '_blank'],
+ ['name' => $help_menu_title, 'menu' => $help_menu, 'href' => '_blank']
] as $item):
if ($item['name'] == 'Help' && $g['disablehelpmenu']) {
continue;
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index da791dc..2daea9b 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -97,6 +97,7 @@ $pconfig['dashboardavailablewidgetspanel'] = isset($config['system']['webgui']['
$pconfig['systemlogsfilterpanel'] = isset($config['system']['webgui']['systemlogsfilterpanel']);
$pconfig['systemlogsmanagelogpanel'] = isset($config['system']['webgui']['systemlogsmanagelogpanel']);
$pconfig['statusmonitoringsettingspanel'] = isset($config['system']['webgui']['statusmonitoringsettingspanel']);
+$pconfig['webguihostnamemenu'] = isset($config['system']['webgui']['webguihostnamemenu']);
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
if (!$pconfig['timezone']) {
@@ -157,6 +158,12 @@ if ($_POST) {
unset($config['system']['webgui']['webguifixedmenu']);
}
+ if ($_POST['webguihostnamemenu']) {
+ $config['system']['webgui']['webguihostnamemenu'] = $_POST['webguihostnamemenu'];
+ } else {
+ unset($config['system']['webgui']['webguihostnamemenu']);
+ }
+
if ($_POST['dashboardcolumns']) {
$config['system']['webgui']['dashboardcolumns'] = $_POST['dashboardcolumns'];
} else {
@@ -518,6 +525,13 @@ $section->addInput(new Form_Select(
["" => gettext("Scrolls with page"), "fixed" => gettext("Fixed (Remains visible at top of page)")]
))->setHelp("The fixed option is intended for large screens only.");
+$section->addInput(new Form_Select(
+ 'webguihostnamemenu',
+ 'Hostname in Menu',
+ $pconfig['webguihostnamemenu'],
+ ["" => gettext("Default (No hostname)"), "hostonly" => gettext("Hostname only"), "fqdn" => gettext("Fully Qualified Domain Name")]
+))->setHelp("Replaces the Help menu title in the Navbar with the system hostname or FQDN.");
+
$section->addInput(new Form_Input(
'dashboardcolumns',
'Dashboard Columns',
OpenPOWER on IntegriCloud