diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 11:28:50 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 11:28:50 -0500 |
commit | 34d7450d3c13342715e90ec21bceaa13e1baa876 (patch) | |
tree | a2d8f2f22ad3fe9b56f01fe2db0357f9b963e660 /app/Template/task/edit.php | |
parent | 88d84073aecbe8bdc5f10825b6d7ca6b81c5f7b1 (diff) |
Template helpers refactoring
Diffstat (limited to 'app/Template/task/edit.php')
-rw-r--r-- | app/Template/task/edit.php | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/app/Template/task/edit.php b/app/Template/task/edit.php index 6f136cb9..ef1a9dfa 100644 --- a/app/Template/task/edit.php +++ b/app/Template/task/edit.php @@ -2,16 +2,16 @@ <h2><?= t('Edit a task') ?></h2> </div> <section id="task-section"> -<form method="post" action="<?= Helper\u('task', 'update', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form method="post" action="<?= $this->u('task', 'update', array('task_id' => $task['id'], 'ajax' => $ajax)) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> + <?= $this->formCsrf() ?> <div class="form-column"> - <?= Helper\form_label(t('Title'), 'title') ?> - <?= Helper\form_text('title', $values, $errors, array('required')) ?><br/> + <?= $this->formLabel(t('Title'), 'title') ?> + <?= $this->formText('title', $values, $errors, array('required')) ?><br/> - <?= Helper\form_label(t('Description'), 'description') ?> + <?= $this->formLabel(t('Description'), 'description') ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -23,7 +23,7 @@ </li> </ul> <div class="write-area"> - <?= Helper\form_textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> + <?= $this->formTextarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -35,23 +35,23 @@ </div> <div class="form-column"> - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> + <?= $this->formHidden('id', $values) ?> + <?= $this->formHidden('project_id', $values) ?> - <?= Helper\form_label(t('Assignee'), 'owner_id') ?> - <?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/> + <?= $this->formLabel(t('Assignee'), 'owner_id') ?> + <?= $this->formSelect('owner_id', $users_list, $values, $errors) ?><br/> - <?= Helper\form_label(t('Category'), 'category_id') ?> - <?= Helper\form_select('category_id', $categories_list, $values, $errors) ?><br/> + <?= $this->formLabel(t('Category'), 'category_id') ?> + <?= $this->formSelect('category_id', $categories_list, $values, $errors) ?><br/> - <?= Helper\form_label(t('Color'), 'color_id') ?> - <?= Helper\form_select('color_id', $colors_list, $values, $errors) ?><br/> + <?= $this->formLabel(t('Color'), 'color_id') ?> + <?= $this->formSelect('color_id', $colors_list, $values, $errors) ?><br/> - <?= Helper\form_label(t('Complexity'), 'score') ?> - <?= Helper\form_number('score', $values, $errors) ?><br/> + <?= $this->formLabel(t('Complexity'), 'score') ?> + <?= $this->formNumber('score', $values, $errors) ?><br/> - <?= Helper\form_label(t('Due Date'), 'date_due') ?> - <?= Helper\form_text('date_due', $values, $errors, array('placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/> + <?= $this->formLabel(t('Due Date'), 'date_due') ?> + <?= $this->formText('date_due', $values, $errors, array('placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> </div> @@ -59,9 +59,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> |