fix bugs
This commit is contained in:
+4
-2
@@ -18,6 +18,8 @@
|
|||||||
$taskId = $row["id"];
|
$taskId = $row["id"];
|
||||||
$taskName = $row["task_name"];
|
$taskName = $row["task_name"];
|
||||||
$completed = $row["completed"] ? "checked" : "";
|
$completed = $row["completed"] ? "checked" : "";
|
||||||
|
|
||||||
|
echo "<li><input type='checkbox' $completed onchange='updateTask($taskId, this.checked)'> $taskName</li>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "Aucune tâche trouvée.";
|
echo "Aucune tâche trouvée.";
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
|
|
||||||
<!-- Liste de tâches -->
|
<!-- Liste de tâches -->
|
||||||
<h2>Tâches en cours</h2>
|
<h2>Tâches en cours</h2>
|
||||||
<script>
|
<!-- <script>
|
||||||
for(i = 0; i < <?php echo $row ?>; i++){
|
for(i = 0; i < <?php echo $row ?>; i++){
|
||||||
container.innerHTML(
|
container.innerHTML(
|
||||||
<div class="checkbox-wrapper">
|
<div class="checkbox-wrapper">
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>-->
|
||||||
<!-- Script pour mettre à jour l'état d'une tâche -->
|
<!-- Script pour mettre à jour l'état d'une tâche -->
|
||||||
<script>
|
<script>
|
||||||
function updateTask(taskId, completed) {
|
function updateTask(taskId, completed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user