summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorVinicius Coque <vcoque@gmail.com>2012-03-15 21:19:12 -0300
committerVinicius Coque <vcoque@gmail.com>2012-03-15 21:19:12 -0300
commitc9eb66f608e7d4a04b6367fb6f22ef7ecb1c643d (patch)
tree9b6234a8d75be3901cb11de970ad40eddda394c4 /usr
parent3d594a3fba8a2e781f845d64102d06fb6dc4e0b7 (diff)
downloadpfsense-c9eb66f608e7d4a04b6367fb6f22ef7ecb1c643d.zip
pfsense-c9eb66f608e7d4a04b6367fb6f22ef7ecb1c643d.tar.gz
Fix a logical bug on gettext
The parameter showapply determines when the apply button should be displayed Ticket #1686
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/guiconfig.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index cbdcb9a..06d9c5b 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -294,14 +294,18 @@ function verify_gzip_file($fname) {
return 1;
}
-function print_info_box_np($msg, $name="apply",$value="Apply changes") {
+function print_info_box_np($msg, $name="apply",$value="", $showapply=false) {
global $g, $nifty_redbox, $nifty_blackbox, $nifty_background;
+ if(empty($value)) {
+ $value = gettext("Apply changes");
+ }
+
// Set the Nifty background color if one is not set already (defaults to white)
if($nifty_background == "")
$nifty_background = "#FFF";
- if(stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false) {
+ if(stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) {
$savebutton = "<td class='infoboxsave'>";
$savebutton .= "<input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">";
if($_POST['if'])
OpenPOWER on IntegriCloud