diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:21:09 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:21:09 -0400 |
commit | 0cb717f4407b81868d6b909d1d4ef4795c5e4b50 (patch) | |
tree | bf277f7bcf80e17be67206948c4900993d5edca6 /app/Template | |
parent | 3861e90336031873d7f6dc2f7476b5502af7d69f (diff) |
Replace all date fields by helper
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/analytic/burndown.php | 6 | ||||
-rw-r--r-- | app/Template/analytic/cfd.php | 6 | ||||
-rw-r--r-- | app/Template/analytic/lead_cycle_time.php | 6 | ||||
-rw-r--r-- | app/Template/export/subtasks.php | 8 | ||||
-rw-r--r-- | app/Template/export/summary.php | 8 | ||||
-rw-r--r-- | app/Template/export/tasks.php | 8 | ||||
-rw-r--r-- | app/Template/export/transitions.php | 9 |
7 files changed, 15 insertions, 36 deletions
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> |