mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
make Schedule icon reflect current schedule state
On firewall_rules.php, there is no indication whether a schedule-based rule is active. This change to the schedule icon applies the same styles that are applied to a disabled/enabled Pass rule icon (text-muted and text-success). The break added to the foreach loop is needed to retain reference to the attached schedule for the filter_get_time_based_rule_status() call
This commit is contained in:
parent
26615835f3
commit
c1c5ef115e
@ -652,6 +652,7 @@ $( document ).ready(function() {
|
||||
if ($schedule['name'] == $filterent['sched'])
|
||||
{
|
||||
$schedule_descr = (isset($schedule['descr'])) ? $schedule['descr'] : "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -661,7 +662,14 @@ $( document ).ready(function() {
|
||||
</span>
|
||||
<a href="/firewall_schedule_edit.php?name=<?=htmlspecialchars($filterent['sched']);?>"
|
||||
title="<?= html_safe(gettext('Edit')) ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<?php
|
||||
if (filter_get_time_based_rule_status($schedule)):?>
|
||||
<i class="fa fa-calendar text-success"></i>
|
||||
<?php
|
||||
else:?>
|
||||
<i class="fa fa-calendar text-muted"></i>
|
||||
<?php
|
||||
endif;?>
|
||||
</a>
|
||||
<?php
|
||||
endif;?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user