Template helpers refactoring

This commit is contained in:
Frédéric Guillot
2014-12-28 11:28:50 -05:00
parent 88d84073ae
commit 34d7450d3c
155 changed files with 1605 additions and 1609 deletions

View File

@@ -1,15 +1,15 @@
<form method="post" action="<?= Helper\u('task', 'time', array('task_id' => $values['id'])) ?>" class="form-inline task-time-form" autocomplete="off">
<?= Helper\form_csrf() ?>
<?= Helper\form_hidden('id', $values) ?>
<form method="post" action="<?= $this->u('task', 'time', array('task_id' => $values['id'])) ?>" class="form-inline task-time-form" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->formHidden('id', $values) ?>
<?= Helper\form_label(t('Start date'), 'date_started') ?>
<?= Helper\form_text('date_started', $values, array(), array('placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?>
<?= $this->formLabel(t('Start date'), 'date_started') ?>
<?= $this->formText('date_started', $values, array(), array('placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
<?= Helper\form_label(t('Time estimated'), 'time_estimated') ?>
<?= Helper\form_numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?>
<?= $this->formLabel(t('Time estimated'), 'time_estimated') ?>
<?= $this->formNumeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?>
<?= Helper\form_label(t('Time spent'), 'time_spent') ?>
<?= Helper\form_numeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?>
<?= $this->formLabel(t('Time spent'), 'time_spent') ?>
<?= $this->formNumeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?>
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</form>