summaryrefslogtreecommitdiff
path: root/src/templates/form_fields.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/form_fields.php')
-rw-r--r--src/templates/form_fields.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/templates/form_fields.php b/src/templates/form_fields.php
new file mode 100644
index 0000000..cfacfda
--- /dev/null
+++ b/src/templates/form_fields.php
@@ -0,0 +1,12 @@
+<input type="text" name="url" maxlength="512" value="<?php echo $old->get('url', $bookmark->url); ?>" autofocus><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 $old->get('title', $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 $old->get('tag', $bookmark->tag); ?>"><br>
+<?php if ($errors->has('tag')) { ?>
+ <p><?php echo implode(', ', $errors->get('tag')); ?></p>
+<?php } ?>