From 5ab1feac4fe5ea13017885dd82d4a11a626368a3 Mon Sep 17 00:00:00 2001 From: jonas Date: Sun, 22 Oct 2023 05:28:11 +0200 Subject: [PATCH] small code cleanup --- calendar-month.php | 18 ++---------------- flow.php | 19 ++++--------------- php/html-components.php | 28 ++++++++++++++++++++++------ 3 files changed, 28 insertions(+), 37 deletions(-) diff --git a/calendar-month.php b/calendar-month.php index c73b716..da63ead 100644 --- a/calendar-month.php +++ b/calendar-month.php @@ -32,24 +32,10 @@ - -
-
-
- Es wurde keine ICS URL als GET Parameter übergeben.
-
- - -
-
-
- -
-
-
+ - + diff --git a/flow.php b/flow.php index 25d0c39..c667cae 100644 --- a/flow.php +++ b/flow.php @@ -19,21 +19,10 @@ - -
-
-
- Es wurde keine ICS URL als GET Parameter übergeben.
-
- - -
-
-
- -
-
-
+ + + + diff --git a/php/html-components.php b/php/html-components.php index cda5e5e..af069a8 100644 --- a/php/html-components.php +++ b/php/html-components.php @@ -30,7 +30,7 @@ function debug ($text) { /** * Echoes HTML code to display all collected error messages */ -function insertErrorsHtml() { +function echoErrorsHtml() { global $_ERRORS; if (count ($_ERRORS) == 0) return; @@ -61,13 +61,29 @@ function insertErrorsHtml() { } /** - * Hides the dialog box asking for an ICS URL if one - * was already specified by the user + * Shows a dialog box asking for an ICS URL if one + * was not specified by the user */ -function hideMissingIcsDialog () { +function echoIcsUrlDialog () { global $_GET; - if (isset ($_GET["ics_url"]) && $_GET["ics_url"] != "") { - echo "hidden"; + if (!isset ($_GET["ics_url"]) || $_GET["ics_url"] == "") { + echo ' + +
+
+
+ Es wurde keine ICS URL als GET Parameter übergeben.
+
+ + +
+
+
+ +
+
+
+ '; } } \ No newline at end of file