Hello,
I’m using GridView do display users in my web app and I’ve redefined the delete action like the following:
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete}',
'buttons' => [
'update' => function ($url, $model) {
return Html::a(
'<span class="glyphicon glyphicon-pencil"></span>',
$url ='index.php?r=user/admin/update&id='.$model->id,
[
'title' => 'Download',
'data-pjax' => '0',
]
);
},
'delete' => function ($url, $model) {
return Html::a(
'<span class="glyphicon glyphicon-trash"></span>',
$url ='index.php?r=user/admin/delete&id='.$model->id,
[
'title' => 'Download',
'data-pjax' => '0',
]
);
},
],
],
],
Everything works fine except that, when I press the delete button, there are no more alert confirmation messages.
Since I can’t find the answer in the official documentation, how can I add an alert confirmation on the delete action?
Thank you
Ale