diff options
-rw-r--r-- | app/Controller/Task.php | 16 | ||||
-rw-r--r-- | app/Template/board/task_menu.php | 1 | ||||
-rw-r--r-- | app/Template/task/edit_recurrence.php | 9 |
3 files changed, 4 insertions, 22 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 16bb408f..676dccbe 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -454,7 +454,6 @@ class Task extends Base public function recurrence() { $task = $this->getTask(); - $ajax = $this->request->isAjax() || $this->request->getIntegerParam('ajax'); if ($this->request->isPost()) { @@ -471,12 +470,7 @@ class Task extends Base $this->session->flashError(t('Unable to update your task.')); } - if ($ajax) { - $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id']))); - } - else { - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); - } + $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); } } else { @@ -488,19 +482,13 @@ class Task extends Base 'values' => $values, 'errors' => $errors, 'task' => $task, - 'ajax' => $ajax, 'recurrence_status_list' => $this->task->getRecurrenceStatusList(), 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(), 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(), 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(), ); - if ($ajax) { - $this->response->html($this->template->render('task/edit_recurrence', $params)); - } - else { - $this->response->html($this->taskLayout('task/edit_recurrence', $params)); - } + $this->response->html($this->taskLayout('task/edit_recurrence', $params)); } /** diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php index 97c0f8dc..a84b972d 100644 --- a/app/Template/board/task_menu.php +++ b/app/Template/board/task_menu.php @@ -9,7 +9,6 @@ <li><i class="fa fa-comment-o"></i> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-code-fork"></i> <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-camera"></i> <?= $this->url->link(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> - <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li> <li><i class="fa fa-close"></i> <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li> </ul> </span> diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task/edit_recurrence.php index c261e368..e7c4c8f8 100644 --- a/app/Template/task/edit_recurrence.php +++ b/app/Template/task/edit_recurrence.php @@ -15,7 +15,7 @@ <?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?> - <form method="post" action="<?= $this->url->href('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -40,12 +40,7 @@ <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> - - <?php if ($ajax): ?> - <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> - <?php else: ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - <?php endif ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> </form> |