design update, div TODOs added

This commit is contained in:
2026-02-12 10:15:46 +01:00
parent 985fc05aa1
commit be3bbf01f2
6 changed files with 219 additions and 4 deletions

View File

@@ -22,6 +22,8 @@ if ($floorId > 0) {
$isEdit = !empty($floor);
$pageTitle = $isEdit ? "Stockwerk bearbeiten: " . htmlspecialchars($floor['name']) : "Neues Stockwerk";
$buildings = $sql->get("SELECT id, name FROM buildings ORDER BY name", "", []);
$prefillBuildingId = (int)($_GET['building_id'] ?? 0);
$selectedBuildingId = $floor['building_id'] ?? $prefillBuildingId;
$existingSvgContent = '';
if (!empty($floor['svg_path'])) {
@@ -73,7 +75,7 @@ if (!empty($floor['svg_path'])) {
<option value="">- Wählen -</option>
<?php foreach ($buildings as $building): ?>
<option value="<?php echo (int)$building['id']; ?>"
<?php echo ((int)($floor['building_id'] ?? 0) === (int)$building['id']) ? 'selected' : ''; ?>>
<?php echo ((int)$selectedBuildingId === (int)$building['id']) ? 'selected' : ''; ?>>
<?php echo htmlspecialchars($building['name']); ?>
</option>
<?php endforeach; ?>