Add autocompletion in textarea for user mentions

This commit is contained in:
Frederic Guillot
2015-12-29 18:44:21 +01:00
parent b4c5e36ee4
commit 178eda1887
18 changed files with 2773 additions and 7 deletions

View File

@@ -17,7 +17,18 @@
</li>
</ul>
<div class="write-area">
<?= $this->form->textarea('comment', $values, $errors, array(! isset($skip_cancel) ? 'autofocus' : '', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?>
<?= $this->form->textarea(
'comment',
$values,
$errors,
array(
! isset($skip_cancel) ? 'autofocus' : '',
'required',
'placeholder="'.t('Leave a comment').'"',
'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"',
),
'comment-textarea'
) ?>
</div>
<div class="preview-area">
<div class="markdown"></div>