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_description.php | |
parent | 4a52d327f7e555c336a428c457cf40c3d97bfab3 (diff) |
Simplify code to handle ajax popover and redirects
Diffstat (limited to 'app/Template/task_modification/edit_description.php')
-rw-r--r-- | app/Template/task_modification/edit_description.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php index c38e885d..f5a9b0e1 100644 --- a/app/Template/task_modification/edit_description.php +++ b/app/Template/task_modification/edit_description.php @@ -2,7 +2,7 @@ <h2><?= t('Edit the description') ?></h2> </div> -<form method="post" action="<?= $this->url->href('taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form class="popover-form" method="post" action="<?= $this->url->href('taskmodification', 'updateDescription', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -39,10 +39,6 @@ <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']), false, 'close-popover') ?> </div> </form> |