diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-30 22:25:16 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-30 22:25:16 -0500 |
commit | bb040cfb78d53696edd63bf256d0fd8ba3ccdbfa (patch) | |
tree | 811d150fddd6220faabb3c1ea1743ffd7f781e45 /app/Template/task_modification/edit_task.php | |
parent | 4a52d327f7e555c336a428c457cf40c3d97bfab3 (diff) |
Simplify code to handle ajax popover and redirects
Diffstat (limited to 'app/Template/task_modification/edit_task.php')
-rw-r--r-- | app/Template/task_modification/edit_task.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php index 2701dd8f..f825f4a4 100644 --- a/app/Template/task_modification/edit_task.php +++ b/app/Template/task_modification/edit_task.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit a task') ?></h2> </div> -<form id="task-form" method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> +<form class="popover-form" method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -63,10 +63,6 @@ <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue" tabindex="10"> <?= t('or') ?> - <?php if ($ajax): ?> - <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> - <?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']), false, 'close-popover') ?> </div> </form>
\ No newline at end of file |