diff options
author | Vinicius Coque <vcoque@gmail.com> | 2012-03-15 21:19:12 -0300 |
---|---|---|
committer | Vinicius Coque <vcoque@gmail.com> | 2012-03-15 21:19:12 -0300 |
commit | c9eb66f608e7d4a04b6367fb6f22ef7ecb1c643d (patch) | |
tree | 9b6234a8d75be3901cb11de970ad40eddda394c4 | |
parent | 3d594a3fba8a2e781f845d64102d06fb6dc4e0b7 (diff) | |
download | pfsense-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
-rwxr-xr-x | usr/local/www/guiconfig.inc | 8 |
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']) |