From 23d862aef8891130bc7eaeaa25513a9895b44c95 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 3 Dec 2016 12:56:12 -0500 Subject: Add suggest menu for task ID --- app/Helper/FormHelper.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/Helper') diff --git a/app/Helper/FormHelper.php b/app/Helper/FormHelper.php index 8c9ca332..57094688 100644 --- a/app/Helper/FormHelper.php +++ b/app/Helper/FormHelper.php @@ -220,11 +220,16 @@ class FormHelper extends Base 'labelPreview' => t('Preview'), 'labelWrite' => t('Write'), 'placeholder' => t('Write your text in Markdown'), - 'autofocus' => isset($attributes['autofocus']) && $attributes['autofocus'] + 'autofocus' => isset($attributes['autofocus']) && $attributes['autofocus'], + 'suggestOptions' => array( + 'triggers' => array( + '#' => $this->helper->url->to('TaskAjaxController', 'suggest', array('search' => 'SEARCH_TERM')), + ) + ), ); if (isset($values['project_id'])) { - $params['mentionUrl'] = $this->helper->url->to('UserAjaxController', 'mention', array('project_id' => $values['project_id'])); + $params['suggestOptions']['triggers']['@'] = $this->helper->url->to('UserAjaxController', 'mention', array('project_id' => $values['project_id'], 'search' => 'SEARCH_TERM')); } $html = '
'; -- cgit v1.2.3