diff --git a/includes/controller/event_config_controller.php b/includes/controller/event_config_controller.php index d08dc036..29a5b979 100644 --- a/includes/controller/event_config_controller.php +++ b/includes/controller/event_config_controller.php @@ -84,7 +84,7 @@ function event_config_edit_controller() { if ($result === false) engelsystem_error("Unable to update event config."); - engelsystem_log("Changed event config: $event_name, $event_welcome_msg, $buildup_start_date, $event_start_date, $event_end_date, $teardown_end_date"); + engelsystem_log("Changed event config: $event_name, $event_welcome_msg, " . date("Y-m-d", $buildup_start_date) . ", " . date("Y-m-d", $event_start_date) . ", " . date("Y-m-d", $event_end_date) . ", " . date("Y-m-d", $teardown_end_date)); success(_("Settings saved.")); redirect(page_link_to('admin_event_config')); } diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 1d8a34dd..8f4d24a4 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -16,6 +16,9 @@ function logout_title() { function guest_register() { global $tshirt_sizes, $enable_tshirt_size, $default_theme; + $event_config = EventConfig(); + return User_registration_success_view($event_config['event_welcome_msg']); + $msg = ""; $nick = ""; $lastname = ""; diff --git a/includes/view/User_view.php b/includes/view/User_view.php index fca21e37..bec9879c 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -19,6 +19,17 @@ $tshirt_sizes = array( 'XL-G' => "XL Girl" ); +/** + * Displays the welcome message to the user and shows a login form. + */ +function User_registration_success_view($event_welcome_message) { + $parsedown = new Parsedown(); + $event_welcome_message = $parsedown->text($event_welcome_message); + return page_with_title(_("Welcome to the engelsystem!"), [ + $event_welcome_message + ]); +} + /** * Gui for deleting user with password field. */