⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Theme Bootstrap - delete error message is not shown



mbanolas2

mbanolas2
  • profile picture
  • Member

Posted 13 July 2016 - 10:47 AM

I would like to show a message error when deletion fails.

For that I use a callback_before_deletion to provoke the fail returning false and use my own 'delete_error_message'.

 

The deletion is not produced (fails) but it is not showed any message. 

If I change the theme to 'datatables' or 'flexigrid' it works according expected.

 

This is the code:

 

        $crud = new grocery_CRUD();
                        
        $crud->unset_bootstrap();
        $crud->unset_jquery();
        $crud->set_theme('bootstrap');
        
        $crud->set_table('pe_productos'); 
        $crud->set_lang_string('delete_error_message', 'My Own Error Message!');
        $crud->callback_before_delete(array($this,'_producto_before_delete'));
 
        
        $output = $crud->render();
        $this->_outputProductos($output,'Productos');
 
 
public function _producto_before_delete()
{
           return false;
}
Thanks for you support.