From dfdfd0bee7e6b3434e3f98a9feaf547ba919d291 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 30 Oct 2008 01:01:31 +0000 Subject: [PATCH] * 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 --- usr/local/www/guiconfig.inc | 63 ++++++++++++------- usr/local/www/themes/metallic/all.css | 29 +++++++++ usr/local/www/themes/nervecenter/all.css | 29 +++++++++ usr/local/www/themes/pfsense-dropdown/all.css | 29 +++++++++ usr/local/www/themes/pfsense/all.css | 29 +++++++++ usr/local/www/themes/the_wall/all.css | 29 +++++++++ 6 files changed, 185 insertions(+), 23 deletions(-) diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 4ce39b3ce6..7209d9e8f8 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 "\n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " "; - if(stristr($msg, "apply") == true || stristr($msg, "save") || stristr($msg, "create")) { - echo " "; + + if(stristr($msg, "apply") == true || stristr($msg, "save") || stristr($msg, "create")) + $savebutton=""; + + $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 "
\n"; - echo "    \n"; - echo " {$msg}\n"; - echo " "; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n
\n"; + + echo << + + +
+ + + + + {$savebutton} + +
+     + + {$msg} +
+
+ + + + +EOFnp; + } function print_info_box($msg) { diff --git a/usr/local/www/themes/metallic/all.css b/usr/local/www/themes/metallic/all.css index 6c943f6b03..2299838c9a 100644 --- a/usr/local/www/themes/metallic/all.css +++ b/usr/local/www/themes/metallic/all.css @@ -4,6 +4,35 @@ html, body, td, th, input, select { font-size: 0.9em; } +.infoboxnptd2 { + width:70%; + font-color:white; +} + +.infoboxnptd { + width:8%; +} + +.infoboxnptable { + height:32px; + width:100%; +} + +.infoboxnptable2 { + height:32px; + width:100%; +} + +.infoboxnp { + background-color:#990000; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; +} + .inputerrorsleft { background-color: #990000; width: 36px; diff --git a/usr/local/www/themes/nervecenter/all.css b/usr/local/www/themes/nervecenter/all.css index 03bbbde748..1a09241a17 100644 --- a/usr/local/www/themes/nervecenter/all.css +++ b/usr/local/www/themes/nervecenter/all.css @@ -5,6 +5,35 @@ html, body, td, th, input, select { } +.infoboxnptd2 { + width:70%; + font-color:white; +} + +.infoboxnptd { + width:8%; +} + +.infoboxnptable { + height:32px; + width:100%; +} + +.infoboxnptable2 { + height:32px; + width:100%; +} + +.infoboxnp { + background-color:#990000; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; +} + .inputerrorsleft { background-color: #990000; width: 36px; diff --git a/usr/local/www/themes/pfsense-dropdown/all.css b/usr/local/www/themes/pfsense-dropdown/all.css index 0af7a3a002..1692d503bb 100644 --- a/usr/local/www/themes/pfsense-dropdown/all.css +++ b/usr/local/www/themes/pfsense-dropdown/all.css @@ -4,6 +4,35 @@ html, body, td, th, input, select { font-size: 0.9em; } +.infoboxnptd2 { + width:70%; + font-color:white; +} + +.infoboxnptd { + width:8%; +} + +.infoboxnptable { + height:32px; + width:100%; +} + +.infoboxnptable2 { + height:32px; + width:100%; +} + +.infoboxnp { + background-color:#990000; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; +} + .inputerrorsleft { background-color: #990000; width: 36px; diff --git a/usr/local/www/themes/pfsense/all.css b/usr/local/www/themes/pfsense/all.css index 13aa29e788..7f2b055838 100644 --- a/usr/local/www/themes/pfsense/all.css +++ b/usr/local/www/themes/pfsense/all.css @@ -4,6 +4,35 @@ html, body, td, th, input, select { font-size: 0.9em; } +.infoboxnptd2 { + width:70%; + font-color:white; +} + +.infoboxnptd { + width:8%; +} + +.infoboxnptable { + height:32px; + width:100%; +} + +.infoboxnptable2 { + height:32px; + width:100%; +} + +.infoboxnp { + background-color:#990000; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; +} + .inputerrorsleft { background-color: #990000; width: 36px; diff --git a/usr/local/www/themes/the_wall/all.css b/usr/local/www/themes/the_wall/all.css index 8653aae75d..0c514c1960 100644 --- a/usr/local/www/themes/the_wall/all.css +++ b/usr/local/www/themes/the_wall/all.css @@ -5,6 +5,35 @@ html, body, td, th, input, select { } +.infoboxnptd2 { + width:70%; + font-color:white; +} + +.infoboxnptd { + width:8%; +} + +.infoboxnptable { + height:32px; + width:100%; +} + +.infoboxnptable2 { + height:32px; + width:100%; +} + +.infoboxnp { + background-color:#990000; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; +} + .inputerrorsleft { background-color: #990000; width: 36px;