summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controller/AnalyticController.php8
-rw-r--r--app/Controller/ExportController.php2
-rw-r--r--app/Template/analytic/burndown.php6
-rw-r--r--app/Template/analytic/cfd.php6
-rw-r--r--app/Template/analytic/lead_cycle_time.php6
-rw-r--r--app/Template/export/subtasks.php8
-rw-r--r--app/Template/export/summary.php8
-rw-r--r--app/Template/export/tasks.php8
-rw-r--r--app/Template/export/transitions.php9
9 files changed, 17 insertions, 44 deletions
diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php
index ab0646a2..c3e7409a 100644
--- a/app/Controller/AnalyticController.php
+++ b/app/Controller/AnalyticController.php
@@ -31,8 +31,6 @@ class AnalyticController extends BaseController
'project' => $project,
'average' => $this->averageLeadCycleTimeAnalytic->build($project['id']),
'metrics' => $this->projectDailyStatsModel->getRawMetrics($project['id'], $from, $to),
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
'title' => t('Lead and cycle time'),
)));
}
@@ -155,8 +153,6 @@ class AnalyticController extends BaseController
'display_graph' => $display_graph,
'metrics' => $display_graph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array(),
'project' => $project,
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
'title' => $title,
)));
}
@@ -169,8 +165,8 @@ class AnalyticController extends BaseController
$to = $this->request->getStringParam('to', date('Y-m-d'));
if (! empty($values)) {
- $from = $values['from'];
- $to = $values['to'];
+ $from = $this->dateParser->getIsoDate($values['from']);
+ $to = $this->dateParser->getIsoDate($values['to']);
}
return array($from, $to);
diff --git a/app/Controller/ExportController.php b/app/Controller/ExportController.php
index 27046c76..b7ac92aa 100644
--- a/app/Controller/ExportController.php
+++ b/app/Controller/ExportController.php
@@ -42,8 +42,6 @@ class ExportController extends BaseController
'to' => $to,
),
'errors' => array(),
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
'project' => $project,
'title' => $page_title,
), 'export/sidebar'));
diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php
index e979595d..dfd77604 100644
--- a/app/Template/analytic/burndown.php
+++ b/app/Template/analytic/burndown.php
@@ -17,13 +17,11 @@
<?= $this->form->csrf() ?>
<div class="form-inline-group">
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
</div>
<div class="form-inline-group">
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
</div>
<div class="form-inline-group">
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php
index 8dfb5b00..89ded3ad 100644
--- a/app/Template/analytic/cfd.php
+++ b/app/Template/analytic/cfd.php
@@ -17,13 +17,11 @@
<?= $this->form->csrf() ?>
<div class="form-inline-group">
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
</div>
<div class="form-inline-group">
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
</div>
<div class="form-inline-group">
diff --git a/app/Template/analytic/lead_cycle_time.php b/app/Template/analytic/lead_cycle_time.php
index 2dccc136..ef595b79 100644
--- a/app/Template/analytic/lead_cycle_time.php
+++ b/app/Template/analytic/lead_cycle_time.php
@@ -21,13 +21,11 @@
<?= $this->form->csrf() ?>
<div class="form-inline-group">
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
</div>
<div class="form-inline-group">
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
</div>
<div class="form-inline-group">
diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php
index 878a7132..959f0e47 100644
--- a/app/Template/export/subtasks.php
+++ b/app/Template/export/subtasks.php
@@ -9,12 +9,8 @@
<?= $this->form->hidden('controller', $values) ?>
<?= $this->form->hidden('action', $values) ?>
<?= $this->form->hidden('project_id', $values) ?>
-
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
-
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/summary.php b/app/Template/export/summary.php
index d9362a9b..a7483fcb 100644
--- a/app/Template/export/summary.php
+++ b/app/Template/export/summary.php
@@ -5,16 +5,12 @@
<p class="alert alert-info"><?= t('This export contains the number of tasks per column grouped per day.') ?></p>
<form method="get" action="?" autocomplete="off">
-
<?= $this->form->hidden('controller', $values) ?>
<?= $this->form->hidden('action', $values) ?>
<?= $this->form->hidden('project_id', $values) ?>
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
-
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php
index ae411326..ce1c869e 100644
--- a/app/Template/export/tasks.php
+++ b/app/Template/export/tasks.php
@@ -5,16 +5,12 @@
<p class="alert alert-info"><?= t('This report contains all tasks information for the given date range.') ?></p>
<form method="get" action="?" autocomplete="off">
-
<?= $this->form->hidden('controller', $values) ?>
<?= $this->form->hidden('action', $values) ?>
<?= $this->form->hidden('project_id', $values) ?>
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
-
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/transitions.php b/app/Template/export/transitions.php
index 093930a3..7cd355db 100644
--- a/app/Template/export/transitions.php
+++ b/app/Template/export/transitions.php
@@ -10,15 +10,12 @@
<?= $this->form->hidden('action', $values) ?>
<?= $this->form->hidden('project_id', $values) ?>
- <?= $this->form->label(t('Start Date'), 'from') ?>
- <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
-
- <?= $this->form->label(t('End Date'), 'to') ?>
- <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->date(t('Start date'), 'from', $values) ?>
+ <?= $this->form->date(t('End date'), 'to', $values) ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Execute') ?></button>
</div>
-</form> \ No newline at end of file
+</form>