aboutsummaryrefslogtreecommitdiff
path: root/views/profile/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/profile/index.php')
-rw-r--r--views/profile/index.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/views/profile/index.php b/views/profile/index.php
index e4015e9..2c3cb5e 100644
--- a/views/profile/index.php
+++ b/views/profile/index.php
@@ -29,14 +29,23 @@
<span class="float-right"><?= Database\User::fromDBuid($page->RequesterUID)->Username ?></span>
</div>
</section>
- <?php if (false): # If user logged-in ?>
- <section>
- <span><!-- Add to list button --></span>
- <span><!-- Delete (when admin) button --></span>
- <section>
- <?php endif; ?>
+ <section name="itemButton" hidden>
+ <form action="/list/update" method="GET">
+ <input type="hidden" name="wid" value="<?= $page->WID ?>">
+ <input type="submit" value="+">
+ </form>
+ <span><!-- Delete (when admin) button --></span>
+ </section>
</section>
<?php endforeach; ?>
+ <script type="text/javascript">
+ function showButtons() {
+ for (buttonset of document.getElementsByName('itemButton')) {
+ buttonset.hidden = false;
+ }
+ }
+ authenticated(showButtons);
+ </script>
<?php else: ?>
<h2>User "<?= $username ?>" doesn't exist!</h2>
<?php endif; ?>