summaryrefslogtreecommitdiff
path: root/src/application/views/form_delete_post_confirm.php
diff options
context:
space:
mode:
authorJonas Kohl <git@jonaskohl.de>2024-09-12 19:49:17 +0200
committerJonas Kohl <git@jonaskohl.de>2024-09-12 19:49:17 +0200
commit086e2d2668784469ec114f6e6fd2b3dace3d7c3b (patch)
treeb9bacedb713501d88d24085940267a7c94e69b29 /src/application/views/form_delete_post_confirm.php
parent34b1b391d4b03659a96f868857c230002b351514 (diff)
Way more progress on forum
Diffstat (limited to 'src/application/views/form_delete_post_confirm.php')
-rw-r--r--src/application/views/form_delete_post_confirm.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/application/views/form_delete_post_confirm.php b/src/application/views/form_delete_post_confirm.php
new file mode 100644
index 0000000..9d04095
--- /dev/null
+++ b/src/application/views/form_delete_post_confirm.php
@@ -0,0 +1,25 @@
+<div class="panel panel-danger">
+ <div class="panel-heading">
+ <h3 class="panel-title">Do you want to delete your post?</h3>
+ </div>
+ <div class="panel-body">
+ Are you sure you want to delete the following post:
+ <div class="well">
+ <?= renderPost($post->content); ?>
+ </div>
+ </div>
+ <div class="panel-footer">
+ <div class="text-right">
+ <form action="." method="get" class="seamless-inline">
+ <input type="hidden" name="_action" value="viewtopic">
+ <input type="hidden" name="topic" value="<?= htmlentities($post->topicId) ?>">
+ <button class="btn btn-default">Keep my post</button>
+ </form>
+ <form action="?_action=deletepost" method="post" class="seamless-inline">
+ <input type="hidden" name="post" value="<?= htmlentities($post->id) ?>">
+ <input type="hidden" name="confirm" value="<?= htmlentities(base64_encode(hash("sha256", "confirm" . $post->id, true))); ?>">
+ <button class="btn btn-danger">Delete my post</button>
+ </form>
+ </div>
+ </div>
+</div>