summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-11-05 22:26:58 -0400
committerFrederic Guillot <fred@kanboard.net>2016-11-05 22:26:58 -0400
commit3f7840c4db7384eb142f92c33330827b8d7255f9 (patch)
tree8f0cb3b6e0039eb4914534dd64718ecff6dc4715 /app/Template
parentae5d31e4c285e0ce672de780fdacff953fe71bba (diff)
Add the possibility to create external tasks
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/external_task_creation/step1.php19
-rw-r--r--app/Template/external_task_creation/step2.php25
-rw-r--r--app/Template/task_creation/show.php5
3 files changed, 46 insertions, 3 deletions
diff --git a/app/Template/external_task_creation/step1.php b/app/Template/external_task_creation/step1.php
new file mode 100644
index 00000000..2af9b427
--- /dev/null
+++ b/app/Template/external_task_creation/step1.php
@@ -0,0 +1,19 @@
+<form class="popover-form" method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step2', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('swimlane_id', $values) ?>
+ <?= $this->form->hidden('column_id', $values) ?>
+
+ <?= $this->render($template, array(
+ 'project' => $project,
+ 'values' => $values,
+ )) ?>
+
+ <?php if (! empty($error_message)): ?>
+ <div class="alert alert-error"><?= $this->text->e($error_message) ?></div>
+ <?php endif ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Next') ?></button>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+ </div>
+</form>
diff --git a/app/Template/external_task_creation/step2.php b/app/Template/external_task_creation/step2.php
new file mode 100644
index 00000000..4bc0e509
--- /dev/null
+++ b/app/Template/external_task_creation/step2.php
@@ -0,0 +1,25 @@
+<form class="popover-form" method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step3', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('external_provider', $values) ?>
+ <?= $this->form->hidden('external_uri', $values) ?>
+
+ <?= $this->render($template, array(
+ 'project' => $project,
+ 'external_task' => $external_task,
+ 'values' => $values,
+ 'errors' => $errors,
+ 'users_list' => $users_list,
+ 'categories_list' => $categories_list,
+ 'swimlanes_list' => $swimlanes_list,
+ 'columns_list' => $columns_list,
+ )) ?>
+
+ <?php if (! empty($error_message)): ?>
+ <div class="alert alert-error"><?= $this->text->e($error_message) ?></div>
+ <?php endif ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+ </div>
+</form>
diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php
index 0c267aff..840d1804 100644
--- a/app/Template/task_creation/show.php
+++ b/app/Template/task_creation/show.php
@@ -1,8 +1,8 @@
<div class="page-header">
- <h2><?= $this->text->e($project['name']) ?> &gt; <?= t('New task') ?></h2>
+ <h2><?= $this->text->e($project['name']) ?> &gt; <?= t('New task') ?><?= $this->task->getNewTaskDropdown($project['id'], $values['swimlane_id'], $values['column_id']) ?></h2>
</div>
-<form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off">
+<form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<div class="form-columns">
@@ -17,7 +17,6 @@
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
<?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?>
<?php endif ?>
-
</div>
<div class="form-column">