diff options
| author | Syndamia <kamen@syndamia.com> | 2025-01-26 18:53:18 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-01-26 22:21:31 +0200 |
| commit | 77708ef5b9559e6598f5acf7d2b30dbdbd037d81 (patch) | |
| tree | 88b28f7dd4464537138cc5c7b2fce27013117155 /views/newlist/index.php | |
| parent | 18677f1e23ac097d859cde1030ce6149585f5574 (diff) | |
| download | nowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.tar nowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.tar.gz nowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.zip | |
feat: Create page for creating lists
Diffstat (limited to 'views/newlist/index.php')
| -rw-r--r-- | views/newlist/index.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/views/newlist/index.php b/views/newlist/index.php new file mode 100644 index 0000000..289c9da --- /dev/null +++ b/views/newlist/index.php @@ -0,0 +1,28 @@ +<script type="text/javascript"> + if (!sessionStorage.getItem('token')) { + window.location.href = '/login'; + } +</script> + +<h1>Create a new list</h1> + +<hr class="new-section"/> + +<form action="#" method="POST"> + <?php if (isset($list_status)): ?> + <?php if ($list_status !== ""): ?> + <p class="item error"><span> + <strong>Error:</strong> <?= $list_status ?> + </span></p> + <?php endif; ?> + <?php endif; ?> + + <input type="text" name="name" placeholder="List title" minlength="1"> + <textarea name="description" placeholder="Description"></textarea> + <input id="token" type="hidden" name="token" value=""> + <input type="submit" value="Login"> +</form> +<script type="text/javascript"> + const tokenInput = document.getElementById('token'); + tokenInput.value = sessionStorage.getItem('token'); +</script> |
