Skip to content

Commit 9221aae

Browse files
authored
Merge pull request #11 from creecros/testing
Adding Apply to all columns feature
2 parents f58c613 + e2c296b commit 9221aae

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Action/AutoCreateSubtask.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function getActionRequiredParameters()
3131
'multitasktitles' => t('Subtask Title(s)'),
3232
'time_estimated' => t('Estimated Time in Hours'),
3333
'duration' => t('Duration in days'),
34+
'check_box' => t('Apply to all Columns'),
3435
);
3536
}
3637

@@ -100,6 +101,11 @@ public function doAction(array $data)
100101

101102
public function hasRequiredCondition(array $data)
102103
{
104+
105+
if ($this->getParam('check_box')) {
106+
return $data['task']['column_id'] == $data['task']['column_id'];
107+
} else {
103108
return $data['task']['column_id'] == $this->getParam('column_id');
109+
}
104110
}
105111
}

Template/action_creation/params.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
<?php elseif ($this->text->contains($param_name, 'user_id')): ?>
2222
<?= $this->form->label($param_desc, $param_name) ?>
2323
<?= $this->form->select('params['.$param_name.']', $users_list, $values) ?>
24+
<?php elseif ($this->text->contains($param_name, 'check_box')): ?>
25+
<?= $this->form->label(t('Options'), $param_name) ?>
26+
<?= $this->form->checkbox('params['.$param_name.']', $param_desc, 1) ?>
2427
<?php elseif ($this->text->contains($param_name, 'project_id')): ?>
2528
<?= $this->form->label($param_desc, $param_name) ?>
2629
<?= $this->form->select('params['.$param_name.']', $projects_list, $values) ?>

0 commit comments

Comments
 (0)