Replace all date fields by helper
This commit is contained in:
parent
3861e90336
commit
0cb717f440
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue