summaryrefslogtreecommitdiff
path: root/src/templates/form_fields.php
blob: 3b58adb21785d07a0db39bf2e53d6a1a988df9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<label>Task<input type="text" name="task" maxlength="256" value="<?= htmlspecialchars($old->get('task', $todo->task)); ?>"></label>
<?php if ($errors->has('task')) { ?>
    <p><?= htmlentities(implode(', ', $errors->get('task'))); ?></p>
<?php } ?>
<label>Description<textarea name="description" maxlength="512" rows="8"><?= htmlspecialchars($old->get('description', $todo->description)); ?></textarea></label>
<?php if ($errors->has('description')) { ?>
    <p><?= htmlentities(implode(', ', $errors->get('description'))); ?></p>
<?php } ?>
<label>Tag<input type="text" name="tag" maxlength="16" value="<?= htmlspecialchars($old->get('tag', $todo->tag)); ?>"></label>
<?php if ($errors->has('tag')) { ?>
    <p><?= htmlentities(implode(', ', $errors->get('tag'))); ?></p>
<?php } ?>