summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-06-23 12:23:16 +0930
committerChris Buechler <cmb@pfsense.org>2016-06-30 00:20:56 -0500
commit595b074d146b0e6930b9693239fe7e038e11044b (patch)
treed50dba9d68b5f7d592960e6ec4b26eba0a54ef9a /src/usr/local/www/system.php
parenta77ed90de38d98d951ce7a468aa3af0be2ef0c88 (diff)
downloadpfsense-595b074d146b0e6930b9693239fe7e038e11044b.zip
pfsense-595b074d146b0e6930b9693239fe7e038e11044b.tar.gz
Feature #6388 custom GUI preference settings per user
Diffstat (limited to 'src/usr/local/www/system.php')
-rw-r--r--src/usr/local/www/system.php111
1 files changed, 11 insertions, 100 deletions
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index cd40c49..586d186 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -496,108 +496,19 @@ $section->addInput(new Form_Select(
$form->add($section);
-$csslist = array();
-
-// List pfSense files, then any BETA files followed by any user-contributed files
-$cssfiles = glob("/usr/local/www/css/*.css");
-
-if(is_array($cssfiles)) {
- arsort($cssfiles);
- $usrcss = $pfscss = $betacss = array();
-
- foreach ($cssfiles as $css) {
- if (strpos($css, "BETA") != 0) {
- array_push($betacss, $css);
- } else if (strpos($css, "pfSense") != 0) {
- array_push($pfscss, $css);
- } else {
- array_push($usrcss, $css);
- }
- }
-
- $css = array_merge($pfscss, $betacss, $usrcss);
-
- foreach ($css as $file) {
- $file = basename($file);
- $csslist[$file] = pathinfo($file, PATHINFO_FILENAME);
- }
-}
-
-if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) {
- $pconfig['webguicss'] = "pfSense.css";
-}
-
$section = new Form_Section('webConfigurator');
-$section->addInput(new Form_Select(
- 'webguicss',
- 'Theme',
- $pconfig['webguicss'],
- $csslist
-))->setHelp(sprintf(gettext('Choose an alternative css file (if installed) to change the appearance of the webConfigurator. css files are located in /usr/local/www/css/%s'), '<span id="csstxt"></span>'));
-
-$section->addInput(new Form_Select(
- 'webguifixedmenu',
- 'Top Navigation',
- $pconfig['webguifixedmenu'],
- ["" => 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',
- 'number',
- $pconfig['dashboardcolumns'],
- [min => 1, max => 4]
-));
-
-$group = new Form_Group('Associated Panels Show/Hide');
-
-$group->add(new Form_Checkbox(
- 'dashboardavailablewidgetspanel',
- null,
- 'Available Widgets',
- $pconfig['dashboardavailablewidgetspanel']
- ))->setHelp('Show the Available Widgets panel on the Dashboard.');
-
-$group->add(new Form_Checkbox(
- 'systemlogsfilterpanel',
- null,
- 'Log Filter',
- $pconfig['systemlogsfilterpanel']
-))->setHelp('Show the Log Filter panel in System Logs.');
-
-$group->add(new Form_Checkbox(
- 'systemlogsmanagelogpanel',
- null,
- 'Manage Log',
- $pconfig['systemlogsmanagelogpanel']
-))->setHelp('Show the Manage Log panel in System Logs.');
-
-$group->add(new Form_Checkbox(
- 'statusmonitoringsettingspanel',
- null,
- 'Monitoring Settings',
- $pconfig['statusmonitoringsettingspanel']
-))->setHelp('Show the Settings panel in Status Monitoring.');
-
-$group->setHelp('These options allow certain panels to be automatically hidden on page load. A control is provided in the title bar to un-hide the panel.');
-
-$section->add($group);
-
-$section->addInput(new Form_Checkbox(
- 'webguileftcolumnhyper',
- 'Left Column Labels',
- 'Active',
- $pconfig['webguileftcolumnhyper']
-))->setHelp('If selected, clicking a label in the left column will select/toggle the first item of the group.');
+gen_webguicss_field($section, $pconfig['webguicss']);
+gen_webguifixedmenu_field($section, $pconfig['webguifixedmenu']);
+gen_webguihostnamemenu_field($section, $pconfig['webguihostnamemenu']);
+gen_dashboardcolumns_field($section, $pconfig['dashboardcolumns']);
+gen_associatedpanels_fields(
+ $section,
+ $pconfig['dashboardavailablewidgetspanel'],
+ $pconfig['systemlogsfilterpanel'],
+ $pconfig['systemlogsmanagelogpanel'],
+ $pconfig['statusmonitoringsettingspanel']);
+gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
$form->add($section);
OpenPOWER on IntegriCloud