diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Helper/SubtaskHelper.php | 8 | ||||
-rw-r--r-- | app/Helper/TaskHelper.php | 32 | ||||
-rw-r--r-- | app/Template/external_task_creation/step1.php | 2 | ||||
-rw-r--r-- | app/Template/subtask/create.php | 7 | ||||
-rw-r--r-- | app/Template/subtask/edit.php | 10 | ||||
-rw-r--r-- | app/Template/task_bulk/show.php | 6 | ||||
-rw-r--r-- | app/Template/task_creation/show.php | 30 | ||||
-rw-r--r-- | app/Template/task_modification/show.php | 26 |
8 files changed, 62 insertions, 59 deletions
diff --git a/app/Helper/SubtaskHelper.php b/app/Helper/SubtaskHelper.php index 833544a7..8e090f17 100644 --- a/app/Helper/SubtaskHelper.php +++ b/app/Helper/SubtaskHelper.php @@ -50,7 +50,7 @@ class SubtaskHelper extends Base return $this->helper->url->link($this->getTitle($subtask), 'SubtaskStatusController', 'change', $params, false, $class); } - public function selectTitle(array $values, array $errors = array(), array $attributes = array()) + public function renderTitleField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="1"', 'required', 'maxlength="255"'), $attributes); @@ -60,7 +60,7 @@ class SubtaskHelper extends Base return $html; } - public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array()) + public function renderAssigneeField(array $users, array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="2"'), $attributes); @@ -74,7 +74,7 @@ class SubtaskHelper extends Base return $html; } - public function selectTimeEstimated(array $values, array $errors = array(), array $attributes = array()) + public function renderTimeEstimatedField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="3"'), $attributes); @@ -85,7 +85,7 @@ class SubtaskHelper extends Base return $html; } - public function selectTimeSpent(array $values, array $errors = array(), array $attributes = array()) + public function renderTimeSpentField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="4"'), $attributes); diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php index a13ad18b..71596b60 100644 --- a/app/Helper/TaskHelper.php +++ b/app/Helper/TaskHelper.php @@ -40,7 +40,7 @@ class TaskHelper extends Base return $this->taskRecurrenceModel->getRecurrenceBasedateList(); } - public function selectTitle(array $values, array $errors) + public function renderTitleField(array $values, array $errors) { return $this->helper->form->text( 'title', @@ -56,12 +56,12 @@ class TaskHelper extends Base ); } - public function selectDescription(array $values, array $errors) + public function renderDescriptionField(array $values, array $errors) { return $this->helper->form->textEditor('description', $values, $errors, array('tabindex' => 2)); } - public function selectTags(array $project, array $tags = array()) + public function renderTagField(array $project, array $tags = array()) { $options = $this->tagModel->getAssignableList($project['id']); @@ -83,7 +83,7 @@ class TaskHelper extends Base return $html; } - public function selectColor(array $values) + public function renderColorField(array $values) { $colors = $this->colorModel->getList(); $html = $this->helper->form->label(t('Color'), 'color_id'); @@ -91,7 +91,7 @@ class TaskHelper extends Base return $html; } - public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array()) + public function renderAssigneeField(array $users, array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="3"'), $attributes); @@ -105,7 +105,7 @@ class TaskHelper extends Base return $html; } - public function selectCategory(array $categories, array $values, array $errors = array(), array $attributes = array(), $allow_one_item = false) + public function renderCategoryField(array $categories, array $values, array $errors = array(), array $attributes = array(), $allow_one_item = false) { $attributes = array_merge(array('tabindex="4"'), $attributes); $html = ''; @@ -118,7 +118,7 @@ class TaskHelper extends Base return $html; } - public function selectSwimlane(array $swimlanes, array $values, array $errors = array(), array $attributes = array()) + public function renderSwimlaneField(array $swimlanes, array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="5"'), $attributes); $html = ''; @@ -131,7 +131,7 @@ class TaskHelper extends Base return $html; } - public function selectColumn(array $columns, array $values, array $errors = array(), array $attributes = array()) + public function renderColumnField(array $columns, array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="6"'), $attributes); @@ -141,7 +141,7 @@ class TaskHelper extends Base return $html; } - public function selectPriority(array $project, array $values) + public function renderPriorityField(array $project, array $values) { $html = ''; @@ -157,7 +157,7 @@ class TaskHelper extends Base return $html; } - public function selectScore(array $values, array $errors = array(), array $attributes = array()) + public function renderScoreField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="13"'), $attributes); @@ -167,7 +167,7 @@ class TaskHelper extends Base return $html; } - public function selectReference(array $values, array $errors = array(), array $attributes = array()) + public function renderReferenceField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="14"'), $attributes); @@ -177,7 +177,7 @@ class TaskHelper extends Base return $html; } - public function selectTimeEstimated(array $values, array $errors = array(), array $attributes = array()) + public function renderTimeEstimatedField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="11"'), $attributes); @@ -188,7 +188,7 @@ class TaskHelper extends Base return $html; } - public function selectTimeSpent(array $values, array $errors = array(), array $attributes = array()) + public function renderTimeSpentField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="12"'), $attributes); @@ -199,13 +199,13 @@ class TaskHelper extends Base return $html; } - public function selectStartDate(array $values, array $errors = array(), array $attributes = array()) + public function renderStartDateField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="10"'), $attributes); return $this->helper->form->datetime(t('Start Date'), 'date_started', $values, $errors, $attributes); } - public function selectDueDate(array $values, array $errors = array(), array $attributes = array()) + public function renderDueDateField(array $values, array $errors = array(), array $attributes = array()) { $attributes = array_merge(array('tabindex="9"'), $attributes); return $this->helper->form->date(t('Due Date'), 'date_due', $values, $errors, $attributes); @@ -251,7 +251,7 @@ class TaskHelper extends Base 'step1', array('project_id' => $projectId, 'swimlane_id' => $swimlaneId, 'column_id' => $columnId, 'provider_name' => $providerName), false, - 'popover-link' + 'js-modal-replace' ); $html .= '<li><i class="fa fa-fw fa-plus-square" aria-hidden="true"></i> '.$link.'</li>'; diff --git a/app/Template/external_task_creation/step1.php b/app/Template/external_task_creation/step1.php index 415b02ef..2a3b0144 100644 --- a/app/Template/external_task_creation/step1.php +++ b/app/Template/external_task_creation/step1.php @@ -12,5 +12,5 @@ <div class="alert alert-error"><?= $this->text->e($error_message) ?></div> <?php endif ?> - <?= $this->modal->submitButtons(t('Next')) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Next'))) ?> </form> diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php index ade9686e..96ad7a46 100644 --- a/app/Template/subtask/create.php +++ b/app/Template/subtask/create.php @@ -6,9 +6,10 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', $values) ?> - <?= $this->subtask->selectTitle($values, $errors, array('autofocus')) ?> - <?= $this->subtask->selectAssignee($users_list, $values, $errors) ?> - <?= $this->subtask->selectTimeEstimated($values, $errors) ?> + <?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?> + <?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->subtask->renderTimeEstimatedField($values, $errors) ?> + <?= $this->hook->render('template:subtask:form:create', array('values' => $values, 'errors' => $errors)) ?> <?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?> diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php index b34b93a8..7c0266a8 100644 --- a/app/Template/subtask/edit.php +++ b/app/Template/subtask/edit.php @@ -6,10 +6,12 @@ <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('task_id', $values) ?> - <?= $this->subtask->selectTitle($values, $errors, array('autofocus')) ?> - <?= $this->subtask->selectAssignee($users_list, $values, $errors) ?> - <?= $this->subtask->selectTimeEstimated($values, $errors) ?> - <?= $this->subtask->selectTimeSpent($values, $errors) ?> + + <?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?> + <?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->subtask->renderTimeEstimatedField($values, $errors) ?> + <?= $this->subtask->renderTimeSpentField($values, $errors) ?> + <?= $this->hook->render('template:subtask:form:edit', array('values' => $values, 'errors' => $errors)) ?> <?= $this->modal->submitButtons() ?> diff --git a/app/Template/task_bulk/show.php b/app/Template/task_bulk/show.php index 2442779d..acf80d8c 100644 --- a/app/Template/task_bulk/show.php +++ b/app/Template/task_bulk/show.php @@ -8,9 +8,9 @@ <?= $this->form->hidden('swimlane_id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> <?= $this->form->label(t('Tasks'), 'tasks') ?> <?= $this->form->textarea('tasks', $values, $errors, array('placeholder="'.t('My task title').'"')) ?> diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index 56e4b398..e957087f 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -7,31 +7,31 @@ <div class="task-form-container"> <div class="task-form-main-column"> - <?= $this->task->selectTitle($values, $errors) ?> - <?= $this->task->selectDescription($values, $errors) ?> - <?= $this->task->selectTags($project) ?> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderTagField($project) ?> <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> </div> <div class="task-form-secondary-column"> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> - <?= $this->task->selectColumn($columns_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> + <?= $this->task->renderSwimlaneField($swimlanes_list, $values, $errors) ?> + <?= $this->task->renderColumnField($columns_list, $values, $errors) ?> + <?= $this->task->renderPriorityField($project, $values) ?> <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> </div> <div class="task-form-secondary-column"> - <?= $this->task->selectDueDate($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectReference($values, $errors) ?> + <?= $this->task->renderDueDateField($values, $errors) ?> + <?= $this->task->renderStartDateField($values, $errors) ?> + <?= $this->task->renderTimeEstimatedField($values, $errors) ?> + <?= $this->task->renderTimeSpentField($values, $errors) ?> + <?= $this->task->renderScoreField($values, $errors) ?> + <?= $this->task->renderReferenceField($values, $errors) ?> <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> </div> diff --git a/app/Template/task_modification/show.php b/app/Template/task_modification/show.php index 23a0a43b..710abedf 100644 --- a/app/Template/task_modification/show.php +++ b/app/Template/task_modification/show.php @@ -8,29 +8,29 @@ <div class="task-form-container"> <div class="task-form-main-column"> - <?= $this->task->selectTitle($values, $errors) ?> - <?= $this->task->selectDescription($values, $errors) ?> - <?= $this->task->selectTags($project, $tags) ?> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderTagField($project, $tags) ?> <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> </div> <div class="task-form-secondary-column"> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> + <?= $this->task->renderPriorityField($project, $values) ?> <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> </div> <div class="task-form-secondary-column"> - <?= $this->task->selectDueDate($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectReference($values, $errors) ?> + <?= $this->task->renderDueDateField($values, $errors) ?> + <?= $this->task->renderStartDateField($values, $errors) ?> + <?= $this->task->renderTimeEstimatedField($values, $errors) ?> + <?= $this->task->renderTimeSpentField($values, $errors) ?> + <?= $this->task->renderScoreField($values, $errors) ?> + <?= $this->task->renderReferenceField($values, $errors) ?> <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> </div> |