Helpers refactoring

This commit is contained in:
Frederic Guillot
2015-05-24 16:02:25 -04:00
parent 65e9e5d1be
commit eeac2329ba
239 changed files with 2441 additions and 2337 deletions

View File

@@ -1,8 +1,8 @@
<div class="page-header">
<h2><?= t('Budget') ?></h2>
<ul>
<li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
<li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
<li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
<li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
</ul>
</div>
@@ -20,7 +20,7 @@
<td><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td>
<td><?= $this->e($line['comment']) ?></td>
<td>
<?= $this->a(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
<?= $this->url->link(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -29,21 +29,21 @@
<h3><?= t('New budget line') ?></h3>
<?php endif ?>
<form method="post" action="<?= $this->u('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<form method="post" action="<?= $this->url->href('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->form->csrf() ?>
<?= $this->formHidden('id', $values) ?>
<?= $this->formHidden('project_id', $values) ?>
<?= $this->form->hidden('id', $values) ?>
<?= $this->form->hidden('project_id', $values) ?>
<?= $this->formLabel(t('Amount'), 'amount') ?>
<?= $this->formText('amount', $values, $errors, array('required'), 'form-numeric') ?>
<?= $this->form->label(t('Amount'), 'amount') ?>
<?= $this->form->text('amount', $values, $errors, array('required'), 'form-numeric') ?>
<?= $this->formLabel(t('Date'), 'date') ?>
<?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
<?= $this->form->label(t('Date'), 'date') ?>
<?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
<?= $this->formLabel(t('Comment'), 'comment') ?>
<?= $this->formText('comment', $values, $errors) ?>
<?= $this->form->label(t('Comment'), 'comment') ?>
<?= $this->form->text('comment', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>