edit.php
- Pfad:
src/View/tasks/edit.php - Namespace: -
- Zeilen: 44 | Größe: 1,704 Bytes
- Geändert: 2025-12-27 12:26:11 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Versionen 1
-
v1
2025-12-27 12:26 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Write-Operation
Code
<?php
declare(strict_types=1);
// @responsibility: View für Task bearbeiten mit HTMX-Formular
ob_start();
?>
<nav class="breadcrumb">
<a href="/tasks">Tasks</a> » <a href="/tasks/<?= $task['id'] ?>">Task #<?= $task['id'] ?></a> » Bearbeiten
</nav>
<h1>Task bearbeiten</h1>
<form id="task-form" class="form" style="max-width: 600px;"
hx-put="/api/v1/tasks/<?= $task['id'] ?>"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-disabled-elt="button[type=submit]">
<div class="form-group">
<label for="title">Titel *</label>
<input type="text" id="title" name="title" class="form-input" value="<?= htmlspecialchars($task['title']) ?>" required>
</div>
<div class="form-group">
<label for="description">Beschreibung</label>
<textarea id="description" name="description" class="form-textarea" rows="4"><?= htmlspecialchars($task['description'] ?? '') ?></textarea>
</div>
<div class="form-group">
<label for="type">Typ</label>
<select id="type" name="type" class="form-select">
<option value="human_task" <?= $task['type'] === 'human_task' ? 'selected' : '' ?>>Mensch</option>
<option value="ai_task" <?= $task['type'] === 'ai_task' ? 'selected' : '' ?>>KI</option>
<option value="mixed" <?= $task['type'] === 'mixed' ? 'selected' : '' ?>>Gemischt</option>
</select>
</div>
<div class="form-actions">
<button type="submit" class="btn btn--primary">Speichern</button>
<a href="/tasks/<?= $task['id'] ?>" class="btn">Abbrechen</a>
</div>
</form>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>