div TODOs

This commit is contained in:
2026-02-16 13:56:01 +01:00
parent 12141485ae
commit 510a248edb
36 changed files with 1500 additions and 1533 deletions

View File

@@ -42,14 +42,14 @@ $pageTitle = $isEdit ? "Standort bearbeiten: " . htmlspecialchars($location['nam
<div class="form-group">
<label for="name">Name <span class="required">*</span></label>
<input type="text" id="name" name="name" required
value="<?php echo htmlspecialchars($location['name'] ?? ''); ?>"
value="<?php echo htmlspecialchars($location['name'] ?? '); ?>"
placeholder="z.B. Hauptgebäude, Campus A, Außenstelle Berlin">
</div>
<div class="form-group">
<label for="comment">Beschreibung</label>
<textarea id="comment" name="comment" rows="3"
placeholder="Adresse, Kontaktinformationen, Besonderheiten"><?php echo htmlspecialchars($location['comment'] ?? ''); ?></textarea>
placeholder="Adresse, Kontaktinformationen, Besonderheiten"><?php echo htmlspecialchars($location['comment'] ?? '); ?></textarea>
</div>
</fieldset>
@@ -153,9 +153,24 @@ $pageTitle = $isEdit ? "Standort bearbeiten: " . htmlspecialchars($location['nam
<script>
function confirmDelete(id) {
if (confirm('Diesen Standort wirklich löschen? Alle Gebäude werden gelöscht.')) {
// TODO: AJAX-Delete implementieren
alert('Löschen noch nicht implementiert');
if (confirm('Diesen Standort wirklich loeschen? Alle Gebaeude werden geloescht.')) {
fetch('?module=locations&action=delete', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
body: 'id=' + encodeURIComponent(id)
})
.then((res) => res.json())
.then((data) => {
if (data && data.success) {
window.location.href = '?module=locations&action=list';
return;
}
alert((data && data.message) ? data.message : 'Loeschen fehlgeschlagen');
})
.catch(() => {
alert('Loeschen fehlgeschlagen');
});
}
}
</script>