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
...@@ -549,8 +549,26 @@ $( document ).ready(function() { ...@@ -549,8 +549,26 @@ $( document ).ready(function() {
<td class="hidden-xs hidden-sm"> <td class="hidden-xs hidden-sm">
<?php <?php
if (!empty($filterent['sched'])):?> if (!empty($filterent['sched'])):?>
<?=htmlspecialchars($filterent['sched']);?> <?php
<a href="/firewall_schedule_edit.php?name=<?=htmlspecialchars($filterent['sched']);?>"> <span class="glyphicon glyphicon-calendar"> </span> </a> $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 <?php
endif;?> endif;?>
</td> </td>
......
...@@ -91,6 +91,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -91,6 +91,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
foreach ($a_schedules as $i => $sched) { foreach ($a_schedules as $i => $sched) {
if ($sched['name'] == $_GET['name']) { if ($sched['name'] == $_GET['name']) {
$id = $i; $id = $i;
$configId = $id;
break; 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