diff options
author | Christopher Fazendin <cfazendin@gmail.com> | 2016-05-05 15:07:25 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-06-22 11:03:18 -0400 |
commit | ef609a57c57e11ad38cf990adeda54733671ebfd (patch) | |
tree | 47c22073d265abb4985dce9ac19c6265bd1209be /src/usr/local | |
parent | b8eb4e7f7593ae21bbcf1a33546b215c55aa1810 (diff) | |
download | pfsense-ef609a57c57e11ad38cf990adeda54733671ebfd.zip pfsense-ef609a57c57e11ad38cf990adeda54733671ebfd.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.
(cherry picked from commit 1d12996755ee6fb9b9e163d292bdba160a926e64)
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/head.inc | 30 | ||||
-rw-r--r-- | src/usr/local/www/system.php | 14 |
2 files changed, 34 insertions, 10 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index d88576e..3e1f949 100644 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -449,16 +449,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 2795c6c..6a85037 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 { @@ -536,6 +543,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', |