diff options
Diffstat (limited to 'plugins/Calendar/Controller/ConfigController.php')
-rw-r--r-- | plugins/Calendar/Controller/ConfigController.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/Calendar/Controller/ConfigController.php b/plugins/Calendar/Controller/ConfigController.php new file mode 100644 index 00000000..61c67f9d --- /dev/null +++ b/plugins/Calendar/Controller/ConfigController.php @@ -0,0 +1,31 @@ +<?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(); + + 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'))); + } +} |