First commit
This commit is contained in:
32
Controller/ConfigController.php
Normal file
32
Controller/ConfigController.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Plugin\Calendar\Controller;
|
||||
|
||||
/**
|
||||
* Class ConfigController
|
||||
*
|
||||
* @package Kanboard\Plugin\Calendar\Controller
|
||||
*/
|
||||
class ConfigController extends \Kanboard\Controller\ConfigController
|
||||
{
|
||||
public function show()
|
||||
{
|
||||
$this->response->html($this->helper->layout->config('Calendar:config/calendar', array(
|
||||
'title' => t('Settings').' > '.t('Calendar settings'),
|
||||
)));
|
||||
}
|
||||
|
||||
public function save()
|
||||
{
|
||||
$values = $this->request->getValues();
|
||||
$values += array('calendar_user_subtasks_time_tracking' => 0);
|
||||
|
||||
if ($this->configModel->save($values)) {
|
||||
$this->flash->success(t('Settings saved successfully.'));
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to save your settings.'));
|
||||
}
|
||||
|
||||
$this->response->redirect($this->helper->url->to('ConfigController', 'show', array('plugin' => 'Calendar')));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user