summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-07-14 17:36:26 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-07-14 17:36:26 -0400
commitf31489e5b67f1f0620ed839dc393f7954ffe7840 (patch)
treea8bfdbf5d44d19b8c175894102f1ba81c9512dd6
parent067e48abda86617e4629e59f62e43b6fa3c99cc9 (diff)
downloadpfsense-f31489e5b67f1f0620ed839dc393f7954ffe7840.zip
pfsense-f31489e5b67f1f0620ed839dc393f7954ffe7840.tar.gz
Allow overriding the Nifty corners background color
-rw-r--r--etc/inc/authgui.inc10
-rwxr-xr-xusr/local/www/guiconfig.inc12
2 files changed, 15 insertions, 7 deletions
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 56e6f4c..b78a6ca 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -221,8 +221,12 @@ if($config['virtualip'])
</head>
<body onload="page_load()">
<div id="login">
- <?php if(is_ipaddr($http_host) && !$local_ip)
- print_info_box(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. <br/><br/>If you did not setup this forwarding, you may be the target of a man-in-the-middle attack.")); ?>
+ <?php
+ if(is_ipaddr($http_host) && !$local_ip) {
+ $nifty_background = "#999";
+ print_info_box(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. <br/><br/>If you did not setup this forwarding, you may be the target of a man-in-the-middle attack."));
+ }
+ ?>
<form id="iform" name="login_iform" method="post" autocomplete="off" action="<?=$_SERVER['SCRIPT_NAME'];?>">
<h1></h1>
<div id="inputerrors"><?=$_SESSION['Login_Error'];?></div>
@@ -257,4 +261,4 @@ if($config['virtualip'])
<?php
} // end function
-?>
+?> \ No newline at end of file
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index e27b78b..8680c97 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -278,8 +278,12 @@ function verify_gzip_file($fname) {
}
function print_info_box_np($msg, $name="apply",$value="Apply changes") {
- global $g;
-
+ global $g, $nifty_redbox, $nifty_blackbox, $nifty_background;
+
+ // Set the Nifty background color if one is not set already (defaults to white)
+ if(!$nifty_background)
+ $nifty_background = "#FFF";
+
if(stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) {
$savebutton = "<td class='infoboxsave'>";
$savebutton .= "<input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">";
@@ -331,8 +335,8 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") {
</table>
<script type="text/javascript">
NiftyCheck();
- Rounded("div#redbox","all","#FFF","{$nifty_redbox}","smooth");
- Rounded("td#blackbox","all","#FFF","{$nifty_blackbox}","smooth");
+ Rounded("div#redbox","all","#{$nifty_background}","{$nifty_redbox}","smooth");
+ Rounded("td#blackbox","all","#{$nifty_background}","{$nifty_blackbox}","smooth");
</script>
EOFnp;
OpenPOWER on IntegriCloud