diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-24 16:02:25 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-24 16:02:25 -0400 |
commit | eeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch) | |
tree | 511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Template/category | |
parent | 65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff) |
Helpers refactoring
Diffstat (limited to 'app/Template/category')
-rw-r--r-- | app/Template/category/edit.php | 16 | ||||
-rw-r--r-- | app/Template/category/index.php | 14 | ||||
-rw-r--r-- | app/Template/category/remove.php | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php index 0d4b0f6f..7d40fe65 100644 --- a/app/Template/category/edit.php +++ b/app/Template/category/edit.php @@ -2,21 +2,21 @@ <h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2> </div> -<form method="post" action="<?= $this->u('category', 'update', array('project_id' => $project['id'], 'category_id' => $values['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('category', 'update', array('project_id' => $project['id'], 'category_id' => $values['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('Category Name'), 'name') ?> - <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <?= $this->form->label(t('Category Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - <?= $this->formLabel(t('Description'), 'description') ?> + <?= $this->form->label(t('Description'), 'description') ?> <div class="form-tabs"> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors) ?> + <?= $this->form->textarea('description', $values, $errors) ?> </div> <div class="preview-area"> <div class="markdown"></div> diff --git a/app/Template/category/index.php b/app/Template/category/index.php index d5b50af4..dba537d0 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -13,10 +13,10 @@ <td> <ul> <li> - <?= $this->a(t('Edit'), 'category', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> + <?= $this->url->link(t('Edit'), 'category', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> <li> - <?= $this->a(t('Remove'), 'category', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> + <?= $this->url->link(t('Remove'), 'category', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> </ul> </td> @@ -28,13 +28,13 @@ <div class="page-header"> <h2><?= t('Add a new category') ?></h2> </div> -<form method="post" action="<?= $this->u('category', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('category', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> - <?= $this->formHidden('project_id', $values) ?> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> - <?= $this->formLabel(t('Category Name'), 'name') ?> - <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <?= $this->form->label(t('Category Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/category/remove.php b/app/Template/category/remove.php index 8875b232..ce589785 100644 --- a/app/Template/category/remove.php +++ b/app/Template/category/remove.php @@ -9,9 +9,9 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'category', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'category', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> <?= t('or') ?> - <?= $this->a(t('cancel'), 'category', 'index', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('cancel'), 'category', 'index', array('project_id' => $project['id'])) ?> </div> </div> </section>
\ No newline at end of file |