diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-31 11:05:47 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-31 11:05:47 -0500 |
commit | 9570793f68d44179f9b7e0b264e5fbe0ca839c51 (patch) | |
tree | 08d14952e0eb02742742baf7706d5531a55bcb8d /app/Helper | |
parent | 3279768c1cff1534f435a080c4765f8a45290a4e (diff) |
Add a "Me" button to assignee form element
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/Task.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/Helper/Task.php b/app/Helper/Task.php index d2c59ee9..06f7d58e 100644 --- a/app/Helper/Task.php +++ b/app/Helper/Task.php @@ -45,6 +45,17 @@ class Task extends Base return $this->taskPermission->canRemoveTask($task); } + public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array()) + { + $attributes = array_merge(array('tabindex="3"'), $attributes); + + $html = $this->helper->form->label(t('Assignee'), 'owner_id'); + $html .= $this->helper->form->select('owner_id', $users, $values, $errors, $attributes); + $html .= '<a href="#" class="assign-me" data-target-id="form-owner_id" data-current-id="'.$this->userSession->getId().'" title="'.t('Assign to me').'">'.t('Me').'</a>'; + + return $html; + } + public function selectPriority(array $project, array $values) { $html = ''; |