From e2181612b984489e479f52f748c3199c693d986c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 5 Feb 2016 19:00:40 -0500 Subject: Remove time form on task summary page and move that to task edit form --- app/Controller/Taskmodification.php | 22 +--------------------- app/Helper/Task.php | 2 +- app/Template/task/menu.php | 6 ++++++ app/Template/task/show.php | 7 ------- app/Template/task_modification/edit_task.php | 1 + app/Template/task_modification/edit_time.php | 20 -------------------- 6 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 app/Template/task_modification/edit_time.php (limited to 'app') diff --git a/app/Controller/Taskmodification.php b/app/Controller/Taskmodification.php index 0e9316b2..54b4b23a 100644 --- a/app/Controller/Taskmodification.php +++ b/app/Controller/Taskmodification.php @@ -22,27 +22,6 @@ class Taskmodification extends Base $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); } - /** - * Update time tracking information - * - * @access public - */ - public function time() - { - $task = $this->getTask(); - $values = $this->request->getValues(); - - list($valid, ) = $this->taskValidator->validateTimeModification($values); - - if ($valid && $this->taskModification->update($values)) { - $this->flash->success(t('Task updated successfully.')); - } else { - $this->flash->failure(t('Unable to update your task.')); - } - - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); - } - /** * Edit description form * @@ -104,6 +83,7 @@ class Taskmodification extends Base } $this->dateParser->format($values, array('date_due')); + $this->dateParser->format($values, array('date_started'), 'Y-m-d H:i'); $this->response->html($this->helper->layout->task('task_modification/edit_task', array( 'project' => $project, diff --git a/app/Helper/Task.php b/app/Helper/Task.php index 1cb36b86..0ef3da2c 100644 --- a/app/Helper/Task.php +++ b/app/Helper/Task.php @@ -146,7 +146,7 @@ class Task extends Base $attributes = array_merge(array('tabindex="11"', 'placeholder="'.$placeholder.'"'), $attributes); $html = $this->helper->form->label(t('Start Date'), 'date_started'); - $html .= $this->helper->form->text('date_started', $values, $errors, $attributes, 'form-date'); + $html .= $this->helper->form->text('date_started', $values, $errors, $attributes, 'form-datetime'); return $html; } diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php index 426cfb3d..20fca22b 100644 --- a/app/Template/task/menu.php +++ b/app/Template/task/menu.php @@ -2,6 +2,12 @@