diff options
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> |