Store organisator email

This commit is contained in:
Thomas Günther 2024-05-31 20:13:27 +02:00
parent a69d83bc0a
commit 3782ef7282
5 changed files with 11 additions and 4 deletions

View File

@ -4,6 +4,7 @@ START TRANSACTION;
CREATE TABLE `%tablename%` ( CREATE TABLE `%tablename%` (
`id` int NOT NULL AUTO_INCREMENT, `id` int NOT NULL AUTO_INCREMENT,
`event_name` varchar(1024) NOT NULL, `event_name` varchar(1024) NOT NULL,
`event_email` varchar(1024) NOT NULL,
`archived` tinyint NOT NULL DEFAULT '0', `archived` tinyint NOT NULL DEFAULT '0',
`signup_allowed` tinyint NOT NULL DEFAULT '0', `signup_allowed` tinyint NOT NULL DEFAULT '0',
`startdatum` date DEFAULT NULL, `startdatum` date DEFAULT NULL,

View File

@ -8,7 +8,7 @@ class CreateEvent {
public function __construct() { public function __construct() {
global $_POST, $_REQUEST, $dbHandler; 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 = []; $post_data = [];
foreach ($_POST as $key => $value) { foreach ($_POST as $key => $value) {
if (in_array($key, $use_data)) { if (in_array($key, $use_data)) {

View File

@ -8,7 +8,7 @@ class UpdateEvent {
public function __construct() { public function __construct() {
global $_POST, $_REQUEST, $dbHandler; 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 = []; $post_data = [];
foreach ($_POST as $key => $value) { foreach ($_POST as $key => $value) {
if (in_array($key, $use_data)) { if (in_array($key, $use_data)) {

View File

@ -32,9 +32,7 @@ class Event extends CommonModel {
} }
} }
#echo '<pre>';print_r($class);die();
return $class; return $class;
} }
public function __construct() { public function __construct() {

View File

@ -31,6 +31,14 @@ function kompass_print_event_edit_form(?int $event_id = null)
'events_settings', 'events_settings',
['setting' => 'event_name', 'style' => 'width: 1024px', 'value' => null !== $event ? $event->event_name : '']); ['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( add_settings_field(
'event_settings_2', 'event_settings_2',
__('Start date', BDP_LV_PLUGIN_SLUG), __('Start date', BDP_LV_PLUGIN_SLUG),