diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-12 16:30:10 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-12 16:30:10 -0500 |
commit | 60571782bafad282cf7209670b031c368556c634 (patch) | |
tree | b4dd8cc9000d41274d1644155de45ffca71213c4 /src/usr/local/www/system_advanced_admin.php | |
parent | 153e3ac201ed2794856267315ddbc121ec3603f9 (diff) | |
download | pfsense-60571782bafad282cf7209670b031c368556c634.zip pfsense-60571782bafad282cf7209670b031c368556c634.tar.gz |
Allow the webgui style sheet to be selected from the advanced admin page
Diffstat (limited to 'src/usr/local/www/system_advanced_admin.php')
-rw-r--r-- | src/usr/local/www/system_advanced_admin.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php index d4b0b62..5f3c105 100644 --- a/src/usr/local/www/system_advanced_admin.php +++ b/src/usr/local/www/system_advanced_admin.php @@ -74,6 +74,7 @@ require_once("filter.inc"); require_once("shaper.inc"); $pconfig['webguiproto'] = $config['system']['webgui']['protocol']; +$pconfig['webguicss'] = $config['system']['webgui']['webguicss']; $pconfig['webguiport'] = $config['system']['webgui']['port']; $pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2; $pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref']; @@ -160,6 +161,12 @@ if ($_POST) { $restart_webgui = true; } + if ($_POST['webguicss']) { + $config['system']['webgui']['webguicss'] = $_POST['webguicss']; + } else { + unset($config['system']['primaryconsole']); + } + if ($_POST['webgui-redirect'] == "yes") { $config['system']['webgui']['disablehttpredirect'] = true; $restart_webgui = true; @@ -470,16 +477,21 @@ $section->addInput(new Form_Checkbox( 'by the current page. Check this box to display the current page followed by the '. 'host name.'); -$csslist = glob("/Bootstrap/css/*.css"); -unset($csslist['bootstrap.min.css']; -$csslist = array_combine($csslist, $csslist); +$csslist = array(); +$css = glob("bootstrap/css/*.css"); +foreach ($css as $file) { + $file = basename($file); + if(substr($file, 0, 9) !== 'bootstrap') { + $csslist[$file] = $file; + } +} $section->addInput(new Form_Select( 'webguicss', 'Web configurator style sheet', - $csslist, - $pconfig['webguicss'] -)); + $pconfig['webguicss'], + $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"); $form->add($section); $section = new Form_Section('Secure Shell'); |