summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-11-23 13:39:36 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-11-23 13:39:36 -0500
commitddb84143c8bb3bdd94350d40cd1610892b6d8053 (patch)
tree2473178ea286d7d1c385a306951d4e28b3d3a7b2 /src
parentfeb2e08ce206cf4636718405a1bf3a28c323ed79 (diff)
downloadpfsense-ddb84143c8bb3bdd94350d40cd1610892b6d8053.zip
pfsense-ddb84143c8bb3bdd94350d40cd1610892b6d8053.tar.gz
Add support for scrolling menu bar (fixed vs static)
Now required body padding to prevent page top from being hidden
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/local/www/head.inc7
-rw-r--r--src/usr/local/www/system.php20
2 files changed, 23 insertions, 4 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index 0e7b8ed..f666e13 100755
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -376,8 +376,13 @@ if (!$g['disablehelpmenu']) {
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")), 0);
}
+$menuclass = "navbar navbar-static-top navbar-inverse";
+
+if (isset($config['system']['webgui']['webguifixedmenu'])) {
+ $menuclass = "navbar navbar-fixed-top navbar-inverse";
+}
?>
-<nav class="navbar navbar-static-top navbar-inverse">
+<nav class="<?=$menuclass?>">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#pf-navbar">
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 72d883c..295576d 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -89,7 +89,7 @@ $pconfig['timezone'] = $config['system']['timezone'];
$pconfig['timeservers'] = $config['system']['timeservers'];
$pconfig['language'] = $config['system']['language'];
$pconfig['webguicss'] = $config['system']['webgui']['webguicss'];
-
+$pconfig['webguifixedmenu'] = $config['system']['webgui']['webguiwebguifixedmenu'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
if (!$pconfig['timezone']) {
@@ -144,6 +144,12 @@ if ($_POST) {
unset($config['system']['webgui']['webguicss']);
}
+ if ($_POST['webguifixedmenu']) {
+ $config['system']['webgui']['webguifixedmenu'] = $_POST['webguifixedmenu'];
+ } else {
+ unset($config['system']['webgui']['webguifixedmenu']);
+ }
+
if ($_POST['hostname']) {
if (!is_hostname($_POST['hostname'])) {
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'.");
@@ -326,8 +332,9 @@ include("head.inc");
if ($input_errors)
print_input_errors($input_errors);
+
if ($savemsg)
- print_info_box($savemsg);
+ print_info_box($savemsg, success);
?>
<div id="container">
<?php
@@ -463,7 +470,7 @@ if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) {
$pconfig['webguicss'] = "pfSense.css";
}
-$section = new Form_Section('Web configurator theme');
+$section = new Form_Section('Web configurator');
$section->addInput(new Form_Select(
'webguicss',
@@ -472,6 +479,13 @@ $section->addInput(new Form_Select(
$csslist
))->setHelp("Choose an alternative css file (if installed) to change the appearance of the Web configurator. css files are located in /usr/local/www/bootstrap/css");
+$section->addInput(new Form_Select(
+ 'webguifixedmenu',
+ 'Menu',
+ $pconfig['webguifixedmenu'],
+ ["" => "Scrolls with page", "fixed" => "Fixed (pinned to top of page)"]
+));
+
$form->add($section);
print $form;
OpenPOWER on IntegriCloud