我有一个基本的基于crud的gii。我使用模态引导来查看表单。 我有这样的代码:
if ($request->isGet) {
return [
'title' => "Cancel Incoming : $container",
'content' => $this->renderAjax('_form_cancel_incoming', [
'model' => $model,
'min_urut' => $min_urut,
'max_urut' => $max_urut,
'bundles' => $bundles,
'tanggal_real_masuk' => $tanggal_real_masuk
]),
'footer' => Html::button('Close', ['class' => 'btn btn-default pull-left', 'data-dismiss' => "modal"]) .
Html::submitButton('Cancel', [
'data' =>[
'confirm' => "Apakah Anda Yakin Cancel ?"
],
'class' => 'btn btn-danger',
'title' => 'Cancel',
])
];
} else if ($model->load($request->post())) {
// Can I catch the data-confirm here ?
// If yes, operating the models
return [
'forceReload' => '#crud-datatable-pjax',
'title' => "Your Information",
'content' => "<h3 class='text-success'>Cancel Berhasil</h3>",
'footer' => Html::button('Close', ['class' => 'btn btn-default pull-left', 'data-dismiss' => "modal"])
];
}
我的问题是,数据确认显示,但邮件中的操作仍在工作,而不是数据确认。
请告知。