summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2016-10-24 11:30:22 -0400
committerSteve Beaver <sbeaver@netgate.com>2016-10-24 11:36:34 -0400
commit506fe75529a95ea83a9b2831b91deea61563dbff (patch)
tree773b93e99ef6815d20b761998312cb696e8dbeec
parent71bb3f0138fe0ad811a607c060251c1739be8837 (diff)
downloadpfsense-506fe75529a95ea83a9b2831b91deea61563dbff.zip
pfsense-506fe75529a95ea83a9b2831b91deea61563dbff.tar.gz
Provide conrol on system.php to allow display of hostname on login banner
(cherry picked from commit a22947a4980a9f8beb294d6bad039495164ff1aa)
-rw-r--r--src/etc/inc/authgui.inc6
-rw-r--r--src/usr/local/www/system.php10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc
index 9a60762..c2f3e4d 100644
--- a/src/etc/inc/authgui.inc
+++ b/src/etc/inc/authgui.inc
@@ -252,6 +252,12 @@ if (isset($user_settings['webgui']['webguicss'])) {
}
}
+if (isset($config['system']['webgui']['loginshowhost'])) {
+$hoststr = sprintf(gettext(" on %s.%s"), htmlspecialchars($config['system']['hostname']), htmlspecialchars($config['system']['domain']));
+} else {
+ $hoststr = "";
+}
+
?>
<!DOCTYPE html>
<html lang="en">
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 9279bd1..86d237a 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -99,6 +99,7 @@ $pconfig['statusmonitoringsettingspanel'] = isset($config['system']['webgui']['s
$pconfig['webguihostnamemenu'] = $config['system']['webgui']['webguihostnamemenu'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
$pconfig['dashboardperiod'] = isset($config['widgets']['period']) ? $config['widgets']['period']:"10";
+$pconfig['loginshowhost'] = isset($config['system']['webgui']['loginshowhost']);
if (!$pconfig['timezone']) {
if (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
@@ -156,6 +157,8 @@ if ($_POST) {
unset($config['system']['webgui']['webguicss']);
}
+ $config['system']['webgui']['loginshowhost'] = $_POST['loginshowhost'] ? true:false;
+
if ($_POST['webguifixedmenu']) {
$config['system']['webgui']['webguifixedmenu'] = $_POST['webguifixedmenu'];
} else {
@@ -519,6 +522,13 @@ gen_associatedpanels_fields(
$pconfig['statusmonitoringsettingspanel']);
gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
+$section->addInput(new Form_Checkbox(
+ 'loginshowhost',
+ 'Login hostname',
+ 'Show hostname on login banner',
+ $pconfig['loginshowhost']
+));
+
$section->addInput(new Form_Input(
'dashboardperiod',
'Dashboard update period',
OpenPOWER on IntegriCloud