summaryrefslogtreecommitdiff
path: root/src/templates/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/edit.php')
-rw-r--r--src/templates/edit.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/templates/edit.php b/src/templates/edit.php
index d5f5a08..c1b7bda 100644
--- a/src/templates/edit.php
+++ b/src/templates/edit.php
@@ -10,8 +10,17 @@
<form action="/update" method="POST">
<input type="hidden" name="id" value="<?php echo $bookmark->id; ?>"/>
<input type="text" name="url" maxlength="512" autofocus value="<?php echo $bookmark->url; ?>"><br>
+ <?php if ($errors->has('url')) { ?>
+ <p><?php echo implode(', ', $errors->get('url')); ?></p>
+ <?php } ?>
<input type="text" name="title" maxlength="256" value="<?php echo $bookmark->title; ?>"><br>
+ <?php if ($errors->has('title')) { ?>
+ <p><?php echo implode(', ', $errors->get('title')); ?></p>
+ <?php } ?>
<input type="text" name="tag" maxlength="8" value="<?php echo $bookmark->tag; ?>"><br>
+ <?php if ($errors->has('tag')) { ?>
+ <p><?php echo implode(', ', $errors->get('tag')); ?></p>
+ <?php } ?>
<button type="submit">Update</button>
</form>
</body>