summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-04-21 16:57:47 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-04-21 16:58:13 -0400
commit7bb301eb4d99c13784d6753ad3b39b651655b40f (patch)
tree1879c8430d7b03838e8c9d14ed7df47e2092ea2a /src
parent15333972e7916918be46c3d7c4e8ded240ac773a (diff)
downloadpfsense-7bb301eb4d99c13784d6753ad3b39b651655b40f.zip
pfsense-7bb301eb4d99c13784d6753ad3b39b651655b40f.tar.gz
WArn user on selecting non pfSense theme/css
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/foot.inc1
-rw-r--r--src/usr/local/www/system.php27
2 files changed, 26 insertions, 2 deletions
diff --git a/src/usr/local/www/foot.inc b/src/usr/local/www/foot.inc
index e9b4ebe..c46f6b0 100644
--- a/src/usr/local/www/foot.inc
+++ b/src/usr/local/www/foot.inc
@@ -5,7 +5,6 @@
*/
?>
</div>
-
<footer class="footer">
<div class="container">
<p class="text-muted">
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index c7dd164..da791dc 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -509,7 +509,7 @@ $section->addInput(new Form_Select(
'Theme',
$pconfig['webguicss'],
$csslist
-))->setHelp('Choose an alternative css file (if installed) to change the appearance of the webConfigurator. css files are located in /usr/local/www/css/');
+))->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',
@@ -570,8 +570,33 @@ $section->addInput(new Form_Checkbox(
$form->add($section);
print $form;
+
+$csswarning = sprintf(gettext("%sUser-created themes are unsupported, use at your own risk."), "<br />");
+
?>
</div>
+
+<script>
+//<![CDATA[
+events.push(function() {
+
+ function setThemeWarning() {
+ if ($('#webguicss').val().startsWith("pfSense")) {
+ $('#csstxt').html("").addClass("text-default");
+ } else {
+ $('#csstxt').html("<?=$csswarning?>").addClass("text-danger");
+ }
+ }
+
+ $('#webguicss').change(function() {
+ setThemeWarning();
+ });
+
+ setThemeWarning();
+});
+//]]>
+</script>
+
<?php
include("foot.inc");
?>
OpenPOWER on IntegriCloud