Website Summary Files Commits Branches @commit @diff @stats
path: root / views
diff options
context:
space:
mode:
Commit229266ebc87133e3f81d19d5e1750fa8419b5b0f (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-01-26 16:46:05 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-01-26 16:46:05 +0200
Files2765ea5b448618a4680562d4fbf11cef0c7478b0 /views
nowayforward_human-229266ebc87133e3f81d19d5e1750fa8419b5b0f.tar
nowayforward_human-229266ebc87133e3f81d19d5e1750fa8419b5b0f.tar.gz
nowayforward_human-229266ebc87133e3f81d19d5e1750fa8419b5b0f.zip
Parent6596a76c856e2ddfccbc5f03d12a524fdf80e1bf (diff)
feat(archive): Set the user when someone logged-in archives
1 files changed, 10 insertions, 0 deletions
-rw-r--r--views/archive/index.php10
diff --git a/views/archive/index.php b/views/archive/index.php
index 2c784de..7d41890 100644
--- a/views/archive/index.php
+++ b/views/archive/index.php
@@ -16,8 +16,13 @@
<form action="#" method="POST">
<input type="hidden" name="page_url" value="<?= $url ?>">
+ <input id="token" type="hidden" name="token" value="">
<input type="submit" value="Archive Now!">
</form>
+ <script type="text/javascript">
+ const tokenInput = document.getElementById('token');
+ tokenInput.value = sessionStorage.getItem('token');
+ </script>
<!-- Button to add to list -->
<!-- Button to delete -->
@@ -54,7 +59,12 @@
<h2>"<?= $url ?>" hasn't been archived yet!</h2>
<form action="#" method="POST">
<input type="hidden" name="page_url" value="<?= $url ?>">
+ <input id="token" type="hidden" name="token" value="">
<input type="submit" value="Archive Now!">
</form>
+ <script type="text/javascript">
+ const tokenInput = document.getElementById('token');
+ tokenInput.value = sessionStorage.getItem('token');
+ </script>
<?php endif; ?>