summaryrefslogtreecommitdiff
path: root/app/Controller/Task.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-05 11:22:10 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-05 11:22:10 -0400
commitbae57838c2dd789064b246308c7cb3a33bba5b8e (patch)
treeb43db60ada251debd3bf5d900d017b2cd29e421f /app/Controller/Task.php
parent8e5673e3d289e4d28b4fc9f20721bda9f1c858c7 (diff)
Input date format is now a config parameter instead of the current locale
Diffstat (limited to 'app/Controller/Task.php')
-rw-r--r--app/Controller/Task.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index fc7103ef..163929d2 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -92,6 +92,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($project_id),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($project_id),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
)));
@@ -138,6 +140,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($values['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($values['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
)));
@@ -153,7 +157,7 @@ class Task extends Base
$task = $this->getTask();
if (! empty($task['date_due'])) {
- $task['date_due'] = date(t('m/d/Y'), $task['date_due']);
+ $task['date_due'] = date($this->config->get('application_date_format'), $task['date_due']);
}
else {
$task['date_due'] = '';
@@ -169,6 +173,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($task['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($task['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'ajax' => $ajax,
'menu' => 'tasks',
'title' => t('Edit a task')
@@ -219,6 +225,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($values['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($values['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('Edit a task'),
'ajax' => $this->request->isAjax(),