From 5de091ea2821f189e867510c15e0d1d00f39b7e8 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 25 Nov 2014 20:49:26 -0500 Subject: Show the task creation form as a popover --- app/Controller/Task.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Controller/Task.php') diff --git a/app/Controller/Task.php b/app/Controller/Task.php index b826a305..907c42cc 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -89,8 +89,9 @@ class Task extends Base public function create() { $project = $this->getProject(); + $method = $this->request->isAjax() ? 'load' : 'layout'; - $this->response->html($this->template->layout('task_new', array( + $this->response->html($this->template->$method('task_new', array( 'errors' => array(), 'values' => array( 'project_id' => $project['id'], -- cgit v1.2.3