Add email notifications
This commit is contained in:
@@ -20,7 +20,8 @@ class Config extends Base
|
||||
$this->response->html($this->template->layout('config_index', array(
|
||||
'db_size' => $this->config->getDatabaseSize(),
|
||||
'user' => $_SESSION['user'],
|
||||
'projects' => $this->project->getList(),
|
||||
'user_projects' => $this->project->getAvailableList($this->acl->getUserId()),
|
||||
'notifications' => $this->notification->readSettings($this->acl->getUserId()),
|
||||
'languages' => $this->config->getLanguages(),
|
||||
'values' => $this->config->getAll(),
|
||||
'errors' => array(),
|
||||
@@ -32,6 +33,13 @@ class Config extends Base
|
||||
)));
|
||||
}
|
||||
|
||||
public function notifications()
|
||||
{
|
||||
$values = $this->request->getValues();
|
||||
$this->notification->saveSettings($this->acl->getUserId(), $values);
|
||||
$this->response->redirect('?controller=config#notifications');
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and save settings
|
||||
*
|
||||
@@ -57,7 +65,8 @@ class Config extends Base
|
||||
$this->response->html($this->template->layout('config_index', array(
|
||||
'db_size' => $this->config->getDatabaseSize(),
|
||||
'user' => $_SESSION['user'],
|
||||
'projects' => $this->project->getList(),
|
||||
'user_projects' => $this->project->getAvailableList($this->acl->getUserId()),
|
||||
'notifications' => $this->notification->readSettings($this->acl->getUserId()),
|
||||
'languages' => $this->config->getLanguages(),
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
|
||||
Reference in New Issue
Block a user