diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-09-11 20:55:21 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-09-11 20:55:21 -0400 |
commit | 49f9b65e6ceb97afffa3d44eb95e5aca64a5ab40 (patch) | |
tree | eb0736708dfb515b5e7ee6519ca4e562ab136102 /app/Template/task_creation | |
parent | daa184458bdd595d02bc3625ff7abacbfd830b29 (diff) |
Duplicate a task quickly to multiple projects after the creation
Diffstat (limited to 'app/Template/task_creation')
-rw-r--r-- | app/Template/task_creation/duplicate_projects.php | 28 | ||||
-rw-r--r-- | app/Template/task_creation/show.php | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/app/Template/task_creation/duplicate_projects.php b/app/Template/task_creation/duplicate_projects.php new file mode 100644 index 00000000..dc0fa105 --- /dev/null +++ b/app/Template/task_creation/duplicate_projects.php @@ -0,0 +1,28 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= $this->text->e($task['title']) ?></h2> +</div> + +<?php if (empty($projects_list)): ?> + <p class="alert"><?= t('There is no destination project available.') ?></p> + <div class="form-actions"> + <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover btn') ?> + </div> +<?php else: ?> + <form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'duplicateProjects', array('project_id' => $task['project_id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('task_id', $values) ?> + + <?= $this->form->select( + 'project_ids[]', + $projects_list, + $values, + array(), + array('multiple') + ) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Duplicate') ?></button> + <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> + </div> + </form> +<?php endif ?> diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index 1a8a17d5..c2cc4aac 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -13,6 +13,7 @@ <?php if (! isset($duplicate)): ?> <?= $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 ?> <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> |