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/tasklink/create.php | |
parent | 65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff) |
Helpers refactoring
Diffstat (limited to 'app/Template/tasklink/create.php')
-rw-r--r-- | app/Template/tasklink/create.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php index 3394271a..749f2968 100644 --- a/app/Template/tasklink/create.php +++ b/app/Template/tasklink/create.php @@ -2,17 +2,17 @@ <h2><?= t('Add a new link') ?></h2> </div> -<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off"> +<form action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off"> - <?= $this->formCsrf() ?> - <?= $this->formHidden('task_id', array('task_id' => $task['id'])) ?> - <?= $this->formHidden('opposite_task_id', $values) ?> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> + <?= $this->form->hidden('opposite_task_id', $values) ?> - <?= $this->formLabel(t('Label'), 'link_id') ?> - <?= $this->formSelect('link_id', $labels, $values, $errors) ?> + <?= $this->form->label(t('Label'), 'link_id') ?> + <?= $this->form->select('link_id', $labels, $values, $errors) ?> - <?= $this->formLabel(t('Task'), 'title') ?> - <?= $this->formText( + <?= $this->form->label(t('Task'), 'title') ?> + <?= $this->form->text( 'title', $values, $errors, @@ -21,7 +21,7 @@ 'placeholder="'.t('Start to type task title...').'"', 'title="'.t('Start to type task title...').'"', 'data-dst-field="opposite_task_id"', - 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + 'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', ), 'task-autocomplete') ?> @@ -29,9 +29,9 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> <?php if (isset($ajax)): ?> - <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> <?php else: ?> - <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php endif ?> </div> </form>
\ No newline at end of file |