summaryrefslogtreecommitdiff
path: root/app/Template/tasklink/create.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-12 21:21:24 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-12 21:21:24 -0400
commit925ede9b48bef67739d26f0d0a394342f2d8edf0 (patch)
treed2ce47cb3793f8e64831ff7e04b3cddb35dcc498 /app/Template/tasklink/create.php
parentac19e36b55b566f61d750e801134396fd4d3fada (diff)
parentb747b9750b697b863fcadbbbeb0ed94220e57961 (diff)
Merge and improve pull-request #704
Diffstat (limited to 'app/Template/tasklink/create.php')
-rw-r--r--app/Template/tasklink/create.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
index fb438cd8..acf9d6d1 100644
--- a/app/Template/tasklink/create.php
+++ b/app/Template/tasklink/create.php
@@ -2,7 +2,7 @@
<h2><?= t('Add a new link') ?></h2>
</div>
-<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off">
+<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->formHidden('task_id', $values) ?>
@@ -22,6 +22,10 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php if (isset($ajax)): ?>
+ <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
+ <?php else: ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
</div>
</form> \ No newline at end of file