diff --git a/lib/database/kompass_veranstaltungen_index.sql b/lib/database/kompass_veranstaltungen_index.sql index e685e0f..4472be5 100644 --- a/lib/database/kompass_veranstaltungen_index.sql +++ b/lib/database/kompass_veranstaltungen_index.sql @@ -4,6 +4,7 @@ START TRANSACTION; CREATE TABLE `%tablename%` ( `id` int NOT NULL AUTO_INCREMENT, `event_name` varchar(1024) NOT NULL, + `event_email` varchar(1024) NOT NULL, `archived` tinyint NOT NULL DEFAULT '0', `signup_allowed` tinyint NOT NULL DEFAULT '0', `startdatum` date DEFAULT NULL, diff --git a/modules/event-participants/Controllers/class-createevent.php b/modules/event-participants/Controllers/class-createevent.php index 9dbaa00..2c66eee 100644 --- a/modules/event-participants/Controllers/class-createevent.php +++ b/modules/event-participants/Controllers/class-createevent.php @@ -8,7 +8,7 @@ class CreateEvent { public function __construct() { global $_POST, $_REQUEST, $dbHandler; - $use_data = ['event_name', 'startdatum', 'enddatum','max_participants', 'max_volunteers', 'amount_reduced', 'amount_default', 'amount_social', 'contributing_tribes']; + $use_data = ['event_name', 'event_email', 'startdatum', 'enddatum','max_participants', 'max_volunteers', 'amount_reduced', 'amount_default', 'amount_social', 'contributing_tribes']; $post_data = []; foreach ($_POST as $key => $value) { if (in_array($key, $use_data)) { diff --git a/modules/event-participants/Controllers/class-updateevent.php b/modules/event-participants/Controllers/class-updateevent.php index a3c8b9e..5e660e8 100644 --- a/modules/event-participants/Controllers/class-updateevent.php +++ b/modules/event-participants/Controllers/class-updateevent.php @@ -8,7 +8,7 @@ class UpdateEvent { public function __construct() { global $_POST, $_REQUEST, $dbHandler; - $use_data = ['event_name', 'startdatum', 'enddatum','max_participants', 'max_volunteers', 'amount_reduced', 'amount_default', 'amount_social', 'contributing_tribes']; + $use_data = ['event_name', 'event_email', 'startdatum', 'enddatum','max_participants', 'max_volunteers', 'amount_reduced', 'amount_default', 'amount_social', 'contributing_tribes']; $post_data = []; foreach ($_POST as $key => $value) { if (in_array($key, $use_data)) { diff --git a/modules/event-participants/Models/class-event.php b/modules/event-participants/Models/class-event.php index 080804f..09b80d4 100644 --- a/modules/event-participants/Models/class-event.php +++ b/modules/event-participants/Models/class-event.php @@ -32,9 +32,7 @@ class Event extends CommonModel { } } - #echo '
';print_r($class);die(); return $class; - } public function __construct() { diff --git a/modules/event-participants/Views/event-edit-form.php b/modules/event-participants/Views/event-edit-form.php index 8a09c33..4919398 100644 --- a/modules/event-participants/Views/event-edit-form.php +++ b/modules/event-participants/Views/event-edit-form.php @@ -31,6 +31,14 @@ function kompass_print_event_edit_form(?int $event_id = null) 'events_settings', ['setting' => 'event_name', 'style' => 'width: 1024px', 'value' => null !== $event ? $event->event_name : '']); + add_settings_field( + 'event_settings_1b', + __('Organisator E-Mail', BDP_LV_PLUGIN_SLUG), + 'kompass_print_textbox', + $events_settings, + 'events_settings', + ['setting' => 'event_email', 'style' => 'width: 1024px', 'value' => null !== $event ? $event->event_email : '']); + add_settings_field( 'event_settings_2', __('Start date', BDP_LV_PLUGIN_SLUG),