diff options
author | Jonas Kohl | 2024-09-13 19:57:43 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-09-13 19:57:43 +0200 |
commit | 93817fef3ead7cfd4fcde25ea2bcec02d01310a4 (patch) | |
tree | 60f6ab69bbf2360d7cc518023090b8bf61bfd5b1 /src/application/views/form_delete_post_confirm.php | |
parent | 086e2d2668784469ec114f6e6fd2b3dace3d7c3b (diff) |
A lot of changes again
Diffstat (limited to 'src/application/views/form_delete_post_confirm.php')
-rw-r--r-- | src/application/views/form_delete_post_confirm.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/application/views/form_delete_post_confirm.php b/src/application/views/form_delete_post_confirm.php index 9d04095..2dc417d 100644 --- a/src/application/views/form_delete_post_confirm.php +++ b/src/application/views/form_delete_post_confirm.php @@ -1,16 +1,21 @@ <div class="panel panel-danger"> <div class="panel-heading"> - <h3 class="panel-title">Do you want to delete your post?</h3> + <?php if ($postAuthor->id === $GLOBALS["currentUser"]->id): ?> + <h3 class="panel-title">Do you want to delete your post?</h3> + <?php else: ?> + <h3 class="panel-title">Do you want to delete <?= htmlentities($postAuthor->displayName) ?>'s post?</h3> + <?php endif; ?> </div> <div class="panel-body"> - Are you sure you want to delete the following post: - <div class="well"> - <?= renderPost($post->content); ?> - </div> + Are you sure you want to delete the following post:<br> + <?php _view("view_post", [ + ...$___PARAMS, + "hide_actions" => true + ]) ?> </div> <div class="panel-footer"> <div class="text-right"> - <form action="." method="get" class="seamless-inline"> + <form action=".#post-<?= htmlentities(urlencode($post->id)) ?>" 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> |