summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-11-17 13:45:42 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-11-17 13:46:04 -0500
commita5995a8e6e8c4d6077d752c7d39bf12f5c11228d (patch)
tree99a447234d80a60e39d3be207cc73d77179063b6 /src/usr
parent52efc840044a23bdae3f54de95b2d25cf567eb66 (diff)
downloadpfsense-a5995a8e6e8c4d6077d752c7d39bf12f5c11228d.zip
pfsense-a5995a8e6e8c4d6077d752c7d39bf12f5c11228d.tar.gz
Moved theme back to system.php
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/system.php27
-rw-r--r--src/usr/local/www/system_advanced_admin.php23
2 files changed, 27 insertions, 23 deletions
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index dd10ba5..1f83b4a 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -89,6 +89,7 @@ $pconfig['timezone'] = $config['system']['timezone'];
$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
$pconfig['timeservers'] = $config['system']['timeservers'];
$pconfig['language'] = $config['system']['language'];
+$pconfig['webguicss'] = $config['system']['webgui']['webguicss'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
@@ -141,6 +142,12 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
+ if ($_POST['webguicss']) {
+ $config['system']['webgui']['webguicss'] = $_POST['webguicss'];
+ } else {
+ unset($config['system']['webgui']['webguicss']);
+ }
+
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 '-'.");
@@ -451,6 +458,26 @@ $section->addInput(new Form_Select(
$form->add($section);
+$csslist = array();
+$css = glob("bootstrap/css/*.css");
+foreach ($css as $file) {
+ $file = basename($file);
+ if(substr($file, 0, 9) !== 'bootstrap') {
+ $csslist[$file] = pathinfo($file, PATHINFO_FILENAME);
+ }
+}
+
+$section = new Form_Section('Web configurator theme');
+
+$section->addInput(new Form_Select(
+ 'webguicss',
+ 'Theme',
+ $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);
+
print $form;
include("foot.inc");
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php
index acedfcf..8f69a54 100644
--- a/src/usr/local/www/system_advanced_admin.php
+++ b/src/usr/local/www/system_advanced_admin.php
@@ -74,7 +74,6 @@ 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'];
@@ -164,12 +163,6 @@ if ($_POST) {
$restart_webgui = true;
}
- if ($_POST['webguicss']) {
- $config['system']['webgui']['webguicss'] = $_POST['webguicss'];
- } else {
- unset($config['system']['webgui']['webguicss']);
- }
-
// Restart the webgui only if this actually changed
if ($_POST['webgui-redirect'] == "yes") {
if ($config['system']['webgui']['disablehttpredirect'] != true) {
@@ -488,22 +481,6 @@ $section->addInput(new Form_Checkbox(
'by the current page. Check this box to display the current page followed by the '.
'host name.');
-$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',
- $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');
OpenPOWER on IntegriCloud