Fixed reg event descr being overwritten by event descr, started adding support for...
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 4 Dec 2017 19:31:23 +0000 (14:31 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 4 Dec 2017 19:31:23 +0000 (14:31 -0500)
classes/data/dataRegEvent.php
models/admin/registrations/events.php
views/admin/registrations/eventEdit.html

index b2d380c..9d18f31 100644 (file)
@@ -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 "<pre>".print_r($this->regEventData,1)."</pre>";
 
         return $this->regEventData;
index 2fccfba..d9f3909 100644 (file)
@@ -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 "<pre>".print_r($templateData,1)."</pre>";
index fad4876..1fd83cc 100644 (file)
                 {/if}<br>
                 </td>
             </tr>
+    {if apply_filters('glm-members-customfields-active', false)}
+            <tr>
+                <th>Custom Fields</th>
+                <td>
+                    <p>These are additional fields of information that will be requested for each registrant.</p> 
+                    {apply_filters('glm-members-customfields-edit', '', $eventCustomFieldsUid)}
+                </td>
+            </tr>
+    {/if}
         </table>
         
+        
         <p><input id="updateRegEvent" type="submit" value="Update This Event"></p>
         
     </form>