Project

General

Profile

« Previous | Next » 

Revision c8532336

Added by Phil Davis over 9 years ago

print_info_box success

In most situations we want the print_info_box() of $savemsg to be
'success'. If there was some problem saving, then it can be 'warning'.
These are a few places I have found so far that need this sort of fixing
up - more to come but sleep calls just now!
I made the change to index.php also to be consistent with the others,
even though it does not actually change anything "for real" because
'warning' is the default anyway. It will make it easy for people in
future to see that is the case, specially if they are adding other
$savemsg things that need to be 'success'.

View differences:

src/usr/local/www/index.php
108 108

  
109 109
		if ($x > 0) {
110 110
			$savemsg = "{$g['product_name']} has detected a crash report or programming bug.  Click <a href='crash_reporter.php'>here</a> for more information.";
111
			$class = "warning";
111 112
		}
112 113
	}
113 114
}
......
304 305
include("head.inc");
305 306

  
306 307
if ($savemsg) {
307
	print_info_box($savemsg);
308
	print_info_box($savemsg, $class);
308 309
}
309 310

  
310 311
pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
src/usr/local/www/interfaces_assign.php
274 274
		write_config();
275 275

  
276 276
		$savemsg = gettext("Interface has been added.");
277
		$class = "success";
277 278
	}
278 279

  
279 280
} else if (isset($_POST['apply'])) {
......
284 285
		write_config();
285 286

  
286 287
		$retval = filter_configure();
287
		$savemsg = get_std_save_message($retval);
288 288

  
289 289
		if (stristr($retval, "error") <> true) {
290 290
			$savemsg = get_std_save_message($retval);
291
			$class = "success";
291 292
		} else {
292 293
			$savemsg = $retval;
294
			$class = "danger";
293 295
		}
294 296
	}
295 297

  
......
461 463
			link_interface_to_vlans($realid, "update");
462 464

  
463 465
			$savemsg = gettext("Interface has been deleted.");
466
			$class = "success";
464 467
		}
465 468
	}
466 469
}
......
486 489
	if ($_POST) {
487 490
		if ($rebootingnow) {
488 491
			$savemsg = gettext("The system is now rebooting.  Please wait.");
492
			$class = "success";
489 493
		} else {
490 494
			$savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
495
			$class = "warning";
491 496
		}
492 497
	} else {
493 498
		$savemsg = gettext("Interface mismatch detected.  Please resolve the mismatch and click 'Apply changes'.  The firewall will reboot afterwards.");
499
		$class = "warning";
494 500
	}
495 501
}
496 502

  
......
499 505
	print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));
500 506
	echo "<br /></p>\n";
501 507
} elseif ($savemsg) {
502
	print_info_box($savemsg);
508
	print_info_box($savemsg, $class);
503 509
}
504 510

  
505 511
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
src/usr/local/www/load_balancer_virtual_server.php
128 128
}
129 129

  
130 130
if ($savemsg) {
131
	print_info_box($savemsg);
131
	print_info_box($savemsg, 'success');
132 132
}
133 133

  
134 134
if (is_subsystem_dirty('loadbalancer')) {
src/usr/local/www/status_logs_filter_dynamic.php
116 116
include("head.inc");
117 117

  
118 118
if (!$input_errors && $savemsg) {
119
	print_info_box($savemsg);
119
	print_info_box($savemsg, 'success');
120 120
	$manage_log_active = false;
121 121
}
122 122

  
src/usr/local/www/status_logs_filter_summary.php
102 102
include("head.inc");
103 103

  
104 104
if (!$input_errors && $savemsg) {
105
	print_info_box($savemsg);
105
	print_info_box($savemsg, 'success');
106 106
	$manage_log_active = false;
107 107
}
108 108

  

Also available in: Unified diff