parent
4463f16f04
commit
b314c074cc
|
@ -123,9 +123,7 @@ class Monitoring_DowntimesController extends Controller
|
|||
$this->translate('Confirm removal of %d downtimes.'),
|
||||
count($this->downtimes)
|
||||
));
|
||||
$delDowntimeForm->setDowntimes($this->downtimes)
|
||||
->setRedirectUrl(Url::fromPath('monitoring/list/downtimes'))
|
||||
->handleRequest();
|
||||
$delDowntimeForm->setDowntimes($this->downtimes)->handleRequest();
|
||||
$this->view->delDowntimeForm = $delDowntimeForm;
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use Icinga\Module\Monitoring\Controller;
|
||||
use Icinga\Module\Monitoring\Backend;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentsCommandForm;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm;
|
||||
use Icinga\Web\Url;
|
||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||
|
@ -295,6 +295,7 @@ class Monitoring_ListController extends Controller
|
|||
|
||||
if ($this->Auth()->hasPermission('monitoring/command/downtime/delete')) {
|
||||
$this->view->delDowntimeForm = new DeleteDowntimeCommandForm();
|
||||
$this->view->delDowntimeForm->handleRequest();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -501,7 +502,8 @@ class Monitoring_ListController extends Controller
|
|||
);
|
||||
|
||||
if ($this->Auth()->hasPermission('monitoring/command/comment/delete')) {
|
||||
$this->view->delCommentForm = new DeleteCommentsCommandForm();
|
||||
$this->view->delCommentForm = new DeleteCommentCommandForm();
|
||||
$this->view->delCommentForm->handleRequest();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,11 +86,9 @@ if (count($comments) === 0) {
|
|||
$delCommentForm->populate(
|
||||
array(
|
||||
'comment_id' => $comment->id,
|
||||
'comment_is_service' => isset($comment->service_description),
|
||||
'redirect' => $this->url
|
||||
'comment_is_service' => isset($comment->service_description)
|
||||
)
|
||||
);
|
||||
$delCommentForm->setAction($this->url('monitoring/comment/remove', array('comment_id' => $comment->id)));
|
||||
echo $delCommentForm;
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -131,10 +131,9 @@ if (count($downtimes) === 0) {
|
|||
$delDowntimeForm->populate(
|
||||
array(
|
||||
'downtime_id' => $downtime->id,
|
||||
'redirect' => $this->url
|
||||
'downtime_is_service' => isset($downtime->service_description)
|
||||
)
|
||||
);
|
||||
$delDowntimeForm->setAction($this->url('monitoring/downtime/remove', array('downtime_id' => $downtime->id)));
|
||||
echo $delDowntimeForm;
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -48,7 +48,12 @@ foreach ($object->comments as $comment) {
|
|||
<td data-base-target="_self">
|
||||
<?php if (isset($delCommentForm)) { // Form is unset if the current user lacks the respective permission
|
||||
$delCommentForm = clone $delCommentForm;
|
||||
$delCommentForm->populate(array('comment_id' => $comment->id));
|
||||
$delCommentForm->populate(
|
||||
array(
|
||||
'comment_id' => $comment->id,
|
||||
'comment_is_service' => isset($comment->service_description)
|
||||
)
|
||||
);
|
||||
echo $delCommentForm;
|
||||
} ?>
|
||||
<span class="sr-only">(<?= $this->translate('Comment'); ?>): </span><?= str_replace(array('\r\n', '\n'), '<br>', $commentText); ?>
|
||||
|
|
Loading…
Reference in New Issue