Korrektur

This commit is contained in:
2026-07-18 17:54:30 +02:00
parent 4f95a3d423
commit 8c961a56ce
4 changed files with 42 additions and 11 deletions
+34 -7
View File
@@ -92,12 +92,39 @@ document.addEventListener("DOMContentLoaded", function () {
commentElement.classList.add("comment-reply");
commentElement.innerHTML = `
<p>
<strong>${escapeHtml(data.author)}</strong>
<span>${escapeHtml(data.created)}</span>
</p>
<p>${escapeHtml(data.content).replace(/\n/g, "<br>")}</p>
`;
<p>
<strong>${escapeHtml(data.author)}</strong>
<span>${escapeHtml(data.created)}</span>
</p>
<p>${escapeHtml(data.content).replace(/\n/g, "<br>")}</p>
<form
method="post"
action="index.php?pfad=deleteComment"
class="delete-comment-form"
>
<input
type="hidden"
name="comment_id"
value="${escapeHtml(data.commentId)}"
>
<input
type="hidden"
name="article_id"
value="${escapeHtml(formData.get("article_id"))}"
>
<button
type="submit"
class="delete-comment-button"
onclick="return confirm('Möchtest du diesen Kommentar wirklich löschen?');"
>
Kommentar löschen
</button>
</form>
`;
const parentReplies = commentsList.querySelector(
`.comment-item[data-comment-id="${parentCommentId}"] .comment-replies`
@@ -119,7 +146,7 @@ document.addEventListener("DOMContentLoaded", function () {
<form
method="post"
action="php/controller/deleteComment-controller.php"
action="index.php?pfad=deleteComment"
class="delete-comment-form"
>
<input