summaryrefslogtreecommitdiff
path: root/src/templates/edit.php
blob: c1b7bda56c35df4f7d9199d033efc1b301220833 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Bookmarks</title>
    </head>
    <body>
        <a href="/">Back</a>
        <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>
</html>