diff options
Diffstat (limited to 'src/templates/form_fields.php')
| -rw-r--r-- | src/templates/form_fields.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/templates/form_fields.php b/src/templates/form_fields.php new file mode 100644 index 0000000..505cf26 --- /dev/null +++ b/src/templates/form_fields.php @@ -0,0 +1,8 @@ +<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>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 } ?> |
