{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/content\/edit.php"
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/content\/edit.php",
"content": "<?php ob_start(); ?>\n\n<nav class=\"breadcrumb\">\n <a href=\"\/content\">Content Studio<\/a> » <a href=\"\/content\/<?= $order['id'] ?>\">Auftrag #<?= $order['id'] ?><\/a> » Bearbeiten\n<\/nav>\n\n<h1>Auftrag bearbeiten<\/h1>\n\n<form id=\"order-form\" class=\"form\" style=\"max-width: 600px;\">\n <div class=\"form-group\">\n <label for=\"title\">Titel *<\/label>\n <input type=\"text\" id=\"title\" name=\"title\" class=\"form-input\" required\n value=\"<?= htmlspecialchars($order['title']) ?>\">\n <\/div>\n <div class=\"form-group\">\n <label for=\"briefing\">Briefing *<\/label>\n <textarea id=\"briefing\" name=\"briefing\" class=\"form-textarea\" rows=\"6\" required><?= htmlspecialchars($order['briefing']) ?><\/textarea>\n <\/div>\n <div class=\"form-group\">\n <label for=\"author_profile_id\">Autorenprofil<\/label>\n <select id=\"author_profile_id\" name=\"author_profile_id\" class=\"form-select\">\n <option value=\"\">-- Kein Profil --<\/option>\n <?php foreach ($profiles ?? [] as $profile): ?>\n <option value=\"<?= $profile['id'] ?>\" <?= ($order['author_profile_id'] ?? '') == $profile['id'] ? 'selected' : '' ?>><?= htmlspecialchars($profile['name']) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <div class=\"form-group\">\n <label for=\"contract_id\">Contract<\/label>\n <select id=\"contract_id\" name=\"contract_id\" class=\"form-select\">\n <option value=\"\">-- Kein Contract --<\/option>\n <?php foreach ($contracts ?? [] as $contract): ?>\n <option value=\"<?= $contract['id'] ?>\" <?= ($order['contract_id'] ?? '') == $contract['id'] ? 'selected' : '' ?>><?= htmlspecialchars($contract['name']) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <div class=\"form-group\">\n <label for=\"structure_id\">Struktur<\/label>\n <select id=\"structure_id\" name=\"structure_id\" class=\"form-select\">\n <option value=\"\">-- Keine Struktur --<\/option>\n <?php foreach ($structures ?? [] as $structure): ?>\n <option value=\"<?= $structure['id'] ?>\" <?= ($order['structure_id'] ?? '') == $structure['id'] ? 'selected' : '' ?>><?= htmlspecialchars($structure['name']) ?><\/option>\n <?php endforeach; ?>\n <\/select>\n <\/div>\n <div class=\"form-actions\">\n <button type=\"submit\" class=\"btn btn--primary\">Speichern<\/button>\n <a href=\"\/content\/<?= $order['id'] ?>\" class=\"btn\">Abbrechen<\/a>\n <\/div>\n<\/form>\n<div id=\"form-message\" class=\"form-message\"><\/div>\n\n<script>\ndocument.getElementById('order-form').addEventListener('submit', async (e) => {\n e.preventDefault();\n const form = e.target;\n const formData = new FormData(form);\n const data = Object.fromEntries(formData.entries());\n\n const response = await fetch('\/api\/v1\/content\/<?= $order['id'] ?>', {\n method: 'PUT',\n headers: {'Content-Type': 'application\/json'},\n body: JSON.stringify(data)\n });\n const result = await response.json();\n\n if (result.success) {\n window.location.href = '\/content\/<?= $order['id'] ?>';\n } else {\n document.getElementById('form-message').innerHTML =\n '<span class=\"form-message--error\">Fehler: ' + result.error + '<\/span>';\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>\n",
"numLines": 78,
"startLine": 1,
"totalLines": 78
}
}
}