Revision 3db367fb
Added by Phil Davis about 9 years ago
src/usr/local/www/firewall_aliases.php | ||
---|---|---|
85 | 85 |
|
86 | 86 |
if (stristr($retval, "error") <> true) { |
87 | 87 |
$savemsg = get_std_save_message($retval); |
88 |
$class = "success"; |
|
88 | 89 |
} else { |
89 | 90 |
$savemsg = $retval; |
91 |
$class = "danger"; |
|
90 | 92 |
} |
91 | 93 |
if ($retval == 0) { |
92 | 94 |
clear_subsystem_dirty('aliases'); |
... | ... | |
131 | 133 |
find_alias_reference(array('staticroutes', 'route'), array('network'), $alias_name, $is_alias_referenced, $referenced_by); |
132 | 134 |
if ($is_alias_referenced == true) { |
133 | 135 |
$savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s."), htmlspecialchars($referenced_by)); |
136 |
$class = "danger"; |
|
134 | 137 |
} else { |
135 | 138 |
if (preg_match("/urltable/i", $a_aliases[$_GET['id']]['type'])) { |
136 | 139 |
// this is a URL table type alias, delete its file as well |
... | ... | |
204 | 207 |
include("head.inc"); |
205 | 208 |
|
206 | 209 |
if ($savemsg) { |
207 |
print_info_box($savemsg, 'success');
|
|
210 |
print_info_box($savemsg, $class);
|
|
208 | 211 |
} |
209 | 212 |
|
210 | 213 |
if (is_subsystem_dirty('aliases')) { |
Also available in: Unified diff
Show "cannot delete alias" message as error
If I try to delete an alias that is in use, the "cannot delete alias" message was being displayed as the "success" color.
(cherry picked from commit 04b571e836077c436d109d982be5a8e710ff8aab)