From a49e7b76439b6f722ad4129a4fbb58b88efcc256 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 28 Jun 2016 20:40:15 -0400 Subject: Expose task reference field to the user interface --- app/Helper/TaskHelper.php | 18 ++++++++++++++---- app/Template/task_creation/show.php | 1 + app/Template/task_gantt_creation/show.php | 1 + app/Template/task_modification/show.php | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php index 58e9ce4f..ce39eb2a 100644 --- a/app/Helper/TaskHelper.php +++ b/app/Helper/TaskHelper.php @@ -167,10 +167,20 @@ class TaskHelper extends Base return $html; } - public function selectTimeEstimated(array $values, array $errors = array(), array $attributes = array()) + public function selectReference(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="9"'), $attributes); + $html = $this->helper->form->label(t('Reference'), 'reference'); + $html .= $this->helper->form->text('reference', $values, $errors, $attributes, 'form-input-small'); + + return $html; + } + + public function selectTimeEstimated(array $values, array $errors = array(), array $attributes = array()) + { + $attributes = array_merge(array('tabindex="10"'), $attributes); + $html = $this->helper->form->label(t('Original estimate'), 'time_estimated'); $html .= $this->helper->form->numeric('time_estimated', $values, $errors, $attributes); $html .= ' '.t('hours'); @@ -180,7 +190,7 @@ class TaskHelper extends Base public function selectTimeSpent(array $values, array $errors = array(), array $attributes = array()) { - $attributes = array_merge(array('tabindex="10"'), $attributes); + $attributes = array_merge(array('tabindex="11"'), $attributes); $html = $this->helper->form->label(t('Time spent'), 'time_spent'); $html .= $this->helper->form->numeric('time_spent', $values, $errors, $attributes); @@ -192,7 +202,7 @@ class TaskHelper extends Base public function selectStartDate(array $values, array $errors = array(), array $attributes = array()) { $placeholder = date($this->configModel->get('application_date_format', 'm/d/Y H:i')); - $attributes = array_merge(array('tabindex="11"', 'placeholder="'.$placeholder.'"'), $attributes); + $attributes = array_merge(array('tabindex="12"', 'placeholder="'.$placeholder.'"'), $attributes); $html = $this->helper->form->label(t('Start Date'), 'date_started'); $html .= $this->helper->form->text('date_started', $values, $errors, $attributes, 'form-datetime'); @@ -203,7 +213,7 @@ class TaskHelper extends Base public function selectDueDate(array $values, array $errors = array(), array $attributes = array()) { $placeholder = date($this->configModel->get('application_date_format', 'm/d/Y')); - $attributes = array_merge(array('tabindex="12"', 'placeholder="'.$placeholder.'"'), $attributes); + $attributes = array_merge(array('tabindex="13"', 'placeholder="'.$placeholder.'"'), $attributes); $html = $this->helper->form->label(t('Due Date'), 'date_due'); $html .= $this->helper->form->text('date_due', $values, $errors, $attributes, 'form-date'); diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index f799919a..57e77f37 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -27,6 +27,7 @@ task->selectColumn($columns_list, $values, $errors) ?> task->selectPriority($project, $values) ?> task->selectScore($values, $errors) ?> + task->selectReference($values, $errors) ?> hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php index 5e4286bd..7521d805 100644 --- a/app/Template/task_gantt_creation/show.php +++ b/app/Template/task_gantt_creation/show.php @@ -23,6 +23,7 @@ task->selectSwimlane($swimlanes_list, $values, $errors) ?> task->selectPriority($project, $values) ?> task->selectScore($values, $errors) ?> + task->selectReference($values, $errors) ?> hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/task_modification/show.php b/app/Template/task_modification/show.php index d747407e..cc38582c 100644 --- a/app/Template/task_modification/show.php +++ b/app/Template/task_modification/show.php @@ -21,6 +21,7 @@ task->selectCategory($categories_list, $values, $errors) ?> task->selectPriority($project, $values) ?> task->selectScore($values, $errors) ?> + task->selectReference($values, $errors) ?> hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> -- cgit v1.2.3