mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
Fix delete comments and downtimes button
Fix faulty target names and add additional error checking in case the target DOM Element is not present. fixes #9330
This commit is contained in:
parent
9e40f5f2c7
commit
41d68f6a74
@ -67,7 +67,7 @@
|
|||||||
) : $this->translate('This comment does not expire.'); ?>
|
) : $this->translate('This comment does not expire.'); ?>
|
||||||
</td>
|
</td>
|
||||||
<?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?>
|
<?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?>
|
||||||
<td style="width: 2em" data-base-target="self">
|
<td style="width: 2em" data-base-target="_self">
|
||||||
<?php
|
<?php
|
||||||
$delCommentForm = clone $delCommentForm;
|
$delCommentForm = clone $delCommentForm;
|
||||||
$delCommentForm->populate(
|
$delCommentForm->populate(
|
||||||
|
@ -126,7 +126,7 @@ if (! $this->compact): ?>
|
|||||||
</small>
|
</small>
|
||||||
</td>
|
</td>
|
||||||
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
|
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
|
||||||
<td style="width: 2em" data-base-target="self">
|
<td style="width: 2em" data-base-target="_self">
|
||||||
<?php
|
<?php
|
||||||
$delDowntimeForm = clone $delDowntimeForm;
|
$delDowntimeForm = clone $delDowntimeForm;
|
||||||
$delDowntimeForm->populate(
|
$delDowntimeForm->populate(
|
||||||
|
@ -509,6 +509,9 @@
|
|||||||
self.icinga.ui.layout1col();
|
self.icinga.ui.layout1col();
|
||||||
} else {
|
} else {
|
||||||
$target = $('#' + targetId);
|
$target = $('#' + targetId);
|
||||||
|
if (! $target.length) {
|
||||||
|
self.icinga.logger.warn('Link target "#' + targetId + '" does not exist in DOM.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user