summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Helper.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/app/Core/Helper.php b/app/Core/Helper.php
index 0b267797..42cfbc8a 100644
--- a/app/Core/Helper.php
+++ b/app/Core/Helper.php
@@ -244,7 +244,7 @@ class Helper
*/
public function formRadio($name, $label, $value, $selected = false, $class = '')
{
- return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.$this->e($value).'" '.($selected ? 'selected="selected"' : '').'>'.$this->e($label).'</label>';
+ return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.$this->e($value).'" '.($selected ? 'selected="selected"' : '').'> '.$this->e($label).'</label>';
}
/**
@@ -648,4 +648,26 @@ class Helper
'Sat' => t('Sat'),
));
}
+
+ public function toggleSubtaskStatus(array $subtask, $redirect)
+ {
+ if ($subtask['status'] == 0 && isset($this->session['has_subtask_inprogress']) && $this->session['has_subtask_inprogress'] === true) {
+
+ return $this->a(
+ trim($this->render('subtask/icons', array('subtask' => $subtask))) . $this->e($subtask['status_name']),
+ 'subtask',
+ 'subtaskRestriction',
+ array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'redirect' => $redirect),
+ false,
+ 'popover-subtask-restriction'
+ );
+ }
+
+ return $this->a(
+ trim($this->render('subtask/icons', array('subtask' => $subtask))) . $this->e($subtask['status_name']),
+ 'subtask',
+ 'toggleStatus',
+ array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'redirect' => $redirect)
+ );
+ }
}