Duplicate a task quickly to multiple projects after the creation
This commit is contained in:
28
app/Template/task_creation/duplicate_projects.php
Normal file
28
app/Template/task_creation/duplicate_projects.php
Normal file
@@ -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 ?>
|
||||
@@ -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)) ?>
|
||||
|
||||
Reference in New Issue
Block a user