From: Chuck Scott Date: Mon, 4 Dec 2017 19:31:23 +0000 (-0500) Subject: Fixed reg event descr being overwritten by event descr, started adding support for... X-Git-Tag: v1.0.0^2~234 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3d4d4c3fde0153c8413308b296c2196f210ccab1;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed reg event descr being overwritten by event descr, started adding support for custom fields. --- diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index b2d380c..9d18f31 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -364,7 +364,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // Add to the registration event arraytrue $result_data['intro'] = $eventData['intro']; - $result_data['descr'] = $eventData['descr']; + $result_data['eventDescr'] = $eventData['descr']; $result_data['image'] = $eventData['image']; $result_data['contact_name'] = $eventData['contact_name']; $result_data['contact_email'] = $eventData['contact_email']; @@ -852,32 +852,6 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract return false; } -/* - // Check reg_time array - $timeSpecific = $this->regEventData['time_specific']['value']; - foreach ($this->regEventData['reg_time'] as $timeKey=>$timeVal) { - - // if event is time specific - if ($timeSpecific) { - - // Remove entry if it's not time specific or is in the past - if ($timeVal['start_datetime']['timestamp'] < time()) { // remove $timeVal['event_time'] == 0 || - unset($this->regEventData['reg_time'][$timeKey]); - } - - // Otherwise event is non time specific - } else { - - // Remove any time specific entries - if ($timeVal['event_time'] > 0) { - unset($this->regEventData['reg_time'][$timeKey]); - } - - } - - } -*/ - // If now we don't have any time entries if (count($this->regEventData['reg_time']) == 0) { return false; @@ -967,9 +941,6 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // Get rid of all of the recurrence data - No longer needed unset($this->regEventData['recurrences']); - // Get rid of the provided reg_time entries - No longer needed -// oops! unset($this->regEventData['reg_time']); - // echo "
".print_r($this->regEventData,1)."
"; return $this->regEventData; diff --git a/models/admin/registrations/events.php b/models/admin/registrations/events.php index 2fccfba..d9f3909 100644 --- a/models/admin/registrations/events.php +++ b/models/admin/registrations/events.php @@ -542,7 +542,8 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', 'regEventJSON' => $regEventJSON, 'regClassesJSON' => $regClassesJSON, - 'regTimesJSON' => $regTimesJSON + 'regTimesJSON' => $regTimesJSON, + 'eventCustomFieldsUid' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG.'-customfields-reg-event-edit-'.$regEventID ); // echo "
".print_r($templateData,1)."
"; diff --git a/views/admin/registrations/eventEdit.html b/views/admin/registrations/eventEdit.html index fad4876..1fd83cc 100644 --- a/views/admin/registrations/eventEdit.html +++ b/views/admin/registrations/eventEdit.html @@ -225,8 +225,18 @@ {/if}
+ {if apply_filters('glm-members-customfields-active', false)} + + Custom Fields + +

These are additional fields of information that will be requested for each registrant.

+ {apply_filters('glm-members-customfields-edit', '', $eventCustomFieldsUid)} + + + {/if} +