Project

General

Profile

« Previous | Next » 

Revision b373f471

Added by Phil Davis over 9 years ago

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

View differences:

src/usr/local/www/guiconfig.inc
314 314

  
315 315
	$msg = '<div class="pull-left">' . $msg . '</div>';
316 316

  
317
	if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) {
317
	// The $msg string might or might not have had a known translation into the target language.
318
	// So check it against the keywords "apply", "save and "create" in both the target language and English.
319
	if ((stristr($msg, gettext("apply")) != false) || (stristr($msg, gettext("save")) != false) || (stristr($msg, gettext("create")) != false) || 
320
	    (stristr($msg, "apply") != false) || (stristr($msg, "save") != false) || (stristr($msg, "create") != false) || $showapply) {
318 321
		$msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="' . $value . '">' . $name . '</button>';
319 322

  
320 323
		if ($_POST['if']) {

Also available in: Unified diff