Make suggest menu appears in comment textareas
This commit is contained in:
@@ -48,6 +48,7 @@ class CommentController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(array $values = array(), array $errors = array())
|
public function create(array $values = array(), array $errors = array())
|
||||||
{
|
{
|
||||||
|
$project = $this->getProject();
|
||||||
$task = $this->getTask();
|
$task = $this->getTask();
|
||||||
|
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
@@ -57,10 +58,13 @@ class CommentController extends BaseController
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->response->html($this->template->render('comment/create', array(
|
$values['project_id'] = $task['project_id'];
|
||||||
|
|
||||||
|
$this->response->html($this->helper->layout->task('comment/create', array(
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
|
'project' => $project,
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,8 +107,14 @@ class CommentController extends BaseController
|
|||||||
$task = $this->getTask();
|
$task = $this->getTask();
|
||||||
$comment = $this->getComment();
|
$comment = $this->getComment();
|
||||||
|
|
||||||
|
if (empty($values)) {
|
||||||
|
$values = $comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
$values['project_id'] = $task['project_id'];
|
||||||
|
|
||||||
$this->response->html($this->template->render('comment/edit', array(
|
$this->response->html($this->template->render('comment/edit', array(
|
||||||
'values' => empty($values) ? $comment : $values,
|
'values' => $values,
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'comment' => $comment,
|
'comment' => $comment,
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
'values' => array(
|
'values' => array(
|
||||||
'user_id' => $this->user->getId(),
|
'user_id' => $this->user->getId(),
|
||||||
'task_id' => $task['id'],
|
'task_id' => $task['id'],
|
||||||
|
'project_id' => $task['project_id'],
|
||||||
),
|
),
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
|
|||||||
Reference in New Issue
Block a user