diff --git a/templates/element/view/related/has_many.php b/templates/element/view/related/has_many.php index 2507695..3551650 100644 --- a/templates/element/view/related/has_many.php +++ b/templates/element/view/related/has_many.php @@ -55,7 +55,15 @@ Html->link(__d('crud', 'View'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'view', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?> Html->link(__d('crud', 'Edit'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'edit', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?> - Html->link(__d('crud', 'Delete'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'delete', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?> + Form->postLink( + __d('crud', 'Delete'), + ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'delete', ${$otherSingularVar}[$details['primaryKey']]], + [ + 'class' => 'btn btn-danger btn-delete', + 'confirm' => __d('crud', 'Are you sure you want to delete this record?'), + 'name' => '_delete', + ] + ); ?>