Export Attendees now respecting Text and Date searches.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 8 Apr 2019 17:59:01 +0000 (13:59 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 8 Apr 2019 17:59:01 +0000 (13:59 -0400)
models/admin/ajax/registrantsListExport.php
views/admin/registrations/eventRegistrants.html

index dfb3466..6ae0579 100644 (file)
@@ -108,6 +108,7 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq
         $limit = 20; // Set to the number of listings per page
         $namesList = false;
         $customFieldHeaders = false;
+        $selectedTime          = false;
 
         // Check selected fields
         $select = array(
@@ -199,6 +200,14 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq
                 $textSearch = stripslashes($textSearch);
             }
 
+            // Filter for specific time
+            if (isset($_REQUEST['time'])) {
+                $selectedTime = filter_var( $_REQUEST['time'], FILTER_VALIDATE_INT);
+            }
+            if ($selectedTime) {
+                $whereParts[] = "T.reg_time = $selectedTime";
+            }
+
             // Get list of all registrants for this event
             $where = implode(' AND ', $whereParts);
 
index 45b6bab..1075b11 100755 (executable)
         <input type="hidden" name="glm_action" value="registrantsListExport">
         <input type="hidden" name="regEventID" value="{$regEvent.id}">
         <table class="glm-admin-table">
-
             <tr>
                 <th>Name Search:</th>
-                <td><input type="text" name="text_search" value=""></td>
+                <td><input type="text" name="text_search" value="{if $textSearch}{$textSearch}{/if}"></td>
             </tr>
+            {if $haveTimes}
+                <tr>
+                    <th>Time Selected</th>
+                    <td>
+                        <select name="time">
+                            <option value=""></option>
+                            {foreach $times as $time}
+                                {if $time.start_datetime.timestamp}
+                                    <option value="{$time.id}"{if $selectedTime == $time.id} selected{/if}>{$time.start_datetime.datetime}</option>
+                                {/if}
+                            {/foreach}
+                        </select>
+                    </td>
+                </tr>
+            {/if}
             <tr>
                 <th>Request Status:</th>
                 <td>