Replace all date fields by helper

This commit is contained in:
Frederic Guillot
2016-08-31 21:21:09 -04:00
parent 3861e90336
commit 0cb717f440
9 changed files with 17 additions and 44 deletions

View File

@@ -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>