diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-04-21 16:57:47 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-04-21 16:59:05 -0400 |
commit | ee7c0a0098fc585634f0e60d48ef89eba26f06d5 (patch) | |
tree | 4b69d7e93aa49e047b3523969015393d2a48bf42 /src | |
parent | 006cc4ca3ffa2e11f8a1a53b7b852ed0ccbdeb3d (diff) | |
download | pfsense-ee7c0a0098fc585634f0e60d48ef89eba26f06d5.zip pfsense-ee7c0a0098fc585634f0e60d48ef89eba26f06d5.tar.gz |
WArn user on selecting non pfSense theme/css
(cherry picked from commit 7bb301eb4d99c13784d6753ad3b39b651655b40f)
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/foot.inc | 1 | ||||
-rw-r--r-- | src/usr/local/www/system.php | 27 |
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"); ?> |