Remove edit recurrence from the task menu
This commit is contained in:
@@ -454,7 +454,6 @@ class Task extends Base
|
|||||||
public function recurrence()
|
public function recurrence()
|
||||||
{
|
{
|
||||||
$task = $this->getTask();
|
$task = $this->getTask();
|
||||||
$ajax = $this->request->isAjax() || $this->request->getIntegerParam('ajax');
|
|
||||||
|
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
|
|
||||||
@@ -471,12 +470,7 @@ class Task extends Base
|
|||||||
$this->session->flashError(t('Unable to update your task.'));
|
$this->session->flashError(t('Unable to update your task.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ajax) {
|
$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('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'])));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -488,19 +482,13 @@ class Task extends Base
|
|||||||
'values' => $values,
|
'values' => $values,
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
'ajax' => $ajax,
|
|
||||||
'recurrence_status_list' => $this->task->getRecurrenceStatusList(),
|
'recurrence_status_list' => $this->task->getRecurrenceStatusList(),
|
||||||
'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
|
'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
|
||||||
'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
|
'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
|
||||||
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
|
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($ajax) {
|
$this->response->html($this->taskLayout('task/edit_recurrence', $params));
|
||||||
$this->response->html($this->template->render('task/edit_recurrence', $params));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->response->html($this->taskLayout('task/edit_recurrence', $params));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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-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-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-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>
|
<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>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?>
|
<?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() ?>
|
<?= $this->form->csrf() ?>
|
||||||
|
|
||||||
@@ -40,12 +40,7 @@
|
|||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||||
<?= t('or') ?>
|
<?= t('or') ?>
|
||||||
|
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||||
<?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 ?>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user