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/export/subtasks.php | 8 ++------ app/Template/export/summary.php | 8 ++------ app/Template/export/tasks.php | 8 ++------ app/Template/export/transitions.php | 9 +++------ 4 files changed, 9 insertions(+), 24 deletions(-) (limited to 'app/Template/export') 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