Backup #1642
| ID | 1642 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/View/semantic-explorer/entitaeten/new.php |
| Version | 2 |
| Typ |
modified |
| Größe | 2.1 KB |
| Hash | fbf637d934949968a2f41927a72012021f29c63f8509e4dd64e81850ae7e7c67 |
| Datum | 2025-12-27 09:45:54 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Campus KI</a> »
<a href="/semantic-explorer">Semantic Explorer</a> »
<a href="/semantic-explorer/entitaeten">Entitäten</a> » Neu
</nav>
<h1>Neue Entität</h1>
<form id="entity-form" class="form" style="max-width: 600px;">
<div class="form-group">
<label for="name">Name *</label>
<input type="text" id="name" name="name" class="form-input" required>
</div>
<div class="form-group">
<label for="type">Typ *</label>
<select id="type" name="type" class="form-select" required>
<?php foreach ($types as $t): ?>
<option value="<?= htmlspecialchars($t) ?>"><?= ucfirst(htmlspecialchars($t)) ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<label for="description">Beschreibung</label>
<textarea id="description" name="description" class="form-textarea" rows="4"></textarea>
</div>
<div class="form-actions">
<button type="submit" class="btn btn--primary">Entitaet erstellen</button>
<a href="/semantic-explorer/entitaeten" class="btn">Abbrechen</a>
</div>
</form>
<div id="form-message" class="form-message"></div>
<script>
document.getElementById('entity-form').addEventListener('submit', async (e) => {
e.preventDefault();
const form = e.target;
const formData = new FormData(form);
const data = Object.fromEntries(formData.entries());
const response = await fetch('/semantic-explorer/entitaeten', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(data)
});
const result = await response.json();
if (result.success) {
window.location.href = '/semantic-explorer/entitaeten/' + result.id;
} else {
document.getElementById('form-message').innerHTML =
'<span class="form-message--error">Fehler: ' + result.error + '</span>';
}
});
</script>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 1715 |
3 |
modified |
2.1 KB |
2025-12-27 12:28 |
| 1642 |
2 |
modified |
2.1 KB |
2025-12-27 09:45 |
| 1629 |
1 |
modified |
2.0 KB |
2025-12-27 09:44 |
← Zurück zur Übersicht