Commit 3f04c0a7 authored by Manuel Faux's avatar Manuel Faux Committed by Franco Fichtner

Firewall: schedule column: added tooltip and bugfix

Added tooltip to show description of schedule and fixed editing capabilities of
schedules from page firewall_rules.php.
parent 1206b9b7
......@@ -548,9 +548,27 @@ $( document ).ready(function() {
</td>
<td class="hidden-xs hidden-sm">
<?php
if (!empty($filterent['sched'])):?>
<?=htmlspecialchars($filterent['sched']);?>
<a href="/firewall_schedule_edit.php?name=<?=htmlspecialchars($filterent['sched']);?>"> <span class="glyphicon glyphicon-calendar"> </span> </a>
if (!empty($filterent['sched'])):?>
<?php
$schedule_descr = "";
if (isset($config['schedules']['schedule']))
{
foreach ($config['schedules']['schedule'] as $schedule)
{
if ($schedule['name'] == $filterent['sched'])
{
$schedule_descr = (isset($schedule['descr'])) ? $schedule['descr'] : "";
}
}
}
?>
<span title="<?=htmlspecialchars($schedule_descr);?>" data-toggle="tooltip">
<?=htmlspecialchars($filterent['sched']);?>&nbsp;
</span>
<a href="/firewall_schedule_edit.php?name=<?=htmlspecialchars($filterent['sched']);?>"
title="<?=gettext("edit schedule");?>" data-toggle="tooltip">
<i class="glyphicon glyphicon-calendar"></i>
</a>
<?php
endif;?>
</td>
......
......@@ -91,6 +91,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
foreach ($a_schedules as $i => $sched) {
if ($sched['name'] == $_GET['name']) {
$id = $i;
$configId = $id;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment