Make project creation form a inline popup

This commit is contained in:
Frederic Guillot
2016-01-31 20:14:51 -05:00
parent 0bc51620c7
commit 271543431e
7 changed files with 40 additions and 11 deletions

View File

@@ -189,10 +189,9 @@ abstract class Base extends \Kanboard\Core\Base
*/
protected function taskLayout($template, array $params)
{
$params['ajax'] = $this->request->isAjax();
$content = $this->template->render($template, $params);
if ($params['ajax']) {
if ($this->request->isAjax()) {
return $content;
}

View File

@@ -20,8 +20,7 @@ class ProjectCreation extends Base
$is_private = isset($values['is_private']) && $values['is_private'] == 1;
$projects_list = array(0 => t('Do not duplicate anything')) + $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId());
$this->response->html($this->template->layout('project_creation/create', array(
'board_selector' => $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()),
$this->response->html($this->helper->layout->app('project_creation/create', array(
'values' => $values,
'errors' => $errors,
'is_private' => $is_private,