From 3b36b83b407ccc24802311db84405afcfb9350e9 Mon Sep 17 00:00:00 2001 From: Tobias Feigel Date: Sun, 13 Jul 2025 17:57:40 +0200 Subject: [PATCH] feat: improve Kontaktformular error handling and enhance UI feedback Updated error message formatting for more user-friendly feedback. Enhanced UI by restructuring success and error notifications with improved styles and layout. Added a `name` attribute to the submit button for better form submission handling. Adjusted text field IDs and names for consistency. --- site/controllers/kontakt.php | 2 +- site/templates/kontakt.php | 34 +++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/site/controllers/kontakt.php b/site/controllers/kontakt.php index 69f4779..4c6b5e4 100644 --- a/site/controllers/kontakt.php +++ b/site/controllers/kontakt.php @@ -49,7 +49,7 @@ } catch (Exception $error) { if (option('debug')): - $alert['error'] = 'Beim Versenden ist ein Fehler aufgetreten: ' . $error->getMessage() . ''; + $alert['error'] = 'Beim Versenden ist ein Fehler aufgetreten:
' . $error->getMessage() . ''; else: $alert['error'] = 'Beim Versenden ist ein Fehler aufgetreten!'; endif; diff --git a/site/templates/kontakt.php b/site/templates/kontakt.php index 6ff5796..5344033 100644 --- a/site/templates/kontakt.php +++ b/site/templates/kontakt.php @@ -82,28 +82,36 @@
- +
- + ' . esc($alert['text']) . '' : '' ?>
- + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
- - -
-

-
- - -
- - +