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

@@ -2,10 +2,10 @@
<h2><?= t('Edit the description') ?></h2>
</div>
<form method="post" action="<?= Helper\u('task', 'description', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off">
<form method="post" action="<?= $this->u('task', 'description', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off">
<?= Helper\form_csrf() ?>
<?= Helper\form_hidden('id', $values) ?>
<?= $this->formCsrf() ?>
<?= $this->formHidden('id', $values) ?>
<div class="form-tabs">
<ul class="form-tabs-nav">
@@ -17,7 +17,7 @@
</li>
</ul>
<div class="write-area">
<?= Helper\form_textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?>
<?= $this->formTextarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?>
</div>
<div class="preview-area">
<div class="markdown"></div>
@@ -30,9 +30,9 @@
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
<?php if ($ajax): ?>
<?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
<?php else: ?>
<?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
<?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
<?php endif ?>
</div>
</form>