feat: implement package 1 session and validation feedback
- add session validation_errors bootstrap initialization - render global flash + validation messages in header - remove footer alert-based flash handling - persist structured validation errors across save handlers - mark NEXT_STEPS package 1 tasks as done
This commit is contained in:
@@ -37,6 +37,7 @@ if ($buildingId <= 0) {
|
||||
// Falls Fehler: zurück zum Edit-Formular
|
||||
if (!empty($errors)) {
|
||||
$_SESSION['error'] = implode(', ', $errors);
|
||||
$_SESSION['validation_errors'] = $errors;
|
||||
$redirectUrl = $floorId ? "?module=floors&action=edit&id=$floorId" : "?module=floors&action=edit";
|
||||
header("Location: $redirectUrl");
|
||||
exit;
|
||||
@@ -50,6 +51,7 @@ if ($floorSvgContent !== '') {
|
||||
$storedSvgPath = storeSvgEditorContent($sql, $floorId, $floorSvgContent);
|
||||
if ($storedSvgPath === false) {
|
||||
$_SESSION['error'] = "SVG aus dem Editor konnte nicht gespeichert werden";
|
||||
$_SESSION['validation_errors'] = ["SVG aus dem Editor konnte nicht gespeichert werden"];
|
||||
$redirectUrl = $floorId ? "?module=floors&action=edit&id=$floorId" : "?module=floors&action=edit";
|
||||
header("Location: $redirectUrl");
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user