summaryrefslogtreecommitdiff
path: root/app/Template/timetable_extra
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
commiteeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch)
tree511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Template/timetable_extra
parent65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff)
Helpers refactoring
Diffstat (limited to 'app/Template/timetable_extra')
-rw-r--r--app/Template/timetable_extra/index.php26
-rw-r--r--app/Template/timetable_extra/remove.php4
2 files changed, 15 insertions, 15 deletions
diff --git a/app/Template/timetable_extra/index.php b/app/Template/timetable_extra/index.php
index a0a55bec..d3224ae6 100644
--- a/app/Template/timetable_extra/index.php
+++ b/app/Template/timetable_extra/index.php
@@ -21,7 +21,7 @@
<td><?= $slot['end'] ?></td>
<td><?= $this->e($slot['comment']) ?></td>
<td>
- <?= $this->a(t('Remove'), 'timetableextra', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'timetableextra', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -31,24 +31,24 @@
<?php endif ?>
-<form method="post" action="<?= $this->u('timetableextra', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('timetableextra', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Day'), 'date') ?>
- <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+ <?= $this->form->label(t('Day'), 'date') ?>
+ <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
- <?= $this->formCheckbox('all_day', t('All day'), 1) ?>
+ <?= $this->form->checkbox('all_day', t('All day'), 1) ?>
- <?= $this->formLabel(t('Start time'), 'start') ?>
- <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('Start time'), 'start') ?>
+ <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('End time'), 'end') ?>
- <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('End time'), 'end') ?>
+ <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $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"/>
diff --git a/app/Template/timetable_extra/remove.php b/app/Template/timetable_extra/remove.php
index d8dc5b3b..fc907438 100644
--- a/app/Template/timetable_extra/remove.php
+++ b/app/Template/timetable_extra/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'timetableextra', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'timetableextra', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file