From: Chuck Scott Date: Tue, 17 Jul 2018 19:20:45 +0000 (-0400) Subject: Significant usability issues for admin registrations. X-Git-Tag: v1.0.11^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ef35eaec4e5df65ae424c40f21244252d295a137;p=WP-Plugins%2Fglm-member-db-registrations.git Significant usability issues for admin registrations. Fixed problem with submitting account E-Mail not being available to send message in checkoutUpdateInventoryAndNotify() Now adding E-Mail address to create account form after checkout Added sort option to attendee export Removing 1969 dates (0 timestamp) in "Time Selected" picklist in Event Attendees list. Reoganized parmeter initialization and view data for admin/registrations/events.php and sub-models. Now with appropriate model. Added enhanced multi-pick for selection of attnedees by status and other search enhancements to registrants list. Cleaned up missing parameters due to reorganizing parameters. Added links from requests list to request detail and if still in cart to front-end cart. Added links from registrants list to request detail and if still in cart to front-end cart. --- diff --git a/config/plugin.ini b/config/plugin.ini index 4d786a2..b68e8f8 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -7,6 +7,8 @@ [common] +cart_id_check_secret = 'GlMREGcartSecret4ID' + ; ; Show Rate type (how it rates will be displayed in lists) - Use as List ; diff --git a/models/admin/ajax/registrantsListExport.php b/models/admin/ajax/registrantsListExport.php index a9e6198..c0c7752 100644 --- a/models/admin/ajax/registrantsListExport.php +++ b/models/admin/ajax/registrantsListExport.php @@ -13,12 +13,11 @@ * @version 0.1 */ - // Load Registrant Info data abstract -require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php'; +require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH . + '/data/dataRegRequestRegistrant.php'; /** - * * This class exports the currently selected registrants list * to a printable HTML file, to a CSV file, or otherwise. */ @@ -32,6 +31,7 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq * @access public */ public $wpdb; + /** * Plugin Configuration Data * @@ -49,7 +49,7 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq * @return object Class object * */ - public function __construct ($wpdb, $config) + public function __construct($wpdb, $config) { // Save WordPress Database object @@ -62,61 +62,71 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq } - public function checkFlag($t) {return isset($_REQUEST[$t]) && $_REQUEST[$t] == 'on';} + public function checkFlag($t) + { + + return isset($_REQUEST[$t]) && $_REQUEST[$t] == 'on'; + + } + /** * Perform Model Action * * This modelAction takes an AJAX image upload and stores the image in the * media/images directory of the plugin. * - * This model action does not return, it simply does it's work then calls die(); + * This model action does not return, it simply does it's work then calls + * die(); * - * @param $actionData + * @param + * $actionData * * @return void Echos JSON string as response and does not return */ - public function modelAction ($actionData = false) + public function modelAction($actionData = false) { - // When processing registrant info records, also get primary contact data + // When processing registrant info records, also get primary contact + // data $this->postProcessPrimaryContact = true; - $where = ' true '; - $categories = false; - $haveRegistrants = false; - $list = false; - $success = false; - $filterPending = false; - $filterArchived = false; - $haveFilter = false; - $numbDisplayed = false; - $lastDisplayed = false; - $paging = true; - $prevStart = false; - $nextStart = false; - $start = 1; - $limit = 20; // Set to the number of listings per page - $namesList = false; + $message = ''; + $where = ' true '; + $categories = false; + $haveRegistrants = false; + $list = false; + $success = false; + $filterPending = false; + $filterArchived = false; + $haveFilter = false; + $numbDisplayed = false; + $lastDisplayed = false; + $paging = true; + $prevStart = false; + $nextStart = false; + $start = 1; + $limit = 20; // Set to the number of listings per page + $namesList = false; $customFieldHeaders = false; // Check selected fields $select = array( - 'exportId' => $this->checkFlag('exportId'), - 'exportRegistrant' => $this->checkFlag('exportRegistrant'), - 'exportAddr1' => $this->checkFlag('exportAddr1'), - 'exportAddr2' => $this->checkFlag('exportAddr2'), - 'exportCity' => $this->checkFlag('exportCity'), - 'exportState' => $this->checkFlag('exportState'), - 'exportZip' => $this->checkFlag('exportZip'), - 'exportEmail' => $this->checkFlag('exportEmail'), - 'exportPhone' => $this->checkFlag('exportPhone'), - 'exportCounty' => $this->checkFlag('exportCounty'), - 'exportLevel' => $this->checkFlag('exportLevel'), - 'exportTime' => $this->checkFlag('exportTime'), - 'exportRate' => $this->checkFlag('exportRate'), - 'exportStatus' => $this->checkFlag('exportStatus'), + 'exportId' => $this->checkFlag('exportId'), + 'exportRegistrant' => $this->checkFlag('exportRegistrant'), + 'exportAddr1' => $this->checkFlag('exportAddr1'), + 'exportAddr2' => $this->checkFlag('exportAddr2'), + 'exportCity' => $this->checkFlag('exportCity'), + 'exportState' => $this->checkFlag('exportState'), + 'exportZip' => $this->checkFlag('exportZip'), + 'exportEmail' => $this->checkFlag('exportEmail'), + 'exportPhone' => $this->checkFlag('exportPhone'), + 'exportCounty' => $this->checkFlag('exportCounty'), + 'exportLevel' => $this->checkFlag('exportLevel'), + 'exportTime' => $this->checkFlag('exportTime'), + 'exportRate' => $this->checkFlag('exportRate'), + 'exportStatus' => $this->checkFlag('exportStatus'), 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'), - 'exportCustom' => $this->checkFlag('exportCustom'), + 'exportCustom' => $this->checkFlag('exportCustom') ); // Get registration event ID if supplied @@ -124,109 +134,198 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq // Make sure it's numeric $regEventID = ($_REQUEST['regEventID'] - 0); - } else { // Try to get saved - $regEventID = get_option('glmMembersDatabaseRegistrationsRegEventID'); - + $regEventID = get_option( + 'glmMembersDatabaseRegistrationsRegEventID'); } - if (!$regEventID || $regEventID <= 0) { + // Check if there's a potential event ID + if ($regEventID && ($regEventID - 0) > 0) { + + // Get basic event information + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH . + '/data/dataRegEvent.php'; + $Events = new GlmDataRegistrationsRegEvent($this->wpdb, $this->config); + $eventData = $Events->getRegEventSimplified($regEventID); + } else { $regEventID = false; } - // Only return information records that are active - $whereParts = array(); + // If we have a valid event + if ($regEventID && $eventData) { - // Filter for complete if given - if ( isset($_REQUEST['status']) && is_array($_REQUEST['status']) && count($_REQUEST['status']) > 0 ) { + // Only return information records that are active - // Collect all checked status values - $statusSelected = array(); - foreach ($_REQUEST['status'] as $statusValue => $statusName) { - $statusSelected[] = $statusValue; - } - $statusList = implode(',', $statusSelected); - - $whereParts[] = " - ( - SELECT count(id) - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request - WHERE id = T.reg_request - AND status IN ($statusList) - ) > 0 - "; - } else { - // In case script doesn't catch not having any set - die('ERROR: No status selected'); - } + $whereParts = array(); - $whereParts[] = "T.not_attending <> true"; + // Filter for complete if given + if (isset($_REQUEST['status']) && is_array($_REQUEST['status']) && + count($_REQUEST['status']) > 0) { - // Check for a text search - if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search'] != '')) { - $textSearch = trim($_REQUEST['text_search']); - $whereParts[] = "concat( T.fname, ' ', T.lname) LIKE '%".$textSearch."%'"; + // Collect all checked status values + $statusSelected = array(); + foreach($_REQUEST['status'] as $statusValue=>$statusName) { + $statusSelected[] = $statusValue; + } + $statusList = implode(',', $statusSelected); + + $whereParts[] = " + ( + SELECT count(id) + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request + WHERE id = T.reg_request + AND status IN ($statusList) + ) > 0 + "; + } else { + // In case script doesn't catch not having any set + die('ERROR: No status selected'); + } - // Clean up for use in redisplaying search value - $textSearch = stripslashes($textSearch); - } + $whereParts[] = "T.not_attending <> true"; - // Get list of all registrants for this event - $where = implode( ' AND ', $whereParts ); + // Check for a text search + if (isset($_REQUEST['text_search']) && + trim($_REQUEST['text_search'] != '')) { + $textSearch = trim($_REQUEST['text_search']); + $whereParts[] = "concat( T.fname, ' ', T.lname) LIKE '%" . + $textSearch . "%'"; - // $list = $this->getList($where, "lname"); - $listResult = $this->getFullRegistrantsData($regEventID, $where, false, false); - $list = $listResult['list']; - $customFieldsPluginActive = apply_filters( 'glm-members-customfields-plugin-active', false ); - $customFieldHeaders = false; - // Go through the $listResult to pull out the custom fields if available and if plugin is on - if ( $customFieldsPluginActive && $listResult['list'] ) { - $index = 1; - foreach ( $list as $attendee ) { - if ( $attendee['custom_data'] ) { - if ( $index === 1 ) { - $customFieldHeaders = array_keys( $attendee['custom_data'] ); + // Clean up for use in redisplaying search value + $textSearch = stripslashes($textSearch); + } + + // Get list of all registrants for this event + $where = implode(' AND ', $whereParts); + + // $list = $this->getList($where, "lname"); + $listResult = $this->getFullRegistrantsData($regEventID, $where, + false, false, $orderBy); + $list = $listResult['list']; + $customFieldsPluginActive = apply_filters( + 'glm-members-customfields-plugin-active', false); + $customFieldHeaders = false; + // Go through the $listResult to pull out the custom fields if + // available and if plugin is on + if ($customFieldsPluginActive && $listResult['list']) { + $index = 1; + foreach($list as $attendee) { + if ($attendee['custom_data']) { + if ($index === 1) { + $customFieldHeaders = array_keys( + $attendee['custom_data']); + } } + break; } - break; } - } - // echo '
$customFieldHeaders: ' . print_r( $customFieldHeaders, true ) . '
'; - // echo '
$list: ' . print_r( $list, true ) . '
'; - // exit; - // If we have list entries - even if it's an empty list - $success = true; - $haveRegistrants = false; - if ($list !== false) { + // If we have list entries - even if it's an empty list $success = true; - - // If we have any entries - $registrantCount = count($list); - if ($registrantCount > 0) { - $haveRegistrants = true; + $haveRegistrants = false; + if ($list !== false) { + $success = true; + + // If we have any entries + $registrantCount = count($list); + if ($registrantCount > 0) { + $haveRegistrants = true; + + // Sort by selection + $orderField = ''; + $orderField2 = ''; + if (isset($_REQUEST['sortOrder'])) { + + switch ($_REQUEST['sortOrder']) { + + case 'registeredBy': + $orderField = 'registered_by'; + break; + + case 'status': + $orderField = 'request_status'; + break; + + case 'city': + $orderField = 'account'; + $orderField2 = 'city'; + break; + + case 'state': + $orderField = 'acount'; + $orderField2 = 'state'; + break; + + case 'zip': + $orderField = 'account'; + $orderField2 = 'zip'; + break; + + case 'level': + $orderField = 'class_name'; + break; + + case 'rate': + $orderField = 'rate_name'; + break; + + case 'dateTime': + $orderField = 'event_time'; + break; + + case 'name': + default: + // already sorted this way + break; + } + } + if ($orderField != '') { + uksort($list, + function ($a, $b) use ($list, $orderField, + $orderField2) + { + if ($orderField2 == '') { + return strcmp($list[$a][$orderField], + $list[$b][$orderField]); + } else { + return strcmp( + $list[$a][$orderField][$orderField2], + $list[$b][$orderField][$orderField2]); + } + }); + } + } + } else { // If list + $message = "No " . + $this->config['terms']['reg_term_attendee_plur_cap'] . + " Selected"; } + } else { // Have valid event + $message = "Event Not Found"; } // Compile template data $templateData = array( - 'select' => $select, - 'haveRegistrants' => $haveRegistrants, - 'registrants' => $list, - 'registrantCount' => $registrantCount, - 'categories' => $categories, - 'haveFilter' => $haveFilter, - 'numbDisplayed' => $numbDisplayed, - 'lastDisplayed' => $lastDisplayed, - 'paging' => $paging, - 'prevStart' => $prevStart, - 'nextStart' => $nextStart, - 'start' => $start, - 'limit' => $limit, - 'namesList' => $namesList, + 'message' => $message, + 'select' => $select, + 'haveRegistrants' => $haveRegistrants, + 'registrants' => $list, + 'registrantCount' => $registrantCount, + 'categories' => $categories, + 'haveFilter' => $haveFilter, + 'numbDisplayed' => $numbDisplayed, + 'lastDisplayed' => $lastDisplayed, + 'paging' => $paging, + 'prevStart' => $prevStart, + 'nextStart' => $nextStart, + 'start' => $start, + 'limit' => $limit, + 'namesList' => $namesList, 'customFieldHeaders' => $customFieldHeaders, + 'time' => time(), + 'event' => $eventData ); $view = 'admin/ajax/registrantsListExport.html'; @@ -240,17 +339,20 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq } // Disable caching - header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1 + header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP + // 1.1 header("Pragma: no-cache"); // HTTP 1.0 header("Expires: 0"); // Proxies + // echo "
".print_r($list,1)."
"; + // Return status, suggested view, and data to controller return array( - 'status' => $success, + 'status' => $success, 'menuItemRedirect' => false, - 'modelRedirect' => false, - 'view' => $view, - 'data' => $templateData + 'modelRedirect' => false, + 'view' => $view, + 'data' => $templateData ); } diff --git a/models/admin/registrations/events.php b/models/admin/registrations/events.php index ace9d88..f58ed87 100644 --- a/models/admin/registrations/events.php +++ b/models/admin/registrations/events.php @@ -20,7 +20,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent { /** - * WordPress Database Object + * WordPress Database Objectf * * @var $wpdb * @access public @@ -78,63 +78,13 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent public function modelAction($actionData = false) { - // *** Need to move the parameters below to their appropriate sub-model file *** - $messages = array(); $option = 'dashboard'; $view = false; - $numbDisplayed = false; - $lastDisplayed = false; - $paging = true; - $prevStart = false; - $nextStart = false; - $start = 1; - $limit = 20; // Set to the number of listings per page - $registrantCount = 0; - $textSearch = false; - $where = ' TRUE '; - $alphaList = false; - $alphaWhere = ''; - $alphaSelected = false; - $haveRegEvents = false; - $regEventsCount = false; - $list = false; - $namesList = false; - $regEvent = false; $regEventID = false; - $haveRegEvent = false; - $haveRegEventRecurrences = false; - $haveRegEventTimes = false; - $defaultCalendarDate = false; - $regEventFirstTime = false; - $regEventLastTime = false; - $regEventUpdated = false; - $regEventUpdateError = false; $regEventAdded = false; - $regEventSample = false; - $regEventJSON = false; - $regClassesJSON = false; - $regTimesJSON = false; - $regEventDeleted = false; - $regNotifications = false; - $regNotifyUpdated = false; - $havePayCodes = false; - $payCodes = false; - $newPayCode = false; - $refPaycodeType = false; - $classes = false; - $haveRegistrants = false; - $registrants = false; - $completed = true; - $errorMsg = false; - $newEntry = false; - $when = false; - $haveTimes = false; - $times = false; - $selectedTime = false; - $notifications = ''; - - // Register the masked input script that we need for input controls + + // Register the masked input script that we need for input controls wp_dequeue_script('glm-members-admin-maskedinput'); wp_register_script( 'glm-members-reg-admin-mask', @@ -191,62 +141,17 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent /* * *** Need to move the template data compilation to the individual sub-model files. */ + // Compile template data - $templateData = array( - 'haveMessages' => count($messages) > 0, - 'messages' => $messages, - 'option' => $option, - 'regEventsCount' => $regEventsCount, - 'haveRegEvents' => $haveRegEvents, - 'regEvents' => $list, - 'alphaList' => $alphaList, - 'alphaSelected' => $alphaSelected, - 'numbDisplayed' => $numbDisplayed, - 'lastDisplayed' => $lastDisplayed, - 'paging' => $paging, - 'prevStart' => $prevStart, - 'nextStart' => $nextStart, - 'start' => $start, - 'limit' => $limit, - 'registrantCount' => $registrantCount, - 'namesList' => $namesList, - 'textSearch' => $textSearch, - 'regEventID' => $regEventID, - 'regEvent' => $regEvent, - 'haveRegEvent' => $haveRegEvent, - 'haveRegEventRecurrences' => $haveRegEventRecurrences, - 'haveRegEventTimes' => $haveRegEventTimes, - 'defaultCalendarDate' => $defaultCalendarDate, - 'regEventFirstTime' => $regEventFirstTime, - 'regEventLastTime' => $regEventLastTime, - 'regEventUpdated' => $regEventUpdated, - 'regEventUpdateError' => $regEventUpdateError, - 'regEventAdded' => $regEventAdded, - 'entry' => $regEventSample, - 'regNotifications' => $regNotifications, - 'regNotifyUpdated' => $regNotifyUpdated, - 'havePayCodes' => $havePayCodes, - 'payCodes' => $payCodes, - 'newPayCode' => $newPayCode, - 'eventPaycodeType' => $refPaycodeType, - 'currentUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ADMIN_URL, - 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', - 'regEventJSON' => $regEventJSON, - 'regClassesJSON' => $regClassesJSON, - 'regTimesJSON' => $regTimesJSON, - 'classes' => $classes, - 'haveRegistrants' => $haveRegistrants, - 'registrants' => $registrants, - 'completed' => $completed, - 'errorMsg' => $errorMsg, - 'newEntry' => $newEntry, - 'when' => $when, - 'haveTimes' => $haveTimes, - 'times' => $times, - 'selectedTime' => $selectedTime, - 'notifications' => $notifications, - 'submitStatus' => $this->config['submission_status'] - ); + + $templateData['haveMessages'] = count($messages) > 0; + $templateData['messages'] = $messages; + $templateData['option'] = $option; + $templateData['regEventID'] = $regEventID; + $templateData['regEventAdded'] = $regEventAdded; + $templateData['currentUrl'] = GLM_MEMBERS_REGISTRATIONS_PLUGIN_ADMIN_URL; + $templateDAta['thisJsUrl'] = GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js'; + // echo "
".print_r($this->config['submission_status'],1)."
"; diff --git a/models/admin/registrations/events_addEdit.php b/models/admin/registrations/events_addEdit.php index fcc5712..cd4adda 100644 --- a/models/admin/registrations/events_addEdit.php +++ b/models/admin/registrations/events_addEdit.php @@ -13,7 +13,11 @@ * @link http://dev.gaslightmedia.com/ */ -$problem = false; +$problem = false; +$regEvent = false; +$haveRegEvent = false; +$regEventUpdated = false; +$regEventUpdateError = false; // If we're adding a new reg event if ($option == 'add') { @@ -106,5 +110,12 @@ if (!$problem) { //echo "
".print_r($regEvent,1)."
"; +$templateData = array( + 'regEvent' => $regEvent, + 'haveRegEvent' => $haveRegEvent, + 'regEventUpdated' => $regEventUpdated, + 'regEventUpdateError' => $regEventUpdateError +); + $view = 'eventEdit'; diff --git a/models/admin/registrations/events_configureEvent.php b/models/admin/registrations/events_configureEvent.php index 90240ae..347fde1 100644 --- a/models/admin/registrations/events_configureEvent.php +++ b/models/admin/registrations/events_configureEvent.php @@ -13,6 +13,13 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$regEventJSON = false; +$regClassesJSON = false; +$regTimesJSON = false; +$regEventUpdated = false; +$regEventUpdateError = false; + $scripts = array( 'backbone-local' => 'js/lib/backbone.localStorage.min.js', 'regApp' => 'js/adminRegApp.js', @@ -55,5 +62,15 @@ unset($regEvent['reg_class']); unset($regEvent['reg_time']); $regEventJSON = json_encode($regEvent); + +$templateData = array( + 'regEvent' => $regEvent, + 'regEventJSON' => $regEventJSON, + 'regClassesJSON' => $regClassesJSON, + 'regTimesJSON' => $regTimesJSON, + 'regEventUpdated' => $regEventUpdated, + 'regEventUpdateError' => $regEventUpdateError +); + $view = 'eventEditLevels'; diff --git a/models/admin/registrations/events_dashboard.php b/models/admin/registrations/events_dashboard.php index 564bcfa..48a8e78 100644 --- a/models/admin/registrations/events_dashboard.php +++ b/models/admin/registrations/events_dashboard.php @@ -13,6 +13,27 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$regEventsCount = false; +$haveRegEvents = false; +$list = false; +$alphaList = false; +$alphaSelected = false; +$numbDisplayed = false; +$lastDisplayed = false; +$paging = true; +$prevStart = false; +$nextStart = false; +$start = 1; +$limit = 20; // Set to the number of listings per page +$namesList = false; +$textSearch = false; +$haveRegEvent = false; +$alphaWhere = ''; +$where = ' TRUE '; + + + // If doing alpha list if (isset($_REQUEST['alpha'])) { $actionData['request']['alpha'] = $_REQUEST['alpha']; @@ -28,7 +49,6 @@ if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) = $alphaWhere .= " AND T.event_name LIKE '$alphaSelected%'"; } -$where = ' TRUE '; if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search'] != '')) { $textSearch = trim($_REQUEST['text_search']); $where = "event_name LIKE '%".$textSearch."%'"; @@ -81,4 +101,23 @@ if ($list !== false) { // Get full list of event names matching the current where clause for text search box $namesList = $this->getSimpleRegEventsList($where); +$templateData = array( + 'regEventsCount' => $regEventsCount, + 'haveRegEvents' => $haveRegEvents, + 'regEvents' => $list, + 'alphaList' => $alphaList, + 'alphaSelected' => $alphaSelected, + 'numbDisplayed' => $numbDisplayed, + 'lastDisplayed' => $lastDisplayed, + 'paging' => $paging, + 'prevStart' => $prevStart, + 'nextStart' => $nextStart, + 'start' => $start, + 'limit' => $limit, + 'namesList' => $namesList, + 'textSearch' => $textSearch, + 'regEvent' => $regEvent, + 'haveRegEvent' => $haveRegEvent +); + $view = 'eventsDashboard'; diff --git a/models/admin/registrations/events_delete.php b/models/admin/registrations/events_delete.php index d8ac88b..fe97483 100644 --- a/models/admin/registrations/events_delete.php +++ b/models/admin/registrations/events_delete.php @@ -13,7 +13,9 @@ * @link http://dev.gaslightmedia.com/ */ -$regEventDeleted = false; +$regEventDeleted = false; +$regEvent = false; + // If we don't have a registration Event ID if (!$regEventID) { @@ -61,3 +63,4 @@ if ($regEventDeleted) { require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/models/admin/registrations/events_dashboard.php'; } + diff --git a/models/admin/registrations/events_eventCustomFields.php b/models/admin/registrations/events_eventCustomFields.php index 713047d..c4a94c7 100644 --- a/models/admin/registrations/events_eventCustomFields.php +++ b/models/admin/registrations/events_eventCustomFields.php @@ -13,10 +13,23 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$classes = false; +$regEventUpdated = false; +$regEventUpdateError = false; + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegClass.php'; $RegClasses = new GlmDataRegistrationsRegClass($this->wpdb, $this->config); $classes = $RegClasses->getList("T.reg_event = $regEventID"); $regEvent = $this->getEntry($regEventID); +$templateData = array( + 'regEvent' => $regEvent, + 'classes' => $classes, + 'regEventUpdated' => $regEventUpdated, + 'regEventUpdateError' => $regEventUpdateError +); + + $view = 'eventEditCustomFields'; diff --git a/models/admin/registrations/events_eventDashboard.php b/models/admin/registrations/events_eventDashboard.php index 9431ba1..a981643 100644 --- a/models/admin/registrations/events_eventDashboard.php +++ b/models/admin/registrations/events_eventDashboard.php @@ -13,6 +13,14 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$haveRegEvent = false; +$haveRegEventTimes = false; +$defaultCalendarDate = false; +$regEventFirstTime = false; +$regEventLastTime = false; + + // Check if there's a request to add event times from the event $getTimesFromEvent = false; if (isset($_REQUEST) && isset($_REQUEST['getTimesFromEvent']) && $_REQUEST['getTimesFromEvent'] == 'yes') { @@ -64,4 +72,17 @@ if ($regEvent !== false) { } // echo "
".print_r($regEvent,1)."
"; + +$templateData = array( + 'regEvent' => $regEvent, + 'haveRegEvent' => $haveRegEvent, + 'haveRegEventTimes' => $haveRegEventTimes, + 'defaultCalendarDate' => $defaultCalendarDate, + 'regEventFirstTime' => $regEventFirstTime, + 'regEventFirstTime' => $regEventFirstTime, + 'regEventLastTime' => $regEventLastTime, + +); + + $view = 'eventDashboard'; diff --git a/models/admin/registrations/events_globalCodes.php b/models/admin/registrations/events_globalCodes.php index 705c152..9f6d4ec 100644 --- a/models/admin/registrations/events_globalCodes.php +++ b/models/admin/registrations/events_globalCodes.php @@ -13,6 +13,12 @@ * @link http://dev.gaslightmedia.com/ */ +$havePayCodes = false; +$payCodes = false; +$newPayCode = false; +$refPaycodeType = false; + + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataPaymentCode.php'; $PayCode = new GlmDataRegistrationsPaymentCode($this->wpdb, $this->config); @@ -63,5 +69,12 @@ if ($payCodes) { $havePayCodes = true; } +$templateData = array( + 'havePayCodes' => $havePayCodes, + 'payCodes' => $payCodes, + 'newPayCode' => $newPayCode, + 'eventPaycodeType' => $refPaycodeType, + +); $view = 'eventPaymentCodes'; diff --git a/models/admin/registrations/events_notificationDisplay.php b/models/admin/registrations/events_notificationDisplay.php index 51e4f4f..7309d2e 100644 --- a/models/admin/registrations/events_notificationDisplay.php +++ b/models/admin/registrations/events_notificationDisplay.php @@ -13,8 +13,14 @@ * @link http://dev.gaslightmedia.com/ */ +$notifications = ''; + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/models/admin/registrations/sendNotifications.php'; $SendNotifications = new GlmMembersAdmin_registrations_sendNotifications($this->wpdb, $this->config); $notifications = $SendNotifications->modelAction(false, true); +$templateData = array( + 'notifications' => $notifications, +); + $view = 'notificationDisplay'; diff --git a/models/admin/registrations/events_notifications.php b/models/admin/registrations/events_notifications.php index a9bfa6c..7401c81 100644 --- a/models/admin/registrations/events_notifications.php +++ b/models/admin/registrations/events_notifications.php @@ -13,6 +13,13 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$regNotifications = false; +$newEntry = false; +$when = false; +$regNotifyUpdated = false; + + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegNotification.php'; $Notifications = new GlmDataRegistrationsRegNotification($this->wpdb, $this->config); @@ -44,3 +51,12 @@ if ( isset( $_REQUEST['delete'] ) && filter_var( $_REQUEST['delete'], FILTER_VAL } // echo '
$regNotifications: ' . print_r( $regNotifications, true ) . '
'; + +$templateData = array( + 'regEvent' => $regEvent, + 'regNotifications' => $regNotifications, + 'newEntry' => $newEntry, + 'when' => $when, + 'regNotifyUpdated' => $regNotifyUpdated +); + diff --git a/models/admin/registrations/events_notificationsUpdate.php b/models/admin/registrations/events_notificationsUpdate.php index 3bd743c..e3f8833 100644 --- a/models/admin/registrations/events_notificationsUpdate.php +++ b/models/admin/registrations/events_notificationsUpdate.php @@ -13,6 +13,9 @@ * @link http://dev.gaslightmedia.com/ */ +$regNotifyUpdated = false; + + // New and updated notifications if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) { @@ -76,5 +79,11 @@ if ( isset( $_REQUEST['delete'] ) && filter_var( $_REQUEST['delete'], FILTER_VAL $regNotifyUpdated = true; +$templateData= array( + 'regNotifyUpdated' => $regNotifyUpdated, + +); + + // Fall through to get the data again require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH . '/models/admin/registrations/events_notifications.php'; diff --git a/models/admin/registrations/events_paymentCodes.php b/models/admin/registrations/events_paymentCodes.php index 7cd7c74..42c8005 100644 --- a/models/admin/registrations/events_paymentCodes.php +++ b/models/admin/registrations/events_paymentCodes.php @@ -13,6 +13,13 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$havePayCodes = false; +$payCodes = false; +$newPayCode = false; +$refPaycodeType = false; + + // Get event ID $eventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT); @@ -75,5 +82,13 @@ if ($payCodes) { $regEvent = $this->getEntry($regEventID); +$templateData = array( + 'regEvent' => $regEvent, + 'havePayCodes' => $havePayCodes, + 'payCodes' => $payCodes, + 'newPayCode' => $newPayCode, + 'eventPaycodeType' => $refPaycodeType +); + $view = 'eventPaymentCodes'; diff --git a/models/admin/registrations/events_registrants.php b/models/admin/registrations/events_registrants.php index 41f5d06..1a1d4d1 100644 --- a/models/admin/registrations/events_registrants.php +++ b/models/admin/registrations/events_registrants.php @@ -13,6 +13,24 @@ * @link http://dev.gaslightmedia.com/ */ +$numbDisplayed = false; +$lastDisplayed = false; +$paging = true; +$prevStart = false; +$nextStart = false; +$start = 1; +$limit = 20; // Set to the number of listings per page +$registrantCount = 0; +$textSearch = false; +$regEvent = false; +$haveRegistrants = false; +$registrants = false; +$haveTimes = false; +$times = false; +$selectedTime = false; +$errorMsg = false; +$completed = false; + $whereParts = array(); @@ -27,7 +45,8 @@ if (isset($_REQUEST['textSearch']) && trim($_REQUEST['textSearch'] != '')) { require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php'; $Registrants = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config); -// Get the regEvent data +// Get the regEvent dataecho "
".print_r($registrants,1)."
"; + $regEvent = $this->getEntry($regEventID); // If time / date specific event, get all times for time selection picklist @@ -49,26 +68,90 @@ if ($selectedTime) { $whereParts[] = "T.reg_time = $selectedTime"; } -// Filter for not being in status CART -if (isset($_REQUEST['limit'])) { - $completed = filter_var( $_REQUEST['complete'], FILTER_VALIDATE_BOOLEAN); +// Filter for status +if (isset($_REQUEST['status']) && is_array($_REQUEST['status']) && count($_REQUEST['status']) > 0) { + + // Status supplied + $statusSelected = $_REQUEST['status']; + +} else { + + // Not supplied so use defaults + $statusSelected = array( + $this->config['submission_status_numb']['COMPLETE'], + $this->config['submission_status_numb']['UNPAID'], + $this->config['submission_status_numb']['CC_PEND'], + $this->config['submission_status_numb']['CC_DECL'], + $this->config['submission_status_numb']['PAYMENT_PEND'], + $this->config['submission_status_numb']['ON_ARRIVAL'], + $this->config['submission_status_numb']['ADMIN_HOLD'] + ); + } -if ($completed) { - $whereParts[] = " - ( - SELECT count(id) - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request - WHERE id = T.reg_request - AND status NOT IN - ( - {$this->config['submission_status_numb']['CART']}, - {$this->config['submission_status_numb']['FAILED']}, - {$this->config['submission_status_numb']['CANCELED']} - ) - ) > 0 - "; + +// Build data for picklist output +$status = $this->config['submission_status']; + + +/** + * ******* TEMPORARY - USE SAME FUNCTION IN MAIN PLUGIN WHEN THAT'S UPDATED (less the number 2 at the end) ************* + */ +function glmMembersConfigArraySetup2( $configTable, $configNumbTable = false, $configSelectedArray) +{ + + // Check if config table array exits + if (!is_array($configTable) || count($configTable) == 0) { + return false; + } + + // Build base array + $conf = array(); + foreach ($configTable as $key=>$descr) { + $conf[$key] = array( + 'id' => $key, + 'descr' => $descr, + 'name' => false, + 'selected' => false + ); + } + + // If name->number array add that data + if (is_array($configNumbTable) && count($configNumbTable) > 0) { + foreach ($configNumbTable as $name=>$key) { + if (isset($conf[$key])) { + $conf[$key]['name'] = $name; + } + } + } + + // If a selected array is provided, add that data + if (is_array($configSelectedArray) && count($configSelectedArray) > 0) { + foreach ($configSelectedArray as $key) { + if (isset($conf[$key])) { + $conf[$key]['selected'] = true; + } + } + } + + return $conf; + } +// Build array of status options for view +$statusOptions = glmMembersConfigArraySetup2($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected); + + +// Build where clause for status and add to where parts +$statusWhere = "(".implode(',', $statusSelected).")"; +$whereParts[] = " + ( + SELECT count(id) + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request + WHERE id = T.reg_request + AND status IN $statusWhere + ) > 0 +"; + // Get list of all registrants for this event $where = implode( ' AND ', $whereParts ); @@ -100,7 +183,7 @@ $registrantCount = $listResult['totalCount']; // If the number of registrants is less than a page, don't do paging if ($registrantCount <= $limit) { - // $paging = false; + $paging = false; } // Get paging results @@ -119,6 +202,11 @@ if ($listResult['returned'] == $limit) { } $registrants = $listResult['list']; +// Calc Cart ID check +foreach ($registrants as $key=>$val) { + $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']); +} + $success = true; $haveRegistrants = false; if ($registrants !== false) { @@ -132,4 +220,26 @@ if ($registrants !== false) { } // echo "
".print_r($registrants,1)."
"; +$templateData = array( + 'numbDisplayed' => $numbDisplayed, + 'lastDisplayed' => $lastDisplayed, + 'paging' => $paging, + 'prevStart' => $prevStart, + 'nextStart' => $nextStart, + 'start' => $start, + 'limit' => $limit, + 'registrantCount' => $registrantCount, + 'textSearch' => $textSearch, + 'regEvent' => $regEvent, + 'haveRegistrants' => $haveRegistrants, + 'registrants' => $registrants, + 'haveTimes' => $haveTimes, + 'times' => $times, + 'selectedTime' => $selectedTime, + 'statusOptions' => $statusOptions, + 'errorMsg' => $errorMsg, + 'completed' => $completed, + 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/' +); + $view = 'eventRegistrants'; diff --git a/models/admin/registrations/events_update.php b/models/admin/registrations/events_update.php index 13048a9..9e915ea 100644 --- a/models/admin/registrations/events_update.php +++ b/models/admin/registrations/events_update.php @@ -13,6 +13,11 @@ * @link http://dev.gaslightmedia.com/ */ +$regEvent = false; +$regEventUpdated = false; +$regEventUpdateError = false; + + // Get the current reg event type to check for change $timeSpecific = $this->wpdb->get_var(" SELECT time_specific @@ -95,4 +100,11 @@ if ($regEvent['status']) { $regEventUpdateError = true; } +$templateData = array( + 'regEvent' => $regEvent, + 'regEventUpdated' => $regEventUpdated, + 'regEventUpdateError' => $regEventUpdateError +); + + $view = 'eventEdit'; diff --git a/models/admin/registrations/requests.php b/models/admin/registrations/requests.php index a940390..a9d6e73 100644 --- a/models/admin/registrations/requests.php +++ b/models/admin/registrations/requests.php @@ -84,19 +84,30 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ // ***** THIS IS ONLY TEMPORARY AS WE TRANSITION AWAY FROM OPTION FOR LAST REQUEST ID - Can be deleted after 1.0.1 ****** delete_option('glmMembersDatabaseRegistrationsRequestID'); + $numbDisplayed = false; + $lastDisplayed = false; + $paging = true; + $prevStart = false; + $nextStart = false; + $start = 1; + $limit = 20; // Set to the number of listings per page + $orderBy = 'id'; $haveRequests = false; $requests = false; + $requestsCount = false; $requestID = false; $haveRequest = false; $cart = false; $haveCart = false; $option = 'dashboard'; $errorMsg = false; - $showCartRequests = false; - $where = ''; + $textSearch = false; + $statusOptions = false; + $where = 'TRUE'; $deleted = false; $messages = array(); + // Load registrations support class require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/regCartSupport.php'; $regCartSupport = new GlmRegCartSupport($this->wpdb, $this->config); @@ -209,18 +220,182 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ case 'dashboard': default: - // If this is a search form submission or paging button - if (isset($_REQUEST['limit'])) { - $showCartRequests = filter_var( $_REQUEST['showCartRequests'], FILTER_VALIDATE_BOOLEAN); + if (isset($_REQUEST['textSearch']) && trim($_REQUEST['textSearch'] != '')) { + $textSearch = trim($_REQUEST['textSearch']); + $where .= " AND concat( T.bill_fname, ' ', T.bill_lname) LIKE '%".$textSearch."%'"; + + // Clean up for use in redisplaying search value + $textSearch = stripslashes($textSearch); + } + + // Filter for status + if (isset($_REQUEST['status']) && is_array($_REQUEST['status']) && count($_REQUEST['status']) > 0) { + + // Status supplied + $statusSelected = $_REQUEST['status']; + + } else { + + // Not supplied so use defaults + $statusSelected = array( + $this->config['submission_status_numb']['COMPLETE'], + $this->config['submission_status_numb']['UNPAID'], + $this->config['submission_status_numb']['CC_PEND'], + $this->config['submission_status_numb']['CC_DECL'], + $this->config['submission_status_numb']['PAYMENT_PEND'], + $this->config['submission_status_numb']['ON_ARRIVAL'], + $this->config['submission_status_numb']['ADMIN_HOLD'] + ); + + } + + // Build data for picklist output + $status = $this->config['submission_status']; + + + /** + * ******* TEMPORARY - USE SAME FUNCTION IN MAIN PLUGIN WHEN THAT'S UPDATED (less the number 2 at the end) ************* + */ + function glmMembersConfigArraySetup2( $configTable, $configNumbTable = false, $configSelectedArray) + { + + // Check if config table array exits + if (!is_array($configTable) || count($configTable) == 0) { + return false; + } + + // Build base array + $conf = array(); + foreach ($configTable as $key=>$descr) { + $conf[$key] = array( + 'id' => $key, + 'descr' => $descr, + 'name' => false, + 'selected' => false + ); + } + + // If name->number array add that data + if (is_array($configNumbTable) && count($configNumbTable) > 0) { + foreach ($configNumbTable as $name=>$key) { + if (isset($conf[$key])) { + $conf[$key]['name'] = $name; + } + } + } + + // If a selected array is provided, add that data + if (is_array($configSelectedArray) && count($configSelectedArray) > 0) { + foreach ($configSelectedArray as $key) { + if (isset($conf[$key])) { + $conf[$key]['selected'] = true; + } + } + } + + return $conf; + + } + + // Build array of status options for view + $statusOptions = glmMembersConfigArraySetup2($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected); + + + // Build where clause for status and add to where parts + $statusWhere = "(".implode(',', $statusSelected).")"; + $where .= " AND T.status IN $statusWhere"; + + // Get selected ordering + $orderBy = $_REQUEST['orderBy']; + switch ($orderBy) { + + case 'status': + $order = 'T.status'; + break; + + case 'name': + $order = 'T.bill_lname, $.bill_fname'; + break; + + case 'org': + $order = 'T.bill_org'; + break; + + case 'city': + $order = 'T.bill_city'; + break; + + case 'state': + $order = 'T.bill_state'; + break; + + case 'created': + $order = 'T.date_created'; + break; + + case 'updated': + $order = 'T.last_update'; + break; + + case 'id': + default: + $order = 'T.id'; + $orderBy = 'id'; + break; } - if (!$showCartRequests) { - $where = "T.status != {$this->config['submission_status_numb']['CART']}"; + + // Check if we're doing paging + if ( isset( $_REQUEST['pageSelect'] ) ) { + + // If request is for Next + if ( $_REQUEST['pageSelect'][0] == 'N' ) { + $newStart = $_REQUEST['nextStart'] - 0; + + // Otherwise it must be Previous + } else { + $newStart = $_REQUEST['prevStart'] - 0; + } + + if ($newStart > 0) { + $start = $newStart; + } } // Get list of requests - $requests = $this->getList($where); - if ($requests) { + $requestsResult = $this->getList($where, $order, true, 'id', $start, $limit); + if ($requestsResult) { + $haveRequests = true; + $requests = $requestsResult['list']; + + // Get total numbers of requests + $requestsCount = $this->getStats($where); + + // If the number of registrants is less than a page, don't do paging + if ($requestsCount <= $limit) { + $paging = false; + } + + // Get paging results + $numbDisplayed = $requestsResult['returned']; + $lastDisplayed = $requestsResult['last']; + if ($start == 1) { + $prevStart = false; + } else { + $prevStart = $start - $limit; + if ($start < 1) { + $start = 1; + } + } + if ($requestsResult['returned'] == $limit) { + $nextStart = $start + $limit; + } + + // Calc Cart ID check + foreach ($requests as $key=>$val) { + $requests[$key]['cartCheck'] = md5($val['id'].$this->config['cart_id_check_secret']); + } + } $view = 'requestsDashboard.html'; @@ -234,12 +409,22 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ setcookie("glmMembersDatabaseRegistrationRequestID", $requestID, time()+86400); } - // echo "
".print_r($cart,1)."
"; + //echo "
".print_r($requests,1)."
"; // Compile template data $templateData = array( + 'numbDisplayed' => $numbDisplayed, + 'lastDisplayed' => $lastDisplayed, + 'paging' => $paging, + 'prevStart' => $prevStart, + 'nextStart' => $nextStart, + 'start' => $start, + 'limit' => $limit, + 'orderBy' => $orderBy, 'haveRequests' => $haveRequests, 'requests' => $requests, + 'requestsCount' => $requestsCount, + 'orderBy' => $orderBy, 'haveRequest' => $haveRequest, 'requestID' => $requestID, 'cart' => $cart, @@ -247,7 +432,8 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ 'errorMsg' => $errorMsg, 'option' => $option, 'deleted' => $deleted, - 'showCartRequests' => $showCartRequests, + 'textSearch' => $textSearch, + 'statusOptions' => $statusOptions, 'messages' => $messages, 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/' ); diff --git a/models/front/registrations/cart.php b/models/front/registrations/cart.php index e125d29..61595fb 100644 --- a/models/front/registrations/cart.php +++ b/models/front/registrations/cart.php @@ -83,6 +83,7 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport $haveCart = false; $option = false; $blockCheckout = false; + $view = 'cart'; // Get misc texts require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php'; @@ -111,6 +112,11 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport // Get ID from REQUEST Make sure it's numeric $cartId = ($_REQUEST['cartId'] - 0); + // Supplied ID requires check code + if ($_REQUEST['cartCheck'] != md5($cartId.$this->config['cart_id_check_secret'])) { + $view = 'cartSecurityViolation'; + } + // If bad cart ID, set to false if ($cartId <= 0) { $cartId = false; @@ -140,8 +146,6 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport } - $view = 'cart'; - // Compile template data $templateData = array( 'page' => 'cart', diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php index 117de0b..4321096 100644 --- a/models/front/registrations/checkoutProcess.php +++ b/models/front/registrations/checkoutProcess.php @@ -828,6 +828,9 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport $messages[] = 'Cart Summary did not store. This is a technical issue that means our systems could not store a summmary of what you submitted.'; } + // Get the entire request again to make sure all of the data is available. + $this->checkRegistrationRequest($requestId); + // Update inventory totals and send notifications unless this is a test submission $this->checkoutUpdateInventoryAndNotify($summary, false, $doNotClear); @@ -859,13 +862,15 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport 'summary' => $summary, 'misc' => $misc, 'reg_account_id' => $accountId, - 'regAccount' => $regAccount, + 'regAccount' => $Account->editEntry($accountId), 'states_list' => $this->config['states'], 'country_list' => $this->config['countries'], 'emailError' => $emailError, 'passwordError' => $passwordError, ); + // echo "
".print_r($templateData['regAccount'],1)."
"; + // Return status, any suggested view, and any data to controller return array( 'status' => true, diff --git a/views/admin/ajax/registrantsListExport.html b/views/admin/ajax/registrantsListExport.html index 0fcbb1c..f7cb58d 100644 --- a/views/admin/ajax/registrantsListExport.html +++ b/views/admin/ajax/registrantsListExport.html @@ -1,10 +1,24 @@ + - Total found: {$registrantCount}   - List of {$terms.reg_term_attendee_plur_cap} + + List of {$terms.reg_term_attendee_plur_cap} + Event: {$event.event_name} + Time of Report: {$time|date_format: "%D %I:%M %p"} + Results found {$registrantCount} +
@@ -61,7 +75,7 @@ {/foreach} {else} - (no {$terms.reg_term_attendee_plur_cap} listed) + **** {$message} **** {/if} diff --git a/views/admin/ajax/registrantsListExportCsv.html b/views/admin/ajax/registrantsListExportCsv.html index 0cac653..d1a223b 100644 --- a/views/admin/ajax/registrantsListExportCsv.html +++ b/views/admin/ajax/registrantsListExportCsv.html @@ -33,4 +33,5 @@ {if $select.exportCustom && $customFieldHeaders}{foreach $m.custom_data as $cData},"{$cData}"{/foreach}{/if} {/foreach} -{else}No {$terms.reg_term_attendee_plur_cap} Selected{/if} +"Total","{$registrantCount}" +{else}**** {$message} ****{/if} diff --git a/views/admin/registrations/eventRegistrants.html b/views/admin/registrations/eventRegistrants.html index d1c680d..2f20dc9 100644 --- a/views/admin/registrations/eventRegistrants.html +++ b/views/admin/registrations/eventRegistrants.html @@ -4,11 +4,6 @@ {if $errorMsg}

{$errorMsg}

{/if} -

{$terms.reg_term_attendee_plur_cap} List

Export {$terms.reg_term_attendee_plur}
@@ -22,27 +17,40 @@

+ - Text Search: - - + Text Search: +     + + Status: (Select at least one) + +     {if $haveTimes} Time Selected {/if} - +

@@ -80,6 +88,7 @@ Status Submitted Not Attending +   @@ -98,6 +107,13 @@ {$r.request_status_name} {$r.date_submitted} {if $r.not_attending.value}NOT ATTENDING{/if} + + View Request + {if $r.request_status.value == 0} + Access Cart + {/if} + + - Check All Uncheck All Please select at least one.
- {foreach from=$submitStatus key=status_id item=status_name} - {$status_name}
- {/foreach} + Check All Uncheck All
+ Please select at least one.
+ {foreach $statusOptions as $status} + {$status.name}
+ {/foreach} @@ -231,6 +248,28 @@ + + Sort/Group Results By: + + + + + +
+ +
+ + Export to: @@ -455,6 +494,8 @@ jQuery(document).ready(function($){ $('.glm-admin-table-inner').mouseleave( function() { $('#attendeeLinks_' + attendeeHoverId).addClass('glm-hidden'); }) + + $('#statusFieldsSelect').multiselect(); }); diff --git a/views/admin/registrations/requestsDashboard.html b/views/admin/registrations/requestsDashboard.html index 3d176c3..5405894 100644 --- a/views/admin/registrations/requestsDashboard.html +++ b/views/admin/registrations/requestsDashboard.html @@ -19,23 +19,44 @@

- Show attendees in pending carts (not yet submitted): - - - - + Text Search: +     + + Status: (Select at least one) + +     + + Order/Group By: {$orderBy} + +    

- -
+
+ +

Total found: {if $haveRequests}{$requestsCount}{else}(none){/if}  

+ + {if $paging} + + + {/if} @@ -52,13 +73,14 @@ + {if $haveRequests} {foreach $requests as $r} - + @@ -70,6 +92,12 @@ + {/foreach} {else} @@ -78,7 +106,24 @@
Created Updated Status 
{$r.id}{$r.id} {$r.bill_fname} {$r.bill_lname} {$r.bill_org}{$r.date_created.datetime|substr:0:10} {$r.last_update.datetime|substr:0:10} {$r.status.name} + View Request + {if $r.status.value == 0} + Access Cart + {/if} +
-
+ {if $paging} + + + {/if} + +
+ + + + + {include file='admin/footer.html'} diff --git a/views/front/registrations/cartSecurityViolation.html b/views/front/registrations/cartSecurityViolation.html new file mode 100644 index 0000000..4fab9f3 --- /dev/null +++ b/views/front/registrations/cartSecurityViolation.html @@ -0,0 +1,3 @@ +
+

You are not permitted access to this page.

+
\ No newline at end of file diff --git a/views/front/registrations/summary.html b/views/front/registrations/summary.html index 19ddaca..0e1a8e3 100644 --- a/views/front/registrations/summary.html +++ b/views/front/registrations/summary.html @@ -39,7 +39,7 @@