php - CakePHP 3.0 - Post Link - adding classes removes alert confirmation functionality -


when add class array postlink, confirm alert stops working. have moved class array different positions within postlink nothing seems work.

<?= $this->form->postlink(__('delete'), ['controller' => '<%= $details['controller'] %>', 'action' => 'delete', <%= $otherpk %>], ['class' => 'btn btn-danger btn-sm'], ['confirm' => __('are sure want delete # {0}?', <%= $otherpk %>)]) %> 

the above code add right classes link, confirmation doesn't work, deletes entry right away.

the confirm message , other html options class go in same array

<?= $this->form->postlink(__('delete'),     ['controller' => '<%= $details['controller'] %>', 'action' => 'delete', <%= $otherpk %>],     ['class' => 'btn btn-danger btn-sm'],'confirm' => __('are sure want delete # {0}?', <%= $otherpk %>)]) %> 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -