fix: [UI] Add missing onclick prevent default

pull/8246/head
Jakub Onderka 2022-03-28 12:05:45 +02:00
parent 9140ece0d1
commit f636c4e94d
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@
?>
<a href="<?php echo $baseurl."/events/edit/".$eventId ?>" title="<?php echo __('Edit');?>" aria-label="<?php echo __('Edit');?>"><i class="black fa fa-edit"></i></a>
<?php
echo sprintf('<a class="useCursorPointer fa fa-trash" title="%s" aria-label="%s" onclick="deleteEventPopup(%s)"></a>', __('Delete'), __('Delete'), $eventId);
echo sprintf('<a class="useCursorPointer fa fa-trash" title="%s" aria-label="%s" onclick="event.preventDefault();deleteEventPopup(%s)"></a>', __('Delete'), __('Delete'), $eventId);
endif;
?>
<a href="<?php echo $baseurl."/events/view/".$eventId ?>" title="<?php echo __('View');?>" aria-label="<?php echo __('View');?>"><i class="fa black fa-eye"></i></a>

View File

@ -44,7 +44,7 @@ if (!empty($onClick)) {
$params .= "'" . h($param) . "'";
}
}
$a .= sprintf(' onclick="%s(%s)"', $onClick['function'], $params);
$a .= sprintf(' onclick="event.preventDefault();%s(%s)"', $onClick['function'], $params);
}
if (!empty($download)) {
$a .= ' download="' . h($download) . '"';