// Add a buton to erase all log
This commit is contained in:
@@ -64,10 +64,20 @@ class AdminLogsControllerCore extends AdminController
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'employee e ON (a.id_employee = e.id_employee)';
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function processDelete()
|
||||
{
|
||||
return Logger::eraseAllLogs();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
parent::initToolbar();
|
||||
$this->toolbar_btn['delete'] = array(
|
||||
'short' => 'Erase',
|
||||
'desc' => $this->l('Erase all'),
|
||||
'js' => 'if (confirm(\''.$this->l('Are you sure?').'\')) document.location = \''.$this->context->link->getAdminLink('AdminLogs').'&token='.$this->token.'&deletelog=1\';'
|
||||
);
|
||||
unset($this->toolbar_btn['new']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user