diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-22 12:28:38 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-22 12:28:38 +0545 |
commit | b373f471a8a4d92d5df0f708f069c612dfc9645a (patch) | |
tree | 77489c274b50fa3db70df1158bf628d5a4152c06 | |
parent | c40fbe6d09c15c367fd900ff20e88b4dedb6bd4e (diff) | |
download | pfsense-b373f471a8a4d92d5df0f708f069c612dfc9645a.zip pfsense-b373f471a8a4d92d5df0f708f069c612dfc9645a.tar.gz |
Be more flexible on detecting the need for the Apply button
This is the quick fix part (1) for https://redmine.pfsense.org/issues/5794
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index b94018b..643d410 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -314,7 +314,10 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl $msg = '<div class="pull-left">' . $msg . '</div>'; - if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) { + // The $msg string might or might not have had a known translation into the target language. + // So check it against the keywords "apply", "save and "create" in both the target language and English. + if ((stristr($msg, gettext("apply")) != false) || (stristr($msg, gettext("save")) != false) || (stristr($msg, gettext("create")) != false) || + (stristr($msg, "apply") != false) || (stristr($msg, "save") != false) || (stristr($msg, "create") != false) || $showapply) { $msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="' . $value . '">' . $name . '</button>'; if ($_POST['if']) { |