Backup #2172

ID2172
Dateipfad/var/www/dev.campus.systemische-tools.de/src/View/content/edit.php
Version4
Typ modified
Größe3.0 KB
Hashc84632b0967c8b21f7f5ae2d1032db4ff43d390fc66091506a11e7103c852a6f
Datum2025-12-30 22:33:27
Geändert vonclaude-code-hook
GrundClaude Code Pre-Hook Backup vor Edit-Operation
Datei existiert Ja

Dateiinhalt

<?php

declare(strict_types=1);

// @responsibility: Edit-Formular für Content-Aufträge mit HTMX-Submit

ob_start();
?>

<nav class="breadcrumb">
    <a href="/content">Content Studio</a> &raquo; <a href="/content/<?= $order['id'] ?>">Auftrag #<?= $order['id'] ?></a> &raquo; Bearbeiten
</nav>

<h1>Auftrag bearbeiten</h1>

<form id="order-form" class="form" style="max-width: 600px;"
      hx-put="/api/v1/content/<?= $order['id'] ?>"
      hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
      hx-target="#form-message"
      hx-swap="innerHTML"
      hx-indicator="#save-btn"
      hx-disabled-elt="#save-btn">
    <div class="form-group">
        <label for="title">Titel *</label>
        <input type="text" id="title" name="title" class="form-input" required
               value="<?= htmlspecialchars($order['title']) ?>">
    </div>
    <div class="form-group">
        <label for="briefing">Briefing *</label>
        <textarea id="briefing" name="briefing" class="form-textarea" rows="6" required><?= htmlspecialchars($order['briefing']) ?></textarea>
    </div>
    <div class="form-group">
        <label for="author_profile_id">Autorenprofil</label>
        <select id="author_profile_id" name="author_profile_id" class="form-select">
            <option value="">-- Kein Profil --</option>
            <?php foreach ($profiles ?? [] as $profile): ?>
            <option value="<?= $profile['id'] ?>" <?= ($order['author_profile_id'] ?? '') == $profile['id'] ? 'selected' : '' ?>><?= htmlspecialchars($profile['name']) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="form-group">
        <label for="contract_id">Contract</label>
        <select id="contract_id" name="contract_id" class="form-select">
            <option value="">-- Kein Contract --</option>
            <?php foreach ($contracts ?? [] as $contract): ?>
            <option value="<?= $contract['id'] ?>" <?= ($order['contract_id'] ?? '') == $contract['id'] ? 'selected' : '' ?>><?= htmlspecialchars($contract['name']) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="form-group">
        <label for="structure_id">Struktur</label>
        <select id="structure_id" name="structure_id" class="form-select">
            <option value="">-- Keine Struktur --</option>
            <?php foreach ($structures ?? [] as $structure): ?>
            <option value="<?= $structure['id'] ?>" <?= ($order['structure_id'] ?? '') == $structure['id'] ? 'selected' : '' ?>><?= htmlspecialchars($structure['name']) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="form-actions">
        <button type="submit" id="save-btn" class="btn btn--primary">
            <span class="htmx-indicator">Speichern...</span>
            <span class="htmx-content">Speichern</span>
        </button>
        <a href="/content/<?= $order['id'] ?>" class="btn">Abbrechen</a>
    </div>
</form>
<div id="form-message" class="form-message"></div>

<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>

Vollständig herunterladen

Aktionen

Herunterladen

Andere Versionen dieser Datei

ID Version Typ Größe Datum
2186 11 modified 19.9 KB 2025-12-30 22:51
2184 10 modified 16.5 KB 2025-12-30 22:43
2183 9 modified 15.3 KB 2025-12-30 22:42
2182 8 modified 13.6 KB 2025-12-30 22:41
2178 7 modified 13.3 KB 2025-12-30 22:37
2177 6 modified 12.2 KB 2025-12-30 22:37
2176 5 modified 11.1 KB 2025-12-30 22:36
2172 4 modified 3.0 KB 2025-12-30 22:33
1679 3 modified 3.0 KB 2025-12-27 11:49
1678 2 modified 3.0 KB 2025-12-27 11:49
1673 1 modified 3.3 KB 2025-12-27 11:44

← Zurück zur Übersicht