.
This commit is contained in:
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="dataSourceStorageLocal" created-in="IU-261.25134.95">
|
||||
<component name="dataSourceStorageLocal" created-in="IU-253.32098.101">
|
||||
<data-source name="articles" uuid="315cb5c9-2b0f-435b-b602-59823b160908">
|
||||
<database-info product="SQLite" version="3.51.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.51.1.0" dbms="SQLITE" exact-version="3.51.1" exact-driver-version="3.51">
|
||||
<identifier-quote-string>"</identifier-quote-string>
|
||||
|
||||
+12
-10
@@ -81,10 +81,12 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
|
||||
<br>
|
||||
|
||||
<form action="php/controller/deleteAccount-controller.php" method="POST">
|
||||
<form action="php/controller/deleteAccount-controller.php"
|
||||
method="POST"
|
||||
class="confirm-delete-account">
|
||||
|
||||
<button type="submit"
|
||||
class="button"
|
||||
onclick="return confirm('Möchtest du deinen Account und alle deine Beiträge wirklich unwiderruflich löschen?');">
|
||||
class="button">
|
||||
Account löschen
|
||||
</button>
|
||||
</form>
|
||||
@@ -154,14 +156,16 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
Bearbeiten
|
||||
</a>
|
||||
|
||||
<form action="php/controller/deleteArticle-controller.php" method="POST">
|
||||
<form action="php/controller/deleteArticle-controller.php"
|
||||
method="POST"
|
||||
class="confirm-delete-article">
|
||||
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
value="<?php echo htmlspecialchars($userArticle->getID()); ?>">
|
||||
|
||||
<button type="submit"
|
||||
class="button"
|
||||
onclick="return confirm('Möchtest du diesen Artikel wirklich löschen?');">
|
||||
class="button">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
@@ -172,11 +176,9 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
|
||||
<p>Du hast noch keine Beiträge erstellt.</p>
|
||||
|
||||
<button type="button"
|
||||
class="button"
|
||||
onclick="window.location.href='index.php?pfad=createArticle';">
|
||||
<a href="index.php?pfad=createArticle" class="button">
|
||||
Beitrag erstellen!
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@ include_once "php/controller/index-controller.php";
|
||||
<link rel="stylesheet" href="css/showCategory.css">
|
||||
|
||||
<script src="js/comments.js" defer></script>
|
||||
<script src="js/profile.js" defer></script>
|
||||
<script src="js/editor.js" async></script>
|
||||
<script src="js/search-results.js" async></script>
|
||||
<script src="js/showCategory.js" async></script>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const deleteAccountForm = document.querySelector(".confirm-delete-account");
|
||||
|
||||
if (deleteAccountForm) {
|
||||
deleteAccountForm.addEventListener("submit", function (event) {
|
||||
|
||||
if (!confirm("Möchtest du deinen Account und alle deine Beiträge wirklich unwiderruflich löschen?")) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
const deleteArticleForms = document.querySelectorAll(".confirm-delete-article");
|
||||
|
||||
deleteArticleForms.forEach(function (form) {
|
||||
|
||||
form.addEventListener("submit", function (event) {
|
||||
|
||||
if (!confirm("Möchtest du diesen Artikel wirklich löschen?")) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user