| | <?php |
| |
|
| | namespace Kanboard\Controller; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | class GroupCreationController extends BaseController |
| | { |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function show(array $values = array(), array $errors = array()) |
| | { |
| | $this->response->html($this->template->render('group_creation/show', array( |
| | 'errors' => $errors, |
| | 'values' => $values, |
| | ))); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | public function save() |
| | { |
| | $values = $this->request->getValues(); |
| | list($valid, $errors) = $this->groupValidator->validateCreation($values); |
| |
|
| | if ($valid) { |
| | if ($this->groupModel->create($values['name']) !== false) { |
| | $this->flash->success(t('Group created successfully.')); |
| | return $this->response->redirect($this->helper->url->to('GroupListController', 'index'), true); |
| | } else { |
| | $this->flash->failure(t('Unable to create your group.')); |
| | } |
| | } |
| |
|
| | return $this->show($values, $errors); |
| | } |
| | } |
| |
|