From 3833c12ccce59bcc49c4cfa892401973558f604d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 2 Jan 2017 17:01:27 -0500 Subject: Refactoring/rewrite of modal boxes handling --- app/Controller/TaskGanttCreationController.php | 64 -------------------------- 1 file changed, 64 deletions(-) delete mode 100644 app/Controller/TaskGanttCreationController.php (limited to 'app/Controller/TaskGanttCreationController.php') diff --git a/app/Controller/TaskGanttCreationController.php b/app/Controller/TaskGanttCreationController.php deleted file mode 100644 index c5046f60..00000000 --- a/app/Controller/TaskGanttCreationController.php +++ /dev/null @@ -1,64 +0,0 @@ -getProject(); - - $values = $values + array( - 'project_id' => $project['id'], - 'column_id' => $this->columnModel->getFirstColumnId($project['id']), - 'position' => 1 - ); - - $values = $this->hook->merge('controller:task:form:default', $values, array('default_values' => $values)); - $values = $this->hook->merge('controller:gantt:task:form:default', $values, array('default_values' => $values)); - - $this->response->html($this->template->render('task_gantt_creation/show', array( - 'project' => $project, - 'errors' => $errors, - 'values' => $values, - 'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, true), - 'categories_list' => $this->categoryModel->getList($project['id']), - 'swimlanes_list' => $this->swimlaneModel->getList($project['id'], false, true), - ))); - } - - /** - * Validate and save a new task - * - * @access public - */ - public function save() - { - $project = $this->getProject(); - $values = $this->request->getValues(); - - list($valid, $errors) = $this->taskValidator->validateCreation($values); - - if ($valid && $this->taskCreationModel->create($values)) { - $this->flash->success(t('Task created successfully.')); - $this->response->redirect($this->helper->url->to('TaskGanttController', 'show', array('project_id' => $project['id']))); - } else { - $this->flash->failure(t('Unable to create your task.')); - $this->show($values, $errors); - } - } -} -- cgit v1.2.3