From 0cb717f4407b81868d6b909d1d4ef4795c5e4b50 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 31 Aug 2016 21:21:09 -0400 Subject: Replace all date fields by helper --- app/Template/analytic/burndown.php | 6 ++---- app/Template/analytic/cfd.php | 6 ++---- app/Template/analytic/lead_cycle_time.php | 6 ++---- app/Template/export/subtasks.php | 8 ++------ app/Template/export/summary.php | 8 ++------ app/Template/export/tasks.php | 8 ++------ app/Template/export/transitions.php | 9 +++------ 7 files changed, 15 insertions(+), 36 deletions(-) (limited to 'app/Template') 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 @@ form->csrf() ?>
- form->label(t('Start Date'), 'from') ?> - form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?>
- form->label(t('End Date'), 'to') ?> - form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('End date'), 'to', $values) ?>
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 @@ form->csrf() ?>
- form->label(t('Start Date'), 'from') ?> - form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?>
- form->label(t('End Date'), 'to') ?> - form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('End date'), 'to', $values) ?>
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 @@ form->csrf() ?>
- form->label(t('Start Date'), 'from') ?> - form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?>
- form->label(t('End Date'), 'to') ?> - form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('End date'), 'to', $values) ?>
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 @@ form->hidden('controller', $values) ?> form->hidden('action', $values) ?> form->hidden('project_id', $values) ?> - - form->label(t('Start Date'), 'from') ?> - form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - form->label(t('End Date'), 'to') ?> - form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?> + form->date(t('End date'), 'to', $values) ?>
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 @@

- form->hidden('controller', $values) ?> form->hidden('action', $values) ?> form->hidden('project_id', $values) ?> - form->label(t('Start Date'), 'from') ?> - form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - form->label(t('End Date'), 'to') ?> - form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?> + form->date(t('End date'), 'to', $values) ?>
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 @@

- form->hidden('controller', $values) ?> form->hidden('action', $values) ?> form->hidden('project_id', $values) ?> - form->label(t('Start Date'), 'from') ?> - form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - form->label(t('End Date'), 'to') ?> - form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?> + form->date(t('End date'), 'to', $values) ?>
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 @@ form->hidden('action', $values) ?> form->hidden('project_id', $values) ?> - form->label(t('Start Date'), 'from') ?> - form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - form->label(t('End Date'), 'to') ?> - form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> + form->date(t('Start date'), 'from', $values) ?> + form->date(t('End date'), 'to', $values) ?>
-
\ No newline at end of file + -- cgit v1.2.3