summaryrefslogtreecommitdiffstats
path: root/usr/local/www/guiconfig.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-30 01:01:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-30 01:01:31 +0000
commitdfdfd0bee7e6b3434e3f98a9feaf547ba919d291 (patch)
treed0d151f42a415a2630fc789dddca74bf736e661f /usr/local/www/guiconfig.inc
parent2690f7d9830834cedb505b8ee0c5c87e3d0b54d9 (diff)
downloadpfsense-dfdfd0bee7e6b3434e3f98a9feaf547ba919d291.zip
pfsense-dfdfd0bee7e6b3434e3f98a9feaf547ba919d291.tar.gz
* Allow themeing of the alertbox.
* To handle the nifty corners edgecase, define: $nifty_redbox = "#990000"; $nifty_blackbox = "#000000"; ... in /usr/local/www/themes/{$themename}/tabcontrols.php
Diffstat (limited to 'usr/local/www/guiconfig.inc')
-rwxr-xr-xusr/local/www/guiconfig.inc65
1 files changed, 41 insertions, 24 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 4ce39b3..7209d9e 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -289,30 +289,47 @@ function verify_gzip_file($fname) {
function print_info_box_np($msg, $name="apply",$value="Apply changes") {
global $g;
- echo "<table height=\"32\" width=\"100%\">\n";
- echo " <tr>\n";
- echo " <td>\n";
- echo " <div style='background-color:#990000' id='redbox'>\n";
- echo " <table width='100%'><tr><td width='8%'>\n";
- echo " &nbsp;&nbsp;&nbsp;<img style='vertical-align:middle' src=\"/themes/".$g['theme']."/images/icons/icon_exclam.gif\" width=\"28\" height=\"32\">\n";
- echo " </td>\n";
- echo " <td width='70%'><font color='white'><b>{$msg}</b></font>\n";
- echo " </td>";
- if(stristr($msg, "apply") == true || stristr($msg, "save") || stristr($msg, "create")) {
- echo " <td>";
- echo " <input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">\n";
- echo " </td>";
- }
- echo " </tr></table>\n";
- echo " </div>\n";
- echo " </td>\n";
- echo "</table>\n";
- echo "<script type=\"text/javascript\">\n";
- echo "NiftyCheck();\n";
- echo "Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");\n";
- echo "Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\");\n";
- echo "</script>\n";
- echo "\n<br>\n";
+
+ if(stristr($msg, "apply") == true || stristr($msg, "save") || stristr($msg, "create"))
+ $savebutton="<td><input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\"></td>";
+
+ $nifty_redbox = "#990000";
+ $nifty_blackbox = "#000000";
+
+ $themename = $g['theme'];
+
+ if(file_exists("/usr/local/www/themes/{$themename}/tabcontrols.php")) {
+ $toeval = file_get_contents("/usr/local/www/themes/{$themename}/tabcontrols.php");
+ eval($toeval);
+ }
+
+ echo <<<EOFnp
+ <table id='infoboxnptable'>
+ <tr>
+ <td>
+ <div style='infoboxnp' id='redbox'>
+ <table id='infoboxnptable2'>
+ <tr>
+ <td id='infoboxnptd'>
+ &nbsp;&nbsp;&nbsp;<img style='infoboxnpimg' src="/themes/{$g['theme']}/images/icons/icon_exclam.gif" >
+ </td>
+ <td id='infoboxnptd2'>
+ <b>{$msg}</b></font>
+ </td>
+ {$savebutton}
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <script type="text/javascript">
+ NiftyCheck();
+ Rounded("div#redbox","all","#FFF","{$nifty_redbox}","smooth");
+ Rounded("td#blackbox","all","#FFF","{$nifty_blackbox}","smooth");
+ </script>
+EOFnp;
+
}
function print_info_box($msg) {
OpenPOWER on IntegriCloud