From 64204ac54403197fcbc47a8f5416edb263a132ea Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 10 Jan 2019 16:10:50 -0500 Subject: [PATCH] Added Stand-Alone Registrations and various other features and fixes Added sort order for registration classes (levels) - Drag and Drop Added ability to create a Stand-Alone registrations event (Not tied to event in Events Add-On). Added ability to hide registration events from front-end lists. Added ability to select a registrations event by code. Added ability to specify a registrations event on URL using registration event code rather than ID. Added ability to go direct to a registrations event front-end page from admin registrations event dashboard. Added more terms and phrases and updated defaults for those that didn't have them. Added notification on registrations event dashboard for why a registrations event won't show up on front-end. More intelligent selection of month initially displayed for calendar in dashboard for a specific event. Displaying above calendar why the initial month displayed was selected. Hide after month change. Added reg_bill_info_requested field to management for selection of checkout fields. Defaulted reg_bill_info_requested field to all on to show all checkout fields by default. Commented out management selection of checkout fields by payment type temporarily. New Rate edit form now has default values. Fixed a range of error log notices regarding undefined variables in models and views. Removed "data" directory with code to inject original test data. Fixed non-working "Read More" button on registration page. Fixed incorrect "Total Charge" at bottom of checkout page when discount codes are applied. Fixed bad dialog box layout due to CSS from Bootstrap Fixed incorrect use of href in form tag --- classes/data/dataManagement.php | 21 +- classes/data/dataRegEvent.php | 368 +++++++-- classes/data/dataRegRequestRegistrant.php | 2 +- classes/data/dataSettingsTerms.php | 32 + classes/regCartSupport.php | 1 + config/plugin.ini | 18 +- css/admin.css | 42 +- data/event_setup.php | 431 ---------- data/events.php | 50 -- defines.php | 1 - index.php | 2 +- js/frontRegApp.js | 20 +- js/models/front/account.js | 4 +- js/models/front/regRequestRegistrant.js | 2 + js/views/front/regRequestRegistrant.js | 4 + js/views/front/regTime.js | 4 + js/views/front/registrantForm.js | 6 + models/admin/ajax/regFront/registrant.php | 6 + models/admin/ajax/registrantsListExport.php | 48 +- models/admin/registrations/accounts.php | 11 + models/admin/registrations/events_addEdit.php | 218 ++++-- .../registrations/events_eventDashboard.php | 245 +++++- .../registrations/events_globalCodes.php | 1 + .../events_notificationsUpdate.php | 17 +- .../registrations/events_paymentCodes.php | 90 +-- .../registrations/events_registrants.php | 18 +- models/admin/registrations/events_update.php | 46 +- models/front/registrations/checkout.php | 11 + .../front/registrations/checkoutProcess.php | 4 + models/front/registrations/list.php | 36 +- models/front/registrations/register.php | 6 + models/front/registrations/registration.php | 376 +++++---- readme.txt | 29 +- setup/adminHooks.php | 2 +- setup/adminMenus.php | 2 +- ..._V1.0.2.sql => create_database_V1.0.3.sql} | 230 ++++-- setup/databaseScripts/dbVersions.php | 3 +- ...se_V1.0.2.sql => drop_database_V1.0.3.sql} | 0 .../update_database_V0.0.10.sql | 2 +- .../update_database_V1.0.3.sql | 126 +++ views/admin/ajax/registrantsListExport.html | 4 + .../admin/ajax/registrantsListExportCsv.html | 4 + views/admin/management/registrations.html | 69 +- views/admin/management/regterms.html | 73 +- .../admin/registrations/accountDashboard.html | 10 +- .../registrations/accountsDashboard.html | 24 +- views/admin/registrations/eventDashboard.html | 116 ++- views/admin/registrations/eventEdit.html | 733 +++++++++++++++++- .../admin/registrations/eventEditLevels.html | 46 +- .../registrations/eventEditNotification.html | 32 +- .../registrations/eventPaymentCodes.html | 37 +- .../admin/registrations/eventRegistrants.html | 54 +- views/admin/registrations/eventSubTabs.html | 6 +- .../admin/registrations/eventsDashboard.html | 390 +++++----- .../admin/registrations/requestDashboard.html | 32 +- views/admin/registrations/requestEdit.html | 20 +- views/admin/settings/registrationsMisc.html | 250 +++--- views/front/registrations/account.html | 6 +- views/front/registrations/cart.html | 4 +- views/front/registrations/checkout.html | 50 +- views/front/registrations/list.html | 15 +- views/front/registrations/register.html | 8 + views/front/registrations/registration.html | 71 +- views/front/registrations/summary.html | 8 + views/front/registrations/summaryStore.html | 48 +- 65 files changed, 3051 insertions(+), 1594 deletions(-) delete mode 100644 data/event_setup.php delete mode 100644 data/events.php rename setup/databaseScripts/{create_database_V1.0.2.sql => create_database_V1.0.3.sql} (81%) rename setup/databaseScripts/{drop_database_V1.0.2.sql => drop_database_V1.0.3.sql} (100%) mode change 100644 => 100755 setup/databaseScripts/update_database_V0.0.10.sql create mode 100755 setup/databaseScripts/update_database_V1.0.3.sql diff --git a/classes/data/dataManagement.php b/classes/data/dataManagement.php index 5bfbd5f..dcf779d 100644 --- a/classes/data/dataManagement.php +++ b/classes/data/dataManagement.php @@ -358,6 +358,16 @@ class GlmDataRegistrationsManagement extends GlmDataAbstract 'default' => 0, ), + // Billing fields to be used at checkout + 'reg_bill_info_requested' => array ( + 'field' => 'reg_bill_info_requested', + 'type' => 'bitmap', + 'bitmap' => $this->config['billing_field'], + 'default' => 0, // none selected + 'use' => 'a' + ), + +/* // Billing Info used for No Charge - Bitmap 'reg_bill_info_req_no_charge' => array ( 'field' => 'reg_bill_info_req_no_charge', @@ -419,7 +429,7 @@ class GlmDataRegistrationsManagement extends GlmDataAbstract 'use' => 'a', 'default' => 0 ), - +*/ // Registration Request Hold Days 'reg_request_hold_days' => array ( 'field' => 'reg_request_hold_days', @@ -458,8 +468,15 @@ class GlmDataRegistrationsManagement extends GlmDataAbstract 'type' => 'checkbox', 'use' => 'a', 'default' => 0 - ) + ), + // Show event select by code form on list poage + 'reg_show_select_by_code' => array ( + 'field' => 'reg_show_select_by_code', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ) ); diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index 4f6667c..b4f5d75 100755 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -142,7 +142,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract 'field' => 'event', 'type' => 'integer', 'required' => true, - 'use' => 'lgned' + 'use' => 'a' ), // Event Name @@ -158,6 +158,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract 'field' => 'event_code', 'type' => 'text', 'required' => true, + 'unique' => true, 'use' => 'a' ), @@ -189,8 +190,17 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract 'time_specific' => array ( 'field' => 'time_specific', 'type' => 'checkbox', - 'use' => 'a', - 'default' => 1 + 'required' => true, + 'default' => null, + 'use' => 'a' + ), + + // Flag to indicate that this event should not be included in registration event listings + 'not_included_in_lists' => array ( + 'field' => 'not_included_in_lists', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' ), // Registration requires attendees - Otherwise the person submitting the registration is the registrant @@ -305,7 +315,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // Name of a downloadable file 'reg_file' => array ( 'field' => 'reg_file', - 'type' => 'text', + 'type' => 'file', 'required' => false, 'use' => 'a' ), @@ -334,6 +344,183 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract 'use' => 'a' ), + /* + * The following fields are used for stand-alone registrations only + */ + + // Event Image + 'image' => array( + 'field' => 'image', + 'type' => 'image', + 'use' => 'a' + ), + + // Cost Description + 'cost' => array ( + 'field' => 'cost', + 'type' => 'text', + 'use' => 'a' + ), + + // Hide Location Address + 'hide_address' => array ( + 'field' => 'hide_address', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Use Member Location rather than location table + 'use_member_location' => array ( + 'field' => 'use_member_location', + 'type' => 'checkbox', + 'use' => 'a' + ), + + // Member for use member location + 'member' => array( + 'field' => 'member', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => true, + 'force_list' => true, + 'use' => 'a' + ), + + // Location Name + 'location_name' => array ( + 'field' => 'location_name', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Address + 'address' => array ( + 'field' => 'address', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // City - References main plugin cities table + 'city' => array ( + 'field' => 'city', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'cities', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => false, + 'force_list' => true, + 'use' => 'a' + ), + + // State + 'state' => array ( + 'field' => 'state', + 'type' => 'list', + 'list' => $this->config['states'], + 'default' => 'MI', + 'force_list' => true, + 'use' => 'a' + ), + + // ZIP / Postal Code + 'zip' => array ( + 'field' => 'zip', + 'type' => 'text', + 'use' => 'a' + ), + + // Country + 'country' => array ( + 'field' => 'country', + 'type' => 'list', + 'list' => $this->config['countries'], + 'default' => 'US', + 'force_list' => true, + 'use' => 'a' + ), + + // Latitude + 'lat' => array( + 'field' => 'lat', + 'type' => 'float', + 'default' => $this->config['settings']['maps_default_lat'], + 'use' => 'a' + ), + + // Longitude + 'lon' => array( + 'field' => 'lon', + 'type' => 'float', + 'default' => $this->config['settings']['maps_default_lon'], + 'use' => 'a' + ), + + // Region - References main plugin regions table + 'region' => array ( + 'field' => 'region', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'regions', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => false, + 'force_list' => true, + 'use' => 'a' + ), + + // Phone Number + 'phone' => array ( + 'field' => 'phone', + 'type' => 'text', + 'use' => 'a' + ), + + // URL + 'url' => array ( + 'field' => 'url', + 'type' => 'text', + 'use' => 'a' + ), + + // E-Mail + 'email' => array ( + 'field' => 'email', + 'type' => 'text', + 'use' => 'a' + ), + + // Not including contact addon ID yet + + // Contact First Name + 'contact_fname' => array ( + 'field' => 'contact_fname', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Last Name + 'contact_lname' => array ( + 'field' => 'contact_lname', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact phone + 'contact_phone' => array ( + 'field' => 'contact_phone', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact E-Mail Address + 'contact_email' => array ( + 'field' => 'contact_email', + 'type' => 'text', + 'use' => 'a' + ) + ); } @@ -369,50 +556,78 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // If doing the following actions if (in_array($action, array('l','g'))) { - // Use hook to Events to get current data for this event - $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']); - - // echo '
$eventData: ' . print_r( $eventData, true ) . '
'; - - // Add to the registration event array - $result_data['intro'] = $eventData['intro']; - $result_data['eventDescr'] = $eventData['descr']; - $result_data['image'] = $eventData['image']; - $result_data['contact_name'] = $eventData['contact_name']; - $result_data['contact_email'] = $eventData['contact_email']; - $result_data['contact_phone'] = $eventData['contact_phone']; - $result_data['url'] = $eventData['url']; - $result_data['eventCost'] = $eventData['cost']; - $result_data['hide_address'] = $eventData['hide_address']; - $result_data['use_member_location'] = $eventData['use_member_location']; - - // Check for times data and use that. - if ( isset( $eventData['times'] ) && $eventData['times'] ) { - $result_data['times'] = $eventData['times']; - } - if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) { - $result_data['starting_date'] = $eventData['starting_date']; - } - if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) { - $result_data['ending_date'] = $eventData['ending_date']; - } - if ( isset( $eventData['locations'] ) && $eventData['locations'] ) { - $result_data['locations'] = $eventData['locations']; - } - if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) { - $result_data['other_ref_dest'] = $eventData['other_ref_dest']; - } - if ( isset( $eventData['member'] ) && $eventData['member'] ) { - $result_data['member'] = $eventData['member']; - } - if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) { - $result_data['recurrences'] = $eventData['recurrences']; - } - if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) { - $result_data['all_day'] = $eventData['all_day']; + // If this is not a stand-alone registrations event, get the event data + if ($result_data['event'] != 0) { + + // Use hook to Events to get current data for this event + $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']); + + // echo '
$eventData: ' . print_r( $eventData, true ) . '
'; + + // Add to the registration event array + $result_data['intro'] = $eventData['intro']; + $result_data['eventDescr'] = $eventData['descr']; + $result_data['image'] = $eventData['image']; + $result_data['contact_name'] = $eventData['contact_name']; + $result_data['contact_email'] = $eventData['contact_email']; + $result_data['contact_phone'] = $eventData['contact_phone']; + $result_data['url'] = $eventData['url']; + $result_data['eventCost'] = $eventData['cost']; + $result_data['hide_address'] = $eventData['hide_address']; + $result_data['use_member_location'] = $eventData['use_member_location']; + + // Check for times data and use that. + if ( isset( $eventData['times'] ) && $eventData['times'] ) { + $result_data['times'] = $eventData['times']; + } + if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) { + $result_data['starting_date'] = $eventData['starting_date']; + } + if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) { + $result_data['ending_date'] = $eventData['ending_date']; + } + if ( isset( $eventData['locations'] ) && $eventData['locations'] ) { + $result_data['locations'] = $eventData['locations']; + } + if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) { + $result_data['other_ref_dest'] = $eventData['other_ref_dest']; + } + if ( isset( $eventData['member'] ) && $eventData['member'] ) { + $result_data['member'] = $eventData['member']; + } + if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) { + $result_data['recurrences'] = $eventData['recurrences']; + } + if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) { + $result_data['all_day'] = $eventData['all_day']; + } + + // Stand-Alone event, so assemble certain data as if it came from an event listing + } else { + + // Check first if the current request included the location data + if (isset($result_data['cost'])) { + $result_data['eventCost'] = $result_data['cost']; + $result_data['locations'] = array( + 'name' => $result_data['location_name'], + 'address' => $result_data['address'], + 'city' => $result_data['city'], + 'state' => $result_data['state'], + 'zip' => $result_data['zip'], + 'country' => $result_data['country'], + 'lat' => $result_data['lat'], + 'lon' => $result_data['lon'], + 'region' => $result_data['region'], + 'phone' => $result_data['phone'], + 'url' => $result_data['url'], + 'email' => $result_data['email'], + 'contact_name' => $result_data['contact_fname'].' '.$result_data['contact_lname'], + 'contact_phone' => $result_data['contact_phone'], + 'contact_email' => $result_data['contact_email'] + ); + } } } - } // If we're asked to get registrant counts @@ -541,12 +756,12 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract $savedFields = $this->fields; $this->fields = array( - 'id' => $savedFields['id'], - 'event_name' => $savedFields['event_name'], - 'notify_email' => $savedFields['notify_email'], - 'descr' => $savedFields['descr'], - 'first_datetime' => $savedFields['first_datetime'], - 'last_datetime' => $savedFields['last_datetime'] + 'id' => $savedFields['id'], + 'event_name' => $savedFields['event_name'], + 'notify_email' => $savedFields['notify_email'], + 'descr' => $savedFields['descr'], + 'first_datetime' => $savedFields['first_datetime'], + 'last_datetime' => $savedFields['last_datetime'] ); $r = $this->getEntry($eventId); @@ -861,34 +1076,37 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract if ($haveTimeEntry) { $firstDateTime = array('datetime' => date('m/d/Y h:i A', $firstTime), 'timestamp' => $firstTime, 'mysql_datetime' => date('Y-m-d H:i:s', $firstTime)); $lastDateTime = array('datetime' => date('m/d/Y h:i A', $lastTime), 'timestamp' => $lastTime, 'mysql_datetime' => date('Y-m-d H:i:s', $lastTime)); + + // Check if we need to update first and/or last event times in database - if so, do that + if ($this->regEventData['first_datetime']['timestamp'] != $firstTime || + $this->regEventData['last_datetime']['timestamp'] != $lastTime ) { + + // Update the regEventData first and last times + $this->regEventData['first_datetime'] = $firstDateTime; + $this->regEventData['last_datetime'] = $lastDateTime; + + // Update the database + $this->wpdb->update( + GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event', + array( + 'first_datetime' => $firstDateTime['mysql_datetime'], + 'last_datetime' => $lastDateTime['mysql_datetime'], + ), + array( 'id' => $this->regEventData['id'] ), + array( + '%s', + '%s' + ) + ); + } + + + } else { $firstDateTime = 'NULL'; $lastDateTime = 'NULL'; } - // Check if we need to update first and/or last event times in database - if so, do that - if ($this->regEventData['first_datetime']['timestamp'] != $firstTime || - $this->regEventData['last_datetime']['timestamp'] != $lastTime - ) { - - // Update the regEventData first and last times - $this->regEventData['first_datetime'] = $firstDateTime; - $this->regEventData['last_datetime'] = $lastDateTime; - - // Update the database - $this->wpdb->update( - GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event', - array( - 'first_datetime' => $firstDateTime['mysql_datetime'], - 'last_datetime' => $lastDateTime['mysql_datetime'], - ), - array( 'id' => $this->regEventData['id'] ), - array( - '%s', - '%s' - ) - ); - } // If this is a non-time-specific event if (!$this->regEventData['time_specific']) { diff --git a/classes/data/dataRegRequestRegistrant.php b/classes/data/dataRegRequestRegistrant.php index 7f0c1f0..5ff98b5 100755 --- a/classes/data/dataRegRequestRegistrant.php +++ b/classes/data/dataRegRequestRegistrant.php @@ -388,7 +388,6 @@ class GlmDataRegistrationsRequestRegistrant extends GlmDataAbstract return false; } $registrants = $listResult['list']; - $registrantCount = $this->getStats(str_replace('T.', '', $whereEvent)); // Make sure we received registrants @@ -460,6 +459,7 @@ class GlmDataRegistrationsRequestRegistrant extends GlmDataAbstract // Try to get any per } + $listResult['list'] = $registrants; $listResult['totalCount'] = $registrantCount; diff --git a/classes/data/dataSettingsTerms.php b/classes/data/dataSettingsTerms.php index b9223d1..7ef91d6 100644 --- a/classes/data/dataSettingsTerms.php +++ b/classes/data/dataSettingsTerms.php @@ -444,6 +444,38 @@ class GlmDataRegistrationsSettingsTerms extends GlmDataAbstract 'use' => 'a' ), + // Term for rate + 'reg_term_rate' => array ( + 'field' => 'reg_term_rate', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Term for Rate (cap) + 'reg_term_rate_cap' => array ( + 'field' => 'reg_term_rate_cap', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Term for rates (plur) + 'reg_term_rate_plur' => array ( + 'field' => 'reg_term_rate_plur', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Term for Rates (plur, cap) + 'reg_term_rate_plur_cap' => array ( + 'field' => 'reg_term_rate_plur_cap', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + // Term for payment code 'reg_term_payment_code' => array ( 'field' => 'reg_term_payment_code', diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index 6bbeb67..985fa7a 100755 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -1441,6 +1441,7 @@ class GlmRegCartSupport 'SubmittedByOrganization' => $account['org'], 'BillingFirstname' => $this->cart['request']['bill_fname'], 'BillingLastname' => $this->cart['request']['bill_lname'], + 'BillingOrg' => $this->cart['request']['bill_org'], 'BillingAddrLine1' => $this->cart['request']['bill_addr1'], 'BillingAddrLine2' => $this->cart['request']['bill_addr2'], 'BillingCity' => $this->cart['request']['bill_city'], diff --git a/config/plugin.ini b/config/plugin.ini index 23e5d86..5f7ac20 100755 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -7,7 +7,7 @@ [common] -cart_id_check_secret = 'GlMREGcartSecret4ID' +cart_id_check_secret = 'GlMREGcartSecret4ID' ; ; Show Rate type (how it rates will be displayed in lists) - Use as List @@ -184,15 +184,15 @@ billing_field[10] = 'Country' billing_field[11] = 'Phone' billing_field[12] = 'FAX' -billing_field_numb['First Name'] = 1 -billing_field_numb['Last Name'] = 2 +billing_field_numb['FirstName'] = 1 +billing_field_numb['LastName'] = 2 billing_field_numb['Organization'] = 3 -billing_field_numb['Title/Department'] = 4 -billing_field_numb['Address Line 1'] = 5 -billing_field_numb['Address Line 2'] = 6 +billing_field_numb['TitleDepartment'] = 4 +billing_field_numb['AddressLine1'] = 5 +billing_field_numb['AddressLine2'] = 6 billing_field_numb['City'] = 7 billing_field_numb['State'] = 8 -billing_field_numb['ZIP/Postal Code'] = 9 +billing_field_numb['ZIPPostalCode'] = 9 billing_field_numb['Country'] = 10 billing_field_numb['Phone'] = 11 billing_field_numb['FAX'] = 12 @@ -202,9 +202,9 @@ billing_field_numb['FAX'] = 12 ; submission_status[0] = 'In Cart' submission_status[10] = 'Complete' -; submission_status[20] = 'Unpaid' +; submission_status[20] = 'Unpaid' submission_status[30] = 'Card Pending' -; submission_status[40] = 'Card Declined' +; submission_status[40] = 'Card Declined' submission_status[50] = 'Payment Pending' submission_status[60] = 'Pay On Arrival' submission_status[70] = 'Administrative Hold' diff --git a/css/admin.css b/css/admin.css index 7eba174..60d3178 100755 --- a/css/admin.css +++ b/css/admin.css @@ -48,9 +48,9 @@ } .reg-level-container { margin-bottom: 1em; - background-color: white; - padding: .25rem; - border: 1px solid black; + background-color: white; + padding: .25rem; + border: 1px solid black; cursor: pointer; } .reg-level-display-container { @@ -67,8 +67,8 @@ } .reg-level-edit-container { display: none; - border: 1px solid black; - padding: 1em; + border: 1px solid black; + padding: 1em; background-color: #f8ffff; margin: 1em; } @@ -85,9 +85,9 @@ margin-bottom: .5em; } .reg-rate-edit-container { - display: none; - border: 1px solid black; - padding: 1em; + display: none; + border: 1px solid black; + padding: 1em; background-color: #f8ffff; margin: 1em; } @@ -143,6 +143,19 @@ font-size: 0.875rem; } +/* Admin Event Dashboard page */ +.reg-non-time-specific-max-form { + border: 1px solid #bbb; + padding: 5px; + margin: 1em 0 1em 0; +} + +/* Admin Event Edit page */ +.reg-event-edit-section { + text-align: left; + font-size: 1.2em; + padding: 1em 0 1em 0; +} /* Event Registration Edit Page */ .glm-reg-label{ @@ -251,15 +264,15 @@ label.registrant-label { padding: 2rem 0 1rem 0; } .glm-reg-message-title { - padding: 1rem 0 1rem 0; + padding: 1rem 0 1rem 0; } .glm-reg-message-prompt { text-align: right !important; - padding-top: 3rem; + padding-top: 3rem; } .glm-reg-message-prompt-email-text { text-align: right !important; - padding-top: 3rem; + padding-top: 3rem; } .glm-reg-message-body { } @@ -349,7 +362,7 @@ span.glm-error { .glm-reg-cart-item, .glm-reg-cart-registrant{ /* padding: 0;*/ } - + } /*{{{ Media Queries */ @@ -375,7 +388,7 @@ span.glm-error { } @media (max-width: 1024px) { - + } @media(min-width: 1024px){ .glm-reg-cart-summary-custom-fields{ @@ -385,4 +398,5 @@ span.glm-error { .glm-reg-cart-custom-charge{ margin-top: -5px; } -} \ No newline at end of file +} + diff --git a/data/event_setup.php b/data/event_setup.php deleted file mode 100644 index f291701..0000000 --- a/data/event_setup.php +++ /dev/null @@ -1,431 +0,0 @@ - array - ( - 'id' => 1000, - 'event' => 1, - 'event_name' => 'GLM Sample Event', - 'event_code' => 'glm-sample-event', - 'notify_email' => '', - 'admin_active' => true, - 'active' => false, - 'attendees' => true, - 'attendee_max' => 50, - 'attendee_max_per_reg' => 5, - 'reg_hold_minutes' => 30, - 'cart_hold_days' => 2, - 'registration_account_options' => 7, // Guest, Saved accounts, Member Contact registrations - 'payment_methods' => 18, // Credit Card and comp code - 'restricted_payment_methods' => 13, // No charge, cash, check - 'terms' => 'Sample terms and conditions', - 'reg_file' => '', - 'reg_file_title' => '' - ), - - // reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals - 'reg_time' => array - ( - 1 => array - ( - 'id' => 1100, - 'reg_event' => 1000, - 'event_time' => false, - 'start_datetime' => null, - 'end_datetime' => null, - 'all_day' => true, - 'attendees' => true, - 'attendee_max' => false, - 'attendee_count' => 0, - 'attendee_pending' => 0, - 'attendees_available' => 50, - 'total_base_charge' => 0, - 'total_per_attendee' => 0, - 'total_other' => 0, - 'total_taxes' => 0, - 'total_charge' => 0, - 'total_discounts' => 0, - 'total_payments' => 0 - ) - // Additional times registration may take place - ), - - // reg_class - Type of registration for this event (one or more) - 'reg_class' => array - ( - 1 => array - ( - 'id' => 1200, - 'reg_event' => 1000, - 'name' => 'Standard', - 'descr' => 'Standard registration for this event. Provides all standard attendee privileges.', - 'reg_rate_name' => 'Early Bird', - 'reg_rate_base_price' => 100.00, - 'reg_rate_per_reg' => 10.00, - // 'reg_rate' => array - // ( - // 1 => array - // ( - // 'id' => 1300, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Early Bird', - // 'start_days' => 60, - // 'end_days' => 31, - // 'base_rate' => 100.00, - // 'per_registrant' => 10.00, - // 'registrant_credits' => 1 - // ), - // 2 => array - // ( - // 'id' => 1301, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Standard Registration', - // 'start_days' => 30, - // 'end_days' => 11, - // 'base_rate' => 120.00, - // 'per_registrant' => 12.00, - // 'registrant_credits' => 1 - // ), - // 3 => array - // ( - // 'id' => 1302, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Last Chance', - // 'start_days' => 10, - // 'end_days' => 2, // no registration after 2 days before event - // 'base_rate' => 160.00, - // 'per_registrant' => 16.00, - // 'registrant_credits' => 1 - // ), - // ) - ), - - 2 => array( - 'id' => 1201, - 'reg_event' => 1000, - 'name' => 'Deluxe', - 'descr' => 'Deluxe registration for this event. Provides all attendee privileges.', - 'reg_rate_name' => 'Early Bird', - 'reg_rate_base_price' => 100.00, - 'reg_rate_per_reg' => 10.00, - // 'reg_rate' => array - // ( - // 1 => array - // ( - // 'id' => 1300, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Early Bird', - // 'start_days' => 60, - // 'end_days' => 31, - // 'base_rate' => 100.00, - // 'per_registrant' => 10.00, - // 'registrant_credits' => 1 - // ), - // 2 => array - // ( - // 'id' => 1301, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Standard Registration', - // 'start_days' => 30, - // 'end_days' => 11, - // 'base_rate' => 120.00, - // 'per_registrant' => 12.00, - // 'registrant_credits' => 1 - // ), - // 3 => array - // ( - // 'id' => 1302, - // 'reg_event' => 1000, - // 'reg_class' => 1200, - // 'name' => 'Last Chance', - // 'start_days' => 10, - // 'end_days' => 2, // no registration after 2 days before event - // 'base_rate' => 160.00, - // 'per_registrant' => 16.00, - // 'registrant_credits' => 1 - // ), - // ) - ), - - // reg_rates - Date range / rate for a reg class (one or more) - - ) - -); - - -//echo "
".print_r($regEventSample,1)."
"; - -/* Sample actual data for reference for a complete event (this one doesn't include classes and times yet) - -Array -( - [id] => 61 - [event] => 2 - [event_name] => Active Time - [event_code] => active-time - [notify_email] => cscott@gaslightmedia.com - [admin_active] => Array - ( - [list] => - [value] => 0 - [name] => No - ) - - [active] => Array - ( - [list] => - [value] => 1 - [name] => Yes - ) - - [time_specific] => Array - ( - [list] => - [value] => 0 - [name] => No - ) - - [attendees] => Array - ( - [list] => - [value] => 0 - [name] => No - ) - - [attendee_max] => 0 - [attendee_max_per_reg] => 0 - [reg_hold_minutes] => 60 - [cart_hold_days] => 10 - [registration_account_options] => Array - ( - [bitmap] => Array - ( - [1] => Array - ( - [name] => Guest Registration - [nameEsc] => Guest Registration - [value] => 1 - [default] => 1 - ) - - [2] => Array - ( - [name] => Saved Registration Accounts - [nameEsc] => Saved Registration Accounts - [value] => 2 - [default] => 1 - ) - - [3] => Array - ( - [name] => Member Contact Registrations - [nameEsc] => Member Contact Registrations - [value] => 3 - [default] => 1 - ) - - ) - - [value] => 14 - [names] => Array - ( - [1] => Guest Registration - [2] => Saved Registration Accounts - [3] => Member Contact Registrations - ) - - ) - - [payment_methods] => Array - ( - [bitmap] => Array - ( - [1] => Array - ( - [name] => No Charge - [nameEsc] => No Charge - [value] => 1 - [default] => - ) - - [2] => Array - ( - [name] => Comp Code - [nameEsc] => Comp Code - [value] => 2 - [default] => 1 - ) - - [3] => Array - ( - [name] => Cash - [nameEsc] => Cash - [value] => 3 - [default] => - ) - - [4] => Array - ( - [name] => Check - [nameEsc] => Check - [value] => 4 - [default] => - ) - - [5] => Array - ( - [name] => Credit Card - [nameEsc] => Credit Card - [value] => 5 - [default] => 1 - ) - - [6] => Array - ( - [name] => Call from Merchant - [nameEsc] => Call from Merchant - [value] => 6 - [default] => - ) - - [99] => Array - ( - [name] => Undefined - [nameEsc] => Undefined - [value] => 99 - [default] => - ) - - ) - - [value] => 36 - [names] => Array - ( - [2] => Comp Code - [5] => Credit Card - ) - - ) - - [restricted_payment_methods] => Array - ( - [bitmap] => Array - ( - [1] => Array - ( - [name] => No Charge - [nameEsc] => No Charge - [value] => 1 - [default] => 1 - ) - - [2] => Array - ( - [name] => Comp Code - [nameEsc] => Comp Code - [value] => 2 - [default] => - ) - - [3] => Array - ( - [name] => Cash - [nameEsc] => Cash - [value] => 3 - [default] => 1 - ) - - [4] => Array - ( - [name] => Check - [nameEsc] => Check - [value] => 4 - [default] => 1 - ) - - [5] => Array - ( - [name] => Credit Card - [nameEsc] => Credit Card - [value] => 5 - [default] => - ) - - [6] => Array - ( - [name] => Call from Merchant - [nameEsc] => Call from Merchant - [value] => 6 - [default] => - ) - - [99] => Array - ( - [name] => Undefined - [nameEsc] => Undefined - [value] => 99 - [default] => - ) - - ) - - [value] => 26 - [names] => Array - ( - [1] => No Charge - [3] => Cash - [4] => Check - ) - - ) - - [descr] => This is a description of registrations for this event. This is not the same as the event description that is stored in the Events add-on. This one is specific to registrations for this event. - [terms] => asdasdasdasd - [reg_file] => - [reg_file_title] => asdasdasd - [form_revision] => 0 - [notes] => asdasdaaddadadad - [reg_time] => - [reg_class] => Array - ( - [22] => Array - ( - [id] => 22 - [reg_event] => 61 - [name] => Admiral Class - [descr] => This is our Admiral Class registration level. - [reg_rate] => Array - ( - [17] => Array - ( - [id] => 17 - [reg_event] => 61 - [reg_class] => 22 - [name] => Rate Name - [start_days] => 100 - [end_days] => 50 - [base_rate] => $20.00 - [per_registrant] => $10.00 - [registrant_credits] => 1 - ) - - ) - - ) - - ) - -) - -*/ diff --git a/data/events.php b/data/events.php deleted file mode 100644 index 8405fa7..0000000 --- a/data/events.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'id' => 1, - 'title' => 'PHP Payment Gateways', - 'short_desc' => 'Setting up your developer account and testing payment gateways', - 'levels' => array( - 3 => array( - 'id' => 3, - 'title' => 'General Admittance', - 'registrants' => array( - 1 => array( - 'id' => 1, - 'fname' => 'Dan', - 'lname' => 'Smith', - 'email' => 'dan@smith.com', - ), - 3 => array( - 'id' => 3, - 'fname' => 'Tony', - 'lname' => 'Johnson', - 'email' => 'tj@website.com', - ), - ), - ), - ), - ), - 2 => array( - 'id' => 2, - 'title' => 'Mailchimp Newsletters', - 'short_desc' => 'Learning how to setup test and use mailchimp to the fullest.', - 'levels' => array( - 4 => array( - 'id' => 4, - 'title' => 'General Admittance', - 'registrants' => array( - 2 => array( - 'id' => 2, - 'fname' => 'John', - 'lname' => 'Handler', - 'email' => 'johny@handler.com', - ), - ), - ), - ), - ) -); - diff --git a/defines.php b/defines.php index b521cd8..8d34438 100644 --- a/defines.php +++ b/defines.php @@ -57,7 +57,6 @@ define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_BASE_URL', WP_PLUGIN_URL.'/'.GLM_MEMBER define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_CURRENT_URL', $urlParts['scheme'].'://'.$urlParts['host'].$pageUri[0]); define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL', GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL.'assets'); - // Directories define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH', dirname(__FILE__)); define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_SETUP_PATH', GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/setup'); diff --git a/index.php b/index.php index 39edc03..791b2e9 100755 --- a/index.php +++ b/index.php @@ -42,7 +42,7 @@ if (!defined('ABSPATH')) { * version from this plugin. */ define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.1.0'); -define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.2'); +define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.3'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.10.27'); diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 9f3e9f6..a0acab8 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -6,9 +6,11 @@ app.Models.Front.Account = Backbone.Model.extend({ // Default registrant values defaults: { id: 0, - name: 'AppAccount', + name: 'AppAccount', fname: '', lname: '', + org: '', + title: '', email: '', validated: false, }, @@ -239,6 +241,8 @@ app.Models.Front.RegRequestRegistrant = Backbone.Model.extend({ email: '', fname: '', lname: '', + org: '', + title: '', addr1: '', addr2: '', city: '', @@ -780,6 +784,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var fname = this.$('.reg_fname').val().trim(); var lname = this.$('.reg_lname').val().trim(); var email = this.$('.reg_email').val().trim(); + var org = this.$('.reg_org').val().trim(); + var title = this.$('.reg_title').val().trim(); var addr1 = this.$('.reg_addr1').val().trim(); var addr2 = this.$('.reg_addr2').val().trim(); var city = this.$('.reg_city').val().trim(); @@ -817,6 +823,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ fname: fname, lname: lname, email: email, + org: org, + title: title, addr1: addr1, addr2: addr2, city: city, @@ -989,6 +997,8 @@ app.Views.Front.RegTime = Backbone.View.extend({ var fname = this.$('.add_reg_fname').val().trim(); var lname = this.$('.add_reg_lname').val().trim(); var email = this.$('.add_reg_email').val().trim(); + var org = this.$('.add_reg_org').val().trim(); + var title = this.$('.add_reg_title').val().trim(); var addr1 = this.$('.add_reg_addr1').val().trim(); var addr2 = this.$('.add_reg_addr2').val().trim(); var city = this.$('.add_reg_city').val().trim(); @@ -1050,6 +1060,8 @@ app.Views.Front.RegTime = Backbone.View.extend({ email: email, fname: fname, lname: lname, + org: org, + title: title, addr1: addr1, addr2: addr2, city: city, @@ -1178,6 +1190,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ this.$('.add_reg_email').val(account.email); this.$('.add_reg_fname').val(account.fname); this.$('.add_reg_lname').val(account.lname); + this.$('.add_reg_org').val(account.org); + this.$('.add_reg_title').val(account.title); this.$('.add_reg_addr1').val(account.addr1); this.$('.add_reg_addr2').val(account.addr2); this.$('.add_reg_city').val(account.city); @@ -1201,6 +1215,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ lockForm: function(){ this.$('.add_reg_fname').prop('disabled', true); this.$('.add_reg_lname').prop('disabled', true); + this.$('.add_reg_org').prop('disabled', true); + this.$('.add_reg_title').prop('disabled', true); this.$('.add_reg_addr1').prop('disabled', true); this.$('.add_reg_addr2').prop('disabled', true); this.$('.add_reg_city').prop('disabled', true); @@ -1213,6 +1229,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ unLockForm: function(){ this.$('.add_reg_fname').prop('disabled', false); this.$('.add_reg_lname').prop('disabled', false); + this.$('.add_reg_org').prop('disabled', false); + this.$('.add_reg_title').prop('disabled', false); this.$('.add_reg_addr1').prop('disabled', false); this.$('.add_reg_addr2').prop('disabled', false); this.$('.add_reg_city').prop('disabled', false); diff --git a/js/models/front/account.js b/js/models/front/account.js index f7f71ad..6260360 100644 --- a/js/models/front/account.js +++ b/js/models/front/account.js @@ -6,9 +6,11 @@ app.Models.Front.Account = Backbone.Model.extend({ // Default registrant values defaults: { id: 0, - name: 'AppAccount', + name: 'AppAccount', fname: '', lname: '', + org: '', + title: '', email: '', validated: false, }, diff --git a/js/models/front/regRequestRegistrant.js b/js/models/front/regRequestRegistrant.js index 1dcca8c..24a88a3 100644 --- a/js/models/front/regRequestRegistrant.js +++ b/js/models/front/regRequestRegistrant.js @@ -19,6 +19,8 @@ app.Models.Front.RegRequestRegistrant = Backbone.Model.extend({ email: '', fname: '', lname: '', + org: '', + title: '', addr1: '', addr2: '', city: '', diff --git a/js/views/front/regRequestRegistrant.js b/js/views/front/regRequestRegistrant.js index cd60c05..c4e5059 100644 --- a/js/views/front/regRequestRegistrant.js +++ b/js/views/front/regRequestRegistrant.js @@ -34,6 +34,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var fname = this.$('.reg_fname').val().trim(); var lname = this.$('.reg_lname').val().trim(); var email = this.$('.reg_email').val().trim(); + var org = this.$('.reg_org').val().trim(); + var title = this.$('.reg_title').val().trim(); var addr1 = this.$('.reg_addr1').val().trim(); var addr2 = this.$('.reg_addr2').val().trim(); var city = this.$('.reg_city').val().trim(); @@ -71,6 +73,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ fname: fname, lname: lname, email: email, + org: org, + title: title, addr1: addr1, addr2: addr2, city: city, diff --git a/js/views/front/regTime.js b/js/views/front/regTime.js index 4929651..9f2ab09 100644 --- a/js/views/front/regTime.js +++ b/js/views/front/regTime.js @@ -84,6 +84,8 @@ app.Views.Front.RegTime = Backbone.View.extend({ var fname = this.$('.add_reg_fname').val().trim(); var lname = this.$('.add_reg_lname').val().trim(); var email = this.$('.add_reg_email').val().trim(); + var org = this.$('.add_reg_org').val().trim(); + var title = this.$('.add_reg_title').val().trim(); var addr1 = this.$('.add_reg_addr1').val().trim(); var addr2 = this.$('.add_reg_addr2').val().trim(); var city = this.$('.add_reg_city').val().trim(); @@ -145,6 +147,8 @@ app.Views.Front.RegTime = Backbone.View.extend({ email: email, fname: fname, lname: lname, + org: org, + title: title, addr1: addr1, addr2: addr2, city: city, diff --git a/js/views/front/registrantForm.js b/js/views/front/registrantForm.js index a02cddc..16f21f6 100644 --- a/js/views/front/registrantForm.js +++ b/js/views/front/registrantForm.js @@ -75,6 +75,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ this.$('.add_reg_email').val(account.email); this.$('.add_reg_fname').val(account.fname); this.$('.add_reg_lname').val(account.lname); + this.$('.add_reg_org').val(account.org); + this.$('.add_reg_title').val(account.title); this.$('.add_reg_addr1').val(account.addr1); this.$('.add_reg_addr2').val(account.addr2); this.$('.add_reg_city').val(account.city); @@ -98,6 +100,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ lockForm: function(){ this.$('.add_reg_fname').prop('disabled', true); this.$('.add_reg_lname').prop('disabled', true); + this.$('.add_reg_org').prop('disabled', true); + this.$('.add_reg_title').prop('disabled', true); this.$('.add_reg_addr1').prop('disabled', true); this.$('.add_reg_addr2').prop('disabled', true); this.$('.add_reg_city').prop('disabled', true); @@ -110,6 +114,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({ unLockForm: function(){ this.$('.add_reg_fname').prop('disabled', false); this.$('.add_reg_lname').prop('disabled', false); + this.$('.add_reg_org').prop('disabled', false); + this.$('.add_reg_title').prop('disabled', false); this.$('.add_reg_addr1').prop('disabled', false); this.$('.add_reg_addr2').prop('disabled', false); this.$('.add_reg_city').prop('disabled', false); diff --git a/models/admin/ajax/regFront/registrant.php b/models/admin/ajax/regFront/registrant.php index 57388f2..f1cbe27 100644 --- a/models/admin/ajax/regFront/registrant.php +++ b/models/admin/ajax/regFront/registrant.php @@ -372,6 +372,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations array( 'fname' => $modelData['fname'], 'lname' => $modelData['lname'], + 'org' => $modelData['org'], + 'title' => $modelData['title'], 'email' => $modelData['email'], 'addr1' => $modelData['addr1'], 'addr2' => $modelData['addr2'], @@ -412,6 +414,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations $accountData = array( 'fname' => $modelData['fname'], 'lname' => $modelData['lname'], + 'org' => $modelData['org'], + 'title' => $modelData['title'], 'email' => $modelData['email'], 'addr1' => $modelData['addr1'], 'addr2' => $modelData['addr2'], @@ -423,6 +427,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations $accountDataFormat = array( '%s', // fname '%s', // lname + '%s', // org + '%s', // title '%s', // email '%s', // addr1 '%s', // addr2 diff --git a/models/admin/ajax/registrantsListExport.php b/models/admin/ajax/registrantsListExport.php index c0c7752..dfb3466 100644 --- a/models/admin/ajax/registrantsListExport.php +++ b/models/admin/ajax/registrantsListExport.php @@ -111,22 +111,24 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq // 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'), - 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'), - 'exportCustom' => $this->checkFlag('exportCustom') + 'exportId' => $this->checkFlag('exportId'), + 'exportRegistrant' => $this->checkFlag('exportRegistrant'), + 'exportOrg' => $this->checkFlag('exportOrg'), + 'exportTitle' => $this->checkFlag('exportTitle'), + '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') ); // Get registration event ID if supplied @@ -201,12 +203,12 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq $where = implode(' AND ', $whereParts); // $list = $this->getList($where, "lname"); - $listResult = $this->getFullRegistrantsData($regEventID, $where, - false, false, $orderBy); + $listResult = $this->getFullRegistrantsData($regEventID, $where); $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']) { @@ -248,13 +250,21 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq $orderField = 'request_status'; break; + case 'org': + $orderField = 'org'; + break; + + case 'title': + $orderField = 'title'; + break; + case 'city': $orderField = 'account'; $orderField2 = 'city'; break; case 'state': - $orderField = 'acount'; + $orderField = 'account'; $orderField2 = 'state'; break; diff --git a/models/admin/registrations/accounts.php b/models/admin/registrations/accounts.php index 591febd..f74fdec 100755 --- a/models/admin/registrations/accounts.php +++ b/models/admin/registrations/accounts.php @@ -370,6 +370,17 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount update_option('glmMembersDatabaseRegistrationsAccountID', $accountID); } + // If there's no input data array generated, make a blank one + if ($inputData === null) { + $inputData = array( + 'textSearch' => '', + 'withRequests' => false, + 'withAttendees' => false, + 'withNoData' => false, + 'inactive' => false + ); + } + // Compile template data $templateData = array( 'inputData' => $inputData, diff --git a/models/admin/registrations/events_addEdit.php b/models/admin/registrations/events_addEdit.php index cd4adda..2c3f420 100644 --- a/models/admin/registrations/events_addEdit.php +++ b/models/admin/registrations/events_addEdit.php @@ -18,6 +18,7 @@ $regEvent = false; $haveRegEvent = false; $regEventUpdated = false; $regEventUpdateError = false; +$standAloneRegEvent = false; // If we're adding a new reg event if ($option == 'add') { @@ -25,75 +26,184 @@ if ($option == 'add') { $eventData = false; $eventID = ($_REQUEST['event']-0); - // Verify that event is not already listed - $regEvent = $this->getEntry($eventID, 'event'); - if (!$regEvent) { + // If we have an event ID, then verify that event is not already listed + if ($eventID > 0) { + $regEvent = $this->getEntry($eventID, 'event'); + + if ($regEvent) { + $messages[] = "Trying to add an event that is already listed in Registrations."; + $problem = true; + } + } + + if (!$problem) { // Get data on this event from events add-on if ($eventID > 0) { $eventData = apply_filters('glm-member-db-events-get-event', $eventID); - } - // Did we get event data? - if ($eventData) { + if ($eventData) { + + $eventName = $eventData['name']; + $eventSlug = $eventData['name_slug']; + $adminEmail = $eventData['admin_email']; + $timeSpecific = false; + + // Add event to registrations + $sql = " + INSERT INTO ".$this->table." + ( + event, + event_name, + event_code, + notify_email, + admin_active, + active, + attendees, + attendee_max, + attendee_max_per_reg, + reg_hold_minutes, + cart_hold_days, + reg_hours_before, + registration_account_options, + payment_methods, + restricted_payment_methods, + terms + ) + VALUES + ( + $eventID, + '$eventName', + '$nameSlug', + '$adminEmail', + true, + false, + true, + 0, + 0, + 60, + 10, + 24, + 14, + 94, + 26, + '' + ) + ;"; + $this->wpdb->query($sql); + $regEventID = $this->wpdb->insert_id; + + // Check if added + if ($regEventID) { + $regEventUpdated = true; + } else { + $messages[] = "Sorry, we were unable to create registrations for this event."; + $problem = true; + } + + } else { + $messages[] = "Unable to retrieve information on specified event."; + $problem = true; + } + + } else { + + $standAloneRegEvent = true; // Add event to registrations $sql = " - INSERT INTO ".$this->table." - ( - event, - event_name, - event_code, - notify_email, - admin_active, - active, - time_specific, - attendees, - attendee_max, - attendee_max_per_reg, - reg_hold_minutes, - cart_hold_days, - reg_hours_before, - registration_account_options, - payment_methods, - restricted_payment_methods, - terms - ) - VALUES - ( - ".$eventData['id'].", - '".$eventData['name']."', - '".$eventData['name_slug']."', - '".$eventData['admin_email']."', - true, - false, - true, - true, - 0, - 0, - 60, - 10, - 24, - 14, - 94, - 26, - '' - ) - ;"; + INSERT INTO ".$this->table." + ( + event, + notify_email, + admin_active, + active, + attendees, + attendee_max, + attendee_max_per_reg, + reg_hold_minutes, + cart_hold_days, + reg_hours_before, + registration_account_options, + payment_methods, + restricted_payment_methods, + terms, + image, + cost, + hide_address, + use_member_location, + member, + location_name, + address, + city, + state, + zip, + country, + lat, + lon, + region, + phone, + url, + email, + contact_addon_id, + contact_fname, + contact_lname, + contact_phone, + contact_email + ) + VALUES + ( + 0, + '', + true, + false, + true, + 0, + 0, + 60, + 10, + 24, + 14, + 94, + 26, + '', + '', + '', + false, + false, + 0, + '', + '', + 0, + '', + '', + '', + ".$this->config['settings']['maps_default_lat'].", + ".$this->config['settings']['maps_default_lon'].", + 0, + '', + '', + '', + 0, + '', + '', + '', + '' + ) + ;"; $this->wpdb->query($sql); $regEventID = $this->wpdb->insert_id; - if ($regEventID) { + // Check if added + if ($regEventID) { $regEventUpdated = true; - + } else { + $messages[] = "Unable to create new stand-alone registration event."; + $problem = true; } } - - } else { - $messages[] = "Trying to add an event that is already listed in Registrations."; - $problem = true; } } @@ -108,7 +218,7 @@ if (!$problem) { } } -//echo "
".print_r($regEvent,1)."
"; +// echo "
".print_r($regEvent,1)."
"; $templateData = array( 'regEvent' => $regEvent, diff --git a/models/admin/registrations/events_eventDashboard.php b/models/admin/registrations/events_eventDashboard.php index a981643..f2f99ae 100755 --- a/models/admin/registrations/events_eventDashboard.php +++ b/models/admin/registrations/events_eventDashboard.php @@ -13,13 +13,28 @@ * @link http://dev.gaslightmedia.com/ */ -$regEvent = false; -$haveRegEvent = false; -$haveRegEventTimes = false; -$defaultCalendarDate = false; -$regEventFirstTime = false; -$regEventLastTime = false; - +$regEvent = false; +$haveRegEvent = false; +$haveTimeSpecificEvent = false; +$haveNonTimeAvailability = false; +$haveRegEventTimes = false; +$haveActiveRegEventTimes = false; +$haveFutureTimes = false; +$haveActiveFutureTimes = false; +$haveActiveFutureAvailability = false; +$haveRegClasses = false; +$haveRegRates = false; +$haveRegRatesForAllLevels = true; +$haveCurrentRegRates = false; +$haveAvailability = false; +$defaultCalendarDate = false; +$calDefaultDateChosen = false; +$regEventFirstTime = false; +$regEventLastTime = false; +$regEventNotSetup = false; +$regEventStandAlone = false; +$haveMessages = false; +$messages = array(); // Check if there's a request to add event times from the event $getTimesFromEvent = false; @@ -49,20 +64,142 @@ $regEvent = $this->getEventConfig($regEventID, true, false, true, false, true); if ($regEvent !== false) { $haveRegEvent = true; - $haveRegEventTimes = false; - $defaultCalendarDate = false; + + // Check if it's a stand-alone event + if ($regEvent['event'] == 0) { + $regEventStandAlone = true; + } + + $haveTimeSpecificEvent = $regEvent['time_specific']['value']; + + // If time_specific or event_code are not set, warn user to go back and fix those. + if ($regEvent['time_specific']['value'] == null || $regEvent['event_code'] == '' || $regEvent['event_name'] == '') { + $messages[] = 'This '.$this->config['terms']['reg_term_event'].' has incomplete settings, please select "Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings" above!'; + $regEventNotSetup = true; + } // Check that we have reg event times - if ($regEvent['first_datetime'] != 'NULL') { + if ($regEvent['first_datetime']['timestamp'] > 0) { + $haveRegEventTimes = true; + $regEventFirstTime = $regEvent['first_datetime']; $regEventLastTime = $regEvent['last_datetime']; + + foreach ($regEvent['reg_time'] as $time) { + if ($time['active']['value'] && $time['start_datetime']['timestamp'] > 0) { + $haveActiveRegEventTimes = true; + + // Check for the first calendar date now or in the future + if (!$defaultCalendarDate && $time['start_datetime']['timestamp'] >= strtotime('today')) { + $defaultCalendarDate = date('m/d/Y h:i A', $time['start_datetime']['timestamp']); + $calDefaultDateChosen = 'nextActive'; + } + } + } + } else { - // We don't so set to current time so at least the current month is displayed in the calendar - $defaultCalendarDate = date('m/d/Y h:i A'); $messages[] = 'There are no dates on the calendar for this '.$this->config['terms']['reg_term_event'].'.'; } + // If We don't have a default date yet + if (!$defaultCalendarDate) { + // If there's a FirstTime entry, use that - otherwise use today + if ($regEventFirstTime) { + $defaultCalendarDate = date('m/d/Y h:i A', $regEventFirstTime['timestamp']); + $calDefaultDateChosen = 'firstListed'; + } else { + $defaultCalendarDate = date('m/d/Y h:i A'); + $calDefaultDateChosen = 'today'; + } + } + + /* + * This section does a variety of checks to try to determine why a registration event may not be available + * to users for registration on the front-end. + */ + + // Check if we have any reg classes + if ($regEvent['reg_class'] && count($regEvent['reg_class']) > 0) { + $haveRegClasses = true; + + // Scan all times for availbility in active time entries + foreach ($regEvent['reg_time'] as $time) { + + // If this entry has availability + if ($time['attendees_available'] > 0) { + + // If this is a time_spcific event and this is a real time entry + if ($regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] > 0) { + $haveAvailability = true; + } + + // If this is NOT a time_specific event and this is a pseudo time entry for this type of event + if (!$regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] == 0) { + $haveAvailability = true; + } + } + } + + // Check if we have any rates + foreach ($regEvent['reg_class'] as $class) { + if ($class['reg_rate'] && count($class['reg_rate']) > 0) { + $haveRegRates = true; + + // For each rate with each time + foreach ($class['reg_rate'] as $rate) { + foreach ($regEvent['reg_time'] as $time) { + + // If the time is not a pseudo time entry for nont-time specific event + if ($time['start_datetime']['timestamp'] > 0) { + + // Calculate differernce between today and start date for this time + $timeDate = new DateTime(date('m/d/Y', $time['start_datetime']['timestamp'])); + $today = new DateTime(date('m/d/Y', time())); + $diff = $today->diff($timeDate); + $diffDays = ($diff->format('%a days') - 0); + if ($diff->invert) { + $diffDays *= -1; + } + + // Check if this is a current or future date + if ($diffDays >= 0) { + $haveFutureTimes = true; + + // Check if this future time is active + if ($time['active']['value']) { + $haveActiveFutureTimes = true; + + // If this is a time specific time entry and there's availability + if ($haveTimeSpecificEvent && $time['attendees_available'] > 0) { + $haveActiveFutureAvailability = true; + } + + } + + } + + // Check if the number of days match the rate date range for this rate + if ($diffDays <= $rate['start_days'] && $diffDays >= $rate['end_days']) { + $haveCurrentRegRates = true; + } + + // Otherwise this is a pseudo entry for a non-time-specific event (or should be) + } else { + + // If this is a non-time-specific event, is there availability + if (!$haveTimeSpecificEvent && $time['attendees_available'] > 0) { + $haveNonTimeAvailability = true; + } + + } + } + } + } else { + $haveRegRatesForAllLevels = false; + } + } + } // if there's a user notice, add it to messages if (isset($regEvent['message']) && $regEvent['message']) { @@ -70,18 +207,84 @@ if ($regEvent !== false) { } } -// echo "
".print_r($regEvent,1)."
"; +/* + * This section tries to intelegently compile reasons a registration event may not be available for users + * to register on the front-end. It also tries not to display redundant messages that should be obvious. + * For example, if there's no date/time entries, there's no reason to say that there's no availability. + */ +$reasons = array(); +if (trim($regEvent['event_code']) == '') { + $reasons[] = '    * You do not have an '.$this->config['terms']['reg_term_event'].' '.$this->config['terms']['reg_term_registration'].' code set. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)'; +} +if (!$haveRegEventTimes) { + $reasons[] = '    * You have not added any dates/times to this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)'; + if (!$haveAvailability) { + $reasons[] = '    * There is no availability for any listed '.$this->config['terms']['reg_term_registration_plur'].' dates. (Dates and Availability Calendar below)'; + } +} +if ($haveRegEventTimes && !$haveActiveRegEventTimes) { + $reasons[] = '    * You have no dates/times for this '.$this->config['terms']['reg_term_event'].' that are set to "Active". (Dates and Availability Calendar below)'; +} +if (!$regEvent['reg_class'] || count($regEvent['reg_class']) == 0) { + $reasons[] = '    * You do not have any '.$this->config['terms']['reg_term_registration'].' '.$this->config['terms']['reg_term_level_plur'].'. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)'; + if ($haveRegRatesForAllLevels) { + $reasons[] = '    * You do not have '.$this->config['terms']['reg_term_rate_plur'].' for all '.$this->config['terms']['reg_term_level_plur'].'. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)'; + } +} +if (!$haveFutureTimes) { + $reasons[] = '    * You do not have any future dates/times for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)'; +} else { + if (!$haveActiveFutureTimes) { + $reasons[] = '    * You do not have any active future dates/times for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)'; + } else { + if ($haveTimeSpecificEvent && !$haveActiveFutureAvailability) { + $reasons[] = '    * You do not have any active future dates/times with availability for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)'; + } + if (!$haveCurrentRegRates) { + $reasons[] = '    * You do not have any '.$this->config['terms']['reg_term_rate_plur'].' applicable to today. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)'; + } + } +} +if (!$regEvent['active']['value']) { + $reasons[] = '    * "'.$this->config['terms']['reg_term_registration_plur_cap'].' Active" not checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)'; +} +if ($regEvent['not_included_in_lists']['value']) { + $reasons[] = '    * "Not Displayed in Lists" is checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)'; +} +if (!$haveTimeSpecificEvent && !$haveNonTimeAvailability) { + $reasons[] = '    * You have no availability for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability below)'; +} -$templateData = array( - 'regEvent' => $regEvent, - 'haveRegEvent' => $haveRegEvent, - 'haveRegEventTimes' => $haveRegEventTimes, - 'defaultCalendarDate' => $defaultCalendarDate, - 'regEventFirstTime' => $regEventFirstTime, - 'regEventFirstTime' => $regEventFirstTime, - 'regEventLastTime' => $regEventLastTime, +if (count($reasons)) { + $messages = array_merge(array('--- Reasons this '.$this->config['terms']['reg_term_event'].' may not show in front-end list. - Click "'.$this->config['terms']['reg_term_event_cap'].' Dashboard" above to re-test. ---'), $reasons); +} +// echo "
".print_r($regEvent,1)."
"; + +$templateData = array( + 'regEvent' => $regEvent, + 'haveRegEvent' => $haveRegEvent, + 'haveTimeSpecificEvent' => $haveTimeSpecificEvent, + 'haveNonTimeAvailability' => $haveNonTimeAvailability, + 'haveRegEventTimes' => $haveRegEventTimes, + 'haveActiveRegEventTimes' => $haveActiveRegEventTimes, + 'haveFutureTimes' => $haveFutureTimes, + 'haveActiveFutureTimes' => $haveActiveFutureTimes, + 'haveActiveFutureAvailability' => $haveActiveFutureAvailability, + 'haveRegClasses' => $haveRegClasses, + 'haveRegRates' => $haveRegRates, + 'haveCurrentRegRates' => $haveCurrentRegRates, + 'haveAvailability' => $haveAvailability, + 'defaultCalendarDate' => $defaultCalendarDate, + 'calDefaultDateChosen' => $calDefaultDateChosen, + 'regEventFirstTime' => $regEventFirstTime, + 'regEventFirstTime' => $regEventFirstTime, + 'regEventLastTime' => $regEventLastTime, + 'regEventNotSetup' => $regEventNotSetup, + 'regEventStandAlone' => $regEventStandAlone, + 'haveMessages' => (count($messages) > 0), + 'messages' => $messages ); diff --git a/models/admin/registrations/events_globalCodes.php b/models/admin/registrations/events_globalCodes.php index 9f6d4ec..6a47485 100644 --- a/models/admin/registrations/events_globalCodes.php +++ b/models/admin/registrations/events_globalCodes.php @@ -70,6 +70,7 @@ if ($payCodes) { } $templateData = array( + 'regEventId' => '', 'havePayCodes' => $havePayCodes, 'payCodes' => $payCodes, 'newPayCode' => $newPayCode, diff --git a/models/admin/registrations/events_notificationsUpdate.php b/models/admin/registrations/events_notificationsUpdate.php index e3f8833..9426d0a 100644 --- a/models/admin/registrations/events_notificationsUpdate.php +++ b/models/admin/registrations/events_notificationsUpdate.php @@ -15,7 +15,6 @@ $regNotifyUpdated = false; - // New and updated notifications if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) { @@ -26,15 +25,17 @@ if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) { // Make sure key is positive integer $id = ( $key - 0 ); // Check the before or after for setting the sign for notification_days - $notification_days = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT ); - $notification_when = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING ); - if ( $notification_when === 'before' ) { - $notification_days = '-' . $notification_days; + $nDays = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT ); + $nWhen = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING ); + if ( $nWhen === 'before' ) { + $nDays = '-' . $nDays; } + $nName = filter_var( $_REQUEST['name'][$id], FILTER_SANITIZE_STRING ); + $nMessage = filter_var( $_REQUEST['message'][$id], FILTER_SANITIZE_STRING ); $reg_notification_data = array( - 'name' => $_REQUEST['name'][$id], - 'notification_days' => $notification_days, - 'message' => $_REQUEST['message'][$id] + 'name' => $nName, + 'notification_days' => $nDays, + 'message' => $nMessage ); // echo '
$reg_notification_data: ' . print_r( $reg_notification_data, true ) . '
'; if ( $id > 0 ) { diff --git a/models/admin/registrations/events_paymentCodes.php b/models/admin/registrations/events_paymentCodes.php index 42c8005..d254774 100644 --- a/models/admin/registrations/events_paymentCodes.php +++ b/models/admin/registrations/events_paymentCodes.php @@ -13,35 +13,44 @@ * @link http://dev.gaslightmedia.com/ */ -$regEvent = false; -$havePayCodes = false; -$payCodes = false; -$newPayCode = false; -$refPaycodeType = false; - +$regEventId = false; +$regEvent = false; +$havePayCodes = false; +$payCodes = false; +$newPayCode = false; +$refPaycodeType = false; // Get event ID -$eventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT); +$regEventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT); require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataPaymentCode.php'; $PayCode = new GlmDataRegistrationsPaymentCode($this->wpdb, $this->config); -if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') { - switch($_REQUEST['option2']) { +// Create data for a new pay code entry form +$newPayCode = $PayCode->newEntry(); + +// Specify the pay code type number that should be used. +$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event']; + +// We need a reg event code to do anything here. +if ($regEventId) { - case 'new': - $res = $PayCode->insertEntry(); - if (!$res['status']) { - foreach ($res['fieldFail'] as $ff) { - if (trim($ff) != '') { - $messages[] = $ff; + if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') { + + switch($_REQUEST['option2']) { + + case 'new': + $res = $PayCode->insertEntry(); + if (!$res['status']) { + foreach ($res['fieldFail'] as $ff) { + if (trim($ff) != '') { + $messages[] = $ff; + } } } - } - break; + break; - case 'update': - if ($eventId) { + case 'update': $payCodeId = ($_REQUEST['payCodeId'] - 0); $res = $PayCode->updateEntry($payCodeId); if (!$res['status']) { @@ -51,44 +60,35 @@ if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') { } } } - } - break; + break; - case 'delete': - if ($eventId) { + case 'delete': $payCodeId = ($_REQUEST['payCodeId'] - 0); if ( $payCodeId > 0 ) { $PayCode->deleteEntry( $payCodeId, true ); } - } - break; - } -} + break; + } -$newPayCode = $PayCode->newEntry(); - -// Specify the pay code type number that should be used. -$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event']; + } -// If we have an event ID then get any pacodes for that event -$payCodes = false; -if ($eventId) { - $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $eventId"); -} + // Get any pacodes for this event + $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $regEventId"); + if ($payCodes) { + $havePayCodes = true; + } -if ($payCodes) { - $havePayCodes = true; } -$regEvent = $this->getEntry($regEventID); +$regEvent = $this->getEntry($regEventId); $templateData = array( - 'regEvent' => $regEvent, - 'havePayCodes' => $havePayCodes, - 'payCodes' => $payCodes, - 'newPayCode' => $newPayCode, - 'eventPaycodeType' => $refPaycodeType + 'regEventId' => $regEventId, + '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 1a1d4d1..f2edc97 100644 --- a/models/admin/registrations/events_registrants.php +++ b/models/admin/registrations/events_registrants.php @@ -202,22 +202,20 @@ 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) { - - $success = true; - // If we have any entries if (count($registrants) > 0) { $haveRegistrants = true; } } + +// Calc Cart ID check +if ($haveRegistrants) { + foreach ($registrants as $key=>$val) { + $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']); + } +} + // echo "
".print_r($registrants,1)."
"; $templateData = array( diff --git a/models/admin/registrations/events_update.php b/models/admin/registrations/events_update.php index 9e915ea..1e9ebc8 100644 --- a/models/admin/registrations/events_update.php +++ b/models/admin/registrations/events_update.php @@ -17,25 +17,51 @@ $regEvent = false; $regEventUpdated = false; $regEventUpdateError = false; - -// Get the current reg event type to check for change -$timeSpecific = $this->wpdb->get_var(" - SELECT time_specific +// Get the event ID - 0 if stand-alone +$eventID = $this->wpdb->get_var(" + SELECT event FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event WHERE id = $regEventID "); +// If this is not a stand-alone reg event then remove certain fields. +if ($eventID) { + unset( + $this->fields['image'], + $this->fields['cost'], + $this->fields['hide_address'], + $this->fields['use_member_location'], + $this->fields['location_name'], + $this->fields['address'], + $this->fields['city'], + $this->fields['state'], + $this->fields['zip'], + $this->fields['country'], + $this->fields['lat'], + $this->fields['lat'], + $this->fields['lon'], + $this->fields['phone'], + $this->fields['url'], + $this->fields['email'], + $this->fields['contact_fname'], + $this->fields['contact_lname'], + $this->fields['contact_phone'], + $this->fields['contact_email'] + ); +} + // Try to update the reg event $regEvent = $this->updateEntry($regEventID); -// If there's some type of failure, flag that for the view file +// If update was successful if ($regEvent['status']) { + $regEventUpdated = true; - // Now check to see if the type has been changed from Time specific to Non-Time specific - if ($timeSpecific && !$regEvent['fieldData']['time_specific']['value']) { + // If this is a non-time specific registrations event + if (!$regEvent['fieldData']['time_specific']['value']) { - // Changing to non-time=specific, so check if we need to create a time entry for that + // Check if there's a time entry for this non-time specific event - should be only one. $timeEntry = $this->wpdb->get_row(" SELECT id FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time @@ -95,16 +121,16 @@ if ($regEvent['status']) { } } - } else { $regEventUpdateError = true; } +// echo "
".print_r($regEvent,1)."
"; + $templateData = array( 'regEvent' => $regEvent, 'regEventUpdated' => $regEventUpdated, 'regEventUpdateError' => $regEventUpdateError ); - $view = 'eventEdit'; diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php index d2a7f6e..dd13273 100755 --- a/models/front/registrations/checkout.php +++ b/models/front/registrations/checkout.php @@ -404,8 +404,19 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport } } + // Convert config for billing fields to useable format for view file + $selected = array(); + foreach ($management['reg_bill_info_requested']['bitmap'] as $key=>$bit) { + if ($bit['default']) { + $selected[] = $key; + } + } + require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/glmPluginSupport.php'; + $billingFields = glmMembersConfigArraySetup( $this->config['billing_field'], $this->config['billing_field_numb'], $selected, true); + // Compile template data $templateData = array( + 'billingFields' => $billingFields, 'page' => 'checkout', 'regAccountId' => $this->cart['request']['account'], 'regAccount' => $regAccount, diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php index 2734b61..1eac595 100755 --- a/models/front/registrations/checkoutProcess.php +++ b/models/front/registrations/checkoutProcess.php @@ -245,6 +245,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport // Since there's no account yet, we'll use the billing data for the base account data $_REQUEST['fname'] = $_REQUEST['bill_fname']; $_REQUEST['lname'] = $_REQUEST['bill_lname']; + $_REQUEST['org'] = $_REQUEST['bill_org']; $_REQUEST['addr1'] = $_REQUEST['bill_addr1']; $_REQUEST['addr2'] = $_REQUEST['bill_addr2']; $_REQUEST['city'] = $_REQUEST['bill_city']; @@ -266,6 +267,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport array( 'fname' => $regAccount['fieldData']['bill_fname'], 'lname' => $regAccount['fieldData']['bill_lname'], + 'org' => $regAccount['fieldData']['bill_org'], 'addr1' => $regAccount['fieldData']['bill_addr1'], 'addr2' => $regAccount['fieldData']['bill_addr2'], 'city' => $regAccount['fieldData']['bill_city'], @@ -276,6 +278,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport ), array( 'id' => $accountId ), array( + '%s', '%s', '%s', '%s', @@ -388,6 +391,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport 'id' => false, 'fname' => $regAccount['fieldData']['bill_fname'], 'lname' => $regAccount['fieldData']['bill_lname'], + 'org' => $regAccount['fieldData']['bill_org'], 'addr1' => $regAccount['fieldData']['bill_addr1'], 'addr2' => $regAccount['fieldData']['bill_addr2'], 'city' => $regAccount['fieldData']['bill_city'], diff --git a/models/front/registrations/list.php b/models/front/registrations/list.php index 3730b56..b3983de 100755 --- a/models/front/registrations/list.php +++ b/models/front/registrations/list.php @@ -73,9 +73,34 @@ $nextStart = ''; $alphaSelected = false; $haveRegEvents = false; + $eventCode = false; $regEventsCount = false; $messages = false; + // Check for specified event + if (isset($_REQUEST['event'])) { + $eventCode = filter_input(INPUT_GET, 'event', FILTER_SANITIZE_STRING); + } elseif (isset($actionData['request']['event']) && $actionData['request']['event'] != '') { + $eventCode = trim($actionData['request']['event']); + } + + // If the event is specified + if ($eventCode && trim($eventCode) != '') { + + // Redirect to "register" model + return array( + 'status' => false, + 'menuItemRedirect' => 'registrations', + 'modelRedirect' => 'registration', + 'view' => false, + 'data' => array( + 'eventCode' => $eventCode + ) + ); + + } + + if (isset($actionData['messages'])) { $messages = $actionData['messages']; } @@ -94,8 +119,6 @@ } - - // Get misc texts require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php'; $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config); @@ -125,8 +148,8 @@ default: - // Build Where clause to select only active future reg events - $where .= "T.active AND T.last_datetime > now()"; + // Build Where clause to select only active future reg events that are not bloked from lists + $where .= "T.active AND T.last_datetime > now() && !T.not_included_in_lists"; // Get a current list of reg events $listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true); @@ -166,8 +189,7 @@ break; } - // including test data for now - include GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH . '/data/events.php'; + // echo "
".print_r($list,1)."
"; // Compile template data $templateData = array( @@ -191,8 +213,6 @@ 'reg_bulletin' => $misc['reg_bulletin'] ); - // echo "
".print_r($templateData,1)."
"; - // Return status, any suggested view, and any data to controller return array( 'status' => true, diff --git a/models/front/registrations/register.php b/models/front/registrations/register.php index 4be44a3..72d3fa5 100755 --- a/models/front/registrations/register.php +++ b/models/front/registrations/register.php @@ -47,6 +47,8 @@ $reg = array( 'fname' => '', 'lname' => '', + 'org' => '', + 'title' => '', 'addr1' => '', 'addr2' => '', 'city' => '', @@ -63,6 +65,8 @@ $password = (isset($_REQUEST['password'])) ? filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING ): ''; $fname = (isset($_REQUEST['fname'])) ? filter_var( $_REQUEST['fname'], FILTER_SANITIZE_STRING ): ''; $lname = (isset($_REQUEST['lname'])) ? filter_var( $_REQUEST['lname'], FILTER_SANITIZE_STRING ): ''; + $org = (isset($_REQUEST['org'])) ? filter_var( $_REQUEST['org'], FILTER_SANITIZE_STRING ): ''; + $title = (isset($_REQUEST['title'])) ? filter_var( $_REQUEST['title'], FILTER_SANITIZE_STRING ): ''; $addr1 = (isset($_REQUEST['addr1'])) ? filter_var( $_REQUEST['addr1'], FILTER_SANITIZE_STRING ): ''; $addr2 = (isset($_REQUEST['addr2'])) ? filter_var( $_REQUEST['addr2'], FILTER_SANITIZE_STRING ): ''; $city = (isset($_REQUEST['city'])) ? filter_var( $_REQUEST['city'], FILTER_SANITIZE_STRING ): ''; @@ -78,6 +82,8 @@ 'password' => password_hash($password, PASSWORD_DEFAULT), 'fname' => $fname, 'lname' => $lname, + 'org' => $org, + 'title' => $title, 'addr1' => $addr1, 'addr2' => $addr2, 'city' => $city, diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php index 171ac9c..b0fa57e 100755 --- a/models/front/registrations/registration.php +++ b/models/front/registrations/registration.php @@ -47,6 +47,8 @@ $haveCart = false; $regEventFirstTime = false; $registrantsList = false; + $regEventID = false; + $haveRegEvent = false; // Get misc texts require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php'; @@ -91,15 +93,36 @@ } } - // Get eventRegId if supplied - if (isset($_REQUEST['eventRegId'])) { + // If an event code has been supplied by redirect from list page + if (isset($actionData['eventCode'])) { + + // check if the code is a numeric ID + $ad = $actionData['eventCode'] - 0; + if ($ad > 0 && $ad == $actionData['eventCode']) { + $regEventID = $ad; + + // Otherwise it should be an event code + } else { + if ($action) + // Try to get reg event ID + $regEventID = $this->wpdb->get_var(" + SELECT id + FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event + WHERE event_code = '".$actionData['eventCode']."' + "); + } + } + + // Get regEventID if supplied + if (!$regEventID && isset($_REQUEST['eventRegId'])) { // Make sure it's numeric - $eventRegID = ($_REQUEST['eventRegId'] - 0); + $regEventID = ($_REQUEST['eventRegId'] - 0); - if ($eventRegID <= 0) { - $eventRegID = false; - } + } + + if ($regEventID <= 0) { + $regEventID = false; } // Set the $view to registration @@ -178,204 +201,219 @@ switch ( $option ) { default: - // Get the RegEvent entry - $this->postProcAddedEventData = true; - $regEvent = $this->getEventForRegistration($eventRegID); - - $regEventId = $regEvent['id']; - - // Create an $event array with the event data. - $event = array( - 'id' => $regEvent['id'], - 'event' => $regEvent['event'], - 'event_name' => $regEvent['event_name'], - 'event_code' => $regEvent['event_code'], - 'descr' => $regEvent['descr'], - 'time_specific' => $regEvent['time_specific']['value'], - 'reg_time' => null, //$regEvent['reg_time'], - 'attendee_max' => $regEvent['attendee_max'], - 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'], - 'reg_hold_minutes' => $regEvent['reg_hold_minutes'], - 'terms' => $regEvent['terms'], - ); + if ($regEventID) { + + // Get the RegEvent entry + $this->postProcAddedEventData = true; + $regEvent = $this->getEventForRegistration($regEventID); + + if ($regEvent) { + $regEventId = $regEvent['id']; + + // Create an $event array with the event data. + $event = array( + 'id' => $regEvent['id'], + 'event' => $regEvent['event'], + 'event_name' => $regEvent['event_name'], + 'event_code' => $regEvent['event_code'], + 'descr' => $regEvent['descr'], + 'time_specific' => $regEvent['time_specific']['value'], + 'reg_time' => null, //$regEvent['reg_time'], + 'attendee_max' => $regEvent['attendee_max'], + 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'], + 'reg_hold_minutes' => $regEvent['reg_hold_minutes'], + 'terms' => $regEvent['terms'], + ); + + $haveRegEvent = true; + } + } break; } - $eventData = array(); + if ($haveRegEvent) { - // Build the Class array of JSON objects for the classes. - $jsonClasses = array(); - $regClasses = array(); + $eventData = array(); - // $regTimes = array(); + // Build the Class array of JSON objects for the classes. + $jsonClasses = array(); + $regClasses = array(); - if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) { + // $regTimes = array(); - // Loop through the $regEvent['reg_class'] array to build $rClass array - // If the event is Time Specific then the reg_class need to have - // times array. If it doesn't then there's no current registration - // allowed for that event. - foreach ( $regEvent['reg_class'] as $key => $rClass ) { + if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) { - $classStartingTime = ''; - // echo '
$rClass '."($key): " . print_r( $rClass, true ) . '
'; + // Loop through the $regEvent['reg_class'] array to build $rClass array + // If the event is Time Specific then the reg_class need to have + // times array. If it doesn't then there's no current registration + // allowed for that event. + foreach ( $regEvent['reg_class'] as $key => $rClass ) { - // Pull the rate data - if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) { + $classStartingTime = ''; + // echo '
$rClass '."($key): " . print_r( $rClass, true ) . '
'; - // echo '
$rClass[times]: ' . print_r( $rClass['times'], true ) . '
'; - foreach ( $rClass['times'] as $time ) { - if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) { - $classStartingTime = $time; - } + // Pull the rate data + if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) { - $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false; - $rClass['reg_event'] = $regEventId; - $rClass['reg_rate_id'] = $time['id']; - $rClass['reg_rate_name'] = $time['name']; - $rClass['reg_rate_base_price'] = $time['base_rate']; - $rClass['reg_rate_per_reg'] = $time['per_registrant']; - $rClass['registrant_credits'] = $time['registrant_credits']; + // echo '
$rClass[times]: ' . print_r( $rClass['times'], true ) . '
'; + foreach ( $rClass['times'] as $time ) { + if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) { + $classStartingTime = $time; + } - if ( $regEvent['time_specific'] ) { - $rClass['selectedTime'] = $time['id']; + $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false; + $rClass['reg_event'] = $regEventId; + $rClass['reg_rate_id'] = $time['id']; + $rClass['reg_rate_name'] = $time['name']; + $rClass['reg_rate_base_price'] = $time['base_rate']; + $rClass['reg_rate_per_reg'] = $time['per_registrant']; + $rClass['registrant_credits'] = $time['registrant_credits']; + + if ( $regEvent['time_specific'] ) { + $rClass['selectedTime'] = $time['id']; + } + // if ( empty( $regtimes[$time['id']] ) ) { + // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK ); + // } } - // if ( empty( $regtimes[$time['id']] ) ) { - // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK ); - // } + $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime']; + $rClass['id'] = $key; + $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK ); + } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) { + unset( $regEvent['reg_class'][$key] ); } - $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime']; - $rClass['id'] = $key; - $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK ); - } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) { - unset( $regEvent['reg_class'][$key] ); } } - } - // echo '
$jsonClasses: ' . print_r( $jsonClasses, true ) . '
'; + // echo '
$jsonClasses: ' . print_r( $jsonClasses, true ) . '
'; - // echo '
$regEvent: ' . print_r( $regEvent, true ) . '
'; - - // Build the regClass JSON for the template. - $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']'; - $regCartJSON = json_encode( $cart ); - // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']'; - - // Get terms into JSON - $termsJSON = json_encode( $this->config['terms'] ); - - // check to see if there's a user logged in - if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) { - // Setup JSON for the loginAccount. - $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK ); - } + // echo '
$regEvent: ' . print_r( $regEvent, true ) . '
'; - // If there's a cart then pull any registrants for it - // If there classes in the cart with rates and registrants they'll need - // be setup. + // Build the regClass JSON for the template. + $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']'; + $regCartJSON = json_encode( $cart ); + // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']'; - $registrants = array(); + // Get terms into JSON + $termsJSON = json_encode( $this->config['terms'] ); - // echo '
$cart: ' . print_r( $cart, true ) . '
'; - // Looping through to grab out registrants from the cart. - if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) { - - // Loop through events array. - foreach ( $cart['events'] as $rEvent ) { - if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) { - - // Loop through classes array - foreach ( $rEvent['classes'] as $class ) { - if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) { - - // Loop through rates array - foreach ( $class['rates'] as $rate ) { - if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) { + // check to see if there's a user logged in + if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) { + // Setup JSON for the loginAccount. + $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK ); + } - // Loop through registrants array. - foreach ( $rate['registrants'] as $registrant ) { - $accountData = array(); - // If there's an account id get data for the account. - if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) { - $accountData = $this->wpdb->get_row( + // If there's a cart then pull any registrants for it + // If there classes in the cart with rates and registrants they'll need + // be setup. + + $registrants = array(); + + // echo '
$cart: ' . print_r( $cart, true ) . '
'; + // Looping through to grab out registrants from the cart. + if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) { + + // Loop through events array. + foreach ( $cart['events'] as $rEvent ) { + if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) { + + // Loop through classes array + foreach ( $rEvent['classes'] as $class ) { + if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) { + + // Loop through rates array + foreach ( $class['rates'] as $rate ) { + if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) { + + // Loop through registrants array. + foreach ( $rate['registrants'] as $registrant ) { + $accountData = array(); + // If there's an account id get data for the account. + if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) { + $accountData = $this->wpdb->get_row( + $this->wpdb->prepare( + "SELECT fname,lname,org,title,email,addr1,addr2,city,state,zip,country,validated + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account + WHERE id = %d", + $registrant['account'] + ), + ARRAY_A + ); + } + + // Need to know the class id for the registrant + $classId = $this->wpdb->get_var( $this->wpdb->prepare( - "SELECT fname,lname,email,addr1,addr2,city,state,zip,country,validated - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account + "SELECT class + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class WHERE id = %d", - $registrant['account'] - ), - ARRAY_A + $registrant['reg_request_class'] + ) ); - } - - // Need to know the class id for the registrant - $classId = $this->wpdb->get_var( - $this->wpdb->prepare( - "SELECT class - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class - WHERE id = %d", - $registrant['reg_request_class'] - ) - ); - // Also need to fetch the email - $email = $this->wpdb->get_var( - $this->wpdb->prepare( - "SELECT email - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account - WHERE id = %d", - $registrant['account'] - ) - ); - if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) { - $regTimeText = $this->wpdb->get_var( + // Also need to fetch the email + $email = $this->wpdb->get_var( $this->wpdb->prepare( - "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' ) - FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time + "SELECT email + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account WHERE id = %d", - $registrant['reg_time'] + $registrant['account'] ) ); - $registrant['reg_time_text'] = $regTimeText; - } - - // Setup the registrant for this level. - $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname']; - $registrant['class_id'] = $classId; - $registrant['reg_class'] = $classId; - $registrant['email'] = $email; - $registrant['validated'] = $accountData['validated']; - $registrant['addr1'] = $accountData['addr1']; - $registrant['addr2'] = $accountData['addr2']; - $registrant['city'] = $accountData['city']; - $registrant['state'] = $accountData['state']; - $registrant['zip'] = $accountData['zip']; - $registrant['country'] = $accountData['country']; - $registrant['reg_request'] = $rEvent['reg_request']; - $registrants[] = $registrant; - } // - End loop through for registrants array. - } - - } // - End loop through rates. - } + if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) { + $regTimeText = $this->wpdb->get_var( + $this->wpdb->prepare( + "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' ) + FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time + WHERE id = %d", + $registrant['reg_time'] + ) + ); + $registrant['reg_time_text'] = $regTimeText; + } + + // Setup the registrant for this level. + $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname']; + $registrant['class_id'] = $classId; + $registrant['reg_class'] = $classId; + $registrant['email'] = $email; + $registrant['validated'] = $accountData['validated']; + $registrant['org'] = $accountData['org']; + $registrant['title'] = $accountData['title']; + $registrant['addr1'] = $accountData['addr1']; + $registrant['addr2'] = $accountData['addr2']; + $registrant['city'] = $accountData['city']; + $registrant['state'] = $accountData['state']; + $registrant['zip'] = $accountData['zip']; + $registrant['country'] = $accountData['country']; + $registrant['reg_request'] = $rEvent['reg_request']; + $registrants[] = $registrant; + } // - End loop through for registrants array. + } + + } // - End loop through rates. + } + + } // - End loop through classes. + } - } // - End loop through classes. - } + } // - End loop through events. + } - } // - End loop through events. - } + // If enabled, get list of registrants for this event + $registrantsList = false; + if ($this->config['settings']['reg_show_attendees_on_reg_page']) { + require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php'; + $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config); + $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname"); + } - // If enabled, get list of registrants for this event - $registrantsList = false; - if ($this->config['settings']['reg_show_attendees_on_reg_page']) { - require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php'; - $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config); - $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname"); } - // echo "
".print_r($registrantsList,1)."
"; + + + // echo "
".print_r($registrants,1)."
"; // Compile template data $templateData = array( @@ -383,7 +421,9 @@ 'regEventId' => $regEventId, 'page' => 'registration', 'haveCart' => $haveCart, + 'haveRegEvent' => $haveRegEvent, 'regEvent' => $regEvent, + 'standAlone' => ($regEvent.event == 0), 'regEventFirstTime' => $regEventFirstTime, 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', 'regEventJSON' => json_encode( $event, JSON_NUMERIC_CHECK ), diff --git a/readme.txt b/readme.txt index 6a9c52a..8fe1201 100755 --- a/readme.txt +++ b/readme.txt @@ -26,7 +26,26 @@ e.g. == Changelog == = PENDING = -* Added sort order for registration classes (levels) +* Added sort order for registration classes (levels) - Drag and Drop +* Added ability to create a Stand-Alone registrations event (Not tied to event in Events Add-On). +* Added ability to hide registration events from front-end lists. +* Added ability to select a registrations event by code. +* Added ability to specify a registrations event on URL using registration event code rather than ID. +* Added ability to go direct to a registrations event front-end page from admin registrations event dashboard. +* Added more terms and phrases and updated defaults for those that didn't have them. +* Added notification on registrations event dashboard for why a registrations event won't show up on front-end. +* More intelligent selection of month initially displayed for calendar in dashboard for a specific event. +* Displaying above calendar why the initial month displayed was selected. Hide after month change. +* Added reg_bill_info_requested field to management for selection of checkout fields. +* Defaulted reg_bill_info_requested field to all on to show all checkout fields by default. +* Commented out management selection of checkout fields by payment type temporarily. +* New Rate edit form now has default values. +* Fixed a range of error log notices regarding undefined variables in models and views. +* Removed "data" directory with code to inject original test data. +* Fixed non-working "Read More" button on registration page. +* Fixed incorrect "Total Charge" at bottom of checkout page when discount codes are applied. +* Fixed bad dialog box layout due to CSS from Bootstrap +* Fixed incorrect use of href in form tag = 1.1.0 = * Formal release for a range of front-end and admin improvement and fixes @@ -44,22 +63,22 @@ e.g. * Checkout page now shows "Billing Information" if there are charges or "Contact Information" if there's no charge. = 1.0.21 = -* Added missing callback function for e-mail notices +* Added missing callback function for e-mail notices = 1.0.20 = * Fixed date and time displayed for an event on registration page so it reflects only current or future dates and times. * Fixed time displayed for an event on registration page so it no longer shows a range of times, only the time for the date shown. * Added display of "(see below for other dates/times)" when there are more than the first date/time displayed on the registration page. -* Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees. +* Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees. -= 1.0.19 = += 1.0.19 = * Removed "Select" from progress bar on checkout page that leaked in from development work = 1.0.18 = * Now properly formatting checkout failure notices in request Notes field * Added more list filtering and pagenation features to accounts and requests lists * Now not showing requests that have no attendees in request admin list -* Added more debug information to checout processing +* Added more debug information to checout processing = 1.0.17 = * Fixed checkout error messages not showing on checkout page if not checkout page top text provided in settings diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 6b97106..4eb9e4f 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -83,7 +83,7 @@ add_filter( // Since we must not have had a good event ID or didn't find the event in registrations, return title and url to add this event to registrations return array( 'title' => 'Add Registrations To Event', - 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&option=add&event=".$eventId, + 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&&option=add&event=".$eventId, 'warning_title' => false, 'edit_warning' => '', 'update_warning' => '' diff --git a/setup/adminMenus.php b/setup/adminMenus.php index b7e7f34..a3c067f 100644 --- a/setup/adminMenus.php +++ b/setup/adminMenus.php @@ -61,7 +61,7 @@ add_submenu_page( add_submenu_page( 'glm-members-admin-menu-members', 'Selected '.$this->config['terms']['reg_term_event_cap'], - '    '.$this->config['terms']['reg_term_event_plur_cap'], + '    List', 'glm_members_members', 'glm-members-admin-menu-registrations-events', function() {$this->controller('registrations', 'events');} diff --git a/setup/databaseScripts/create_database_V1.0.2.sql b/setup/databaseScripts/create_database_V1.0.3.sql similarity index 81% rename from setup/databaseScripts/create_database_V1.0.2.sql rename to setup/databaseScripts/create_database_V1.0.3.sql index 420ff1b..536f535 100755 --- a/setup/databaseScripts/create_database_V1.0.2.sql +++ b/setup/databaseScripts/create_database_V1.0.3.sql @@ -99,6 +99,7 @@ CREATE TABLE {prefix}management ( reg_paypal_test TINYINT NULL, -- PayPal test mode - List - see -- Billing settings reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings + reg_bill_info_requested SMALLINT 32767, -- Billing information fields to display on checkout page reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf reg_bill_info_req_comp_code SMALLINT NULL, reg_bill_info_req_cash SMALLINT NULL, @@ -112,6 +113,7 @@ CREATE TABLE {prefix}management ( reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event reg_show_navigation_aids BOOLEAN NULL, -- No, not marine navigational aids, this enables additional text, arrows, etc to direct a user to do something specific that would not normally be required. reg_show_attendees_on_reg_page BOOLEAN NULL, -- Flag to show a list of attendees on the registraitons page for an event + reg_show_select_by_code BOOLEAN NULL, -- Flag to show an Event Code entry form on Registrations Event List page PRIMARY KEY (id) ); @@ -155,6 +157,10 @@ CREATE TABLE {prefix}settings_terms ( reg_term_level_cap TINYTEXT NULL, reg_term_level_plur TINYTEXT NULL, reg_term_level_plur_cap TINYTEXT NULL, + reg_term_rate TINYTEXT NULL, + reg_term_rate_cap TINYTEXT NULL, + reg_term_rate_plur TINYTEXT NULL, + reg_term_rate_plur_cap TINYTEXT NULL, reg_term_password TINYTEXT NULL, reg_term_password_cap TINYTEXT NULL, reg_term_password_plur TINYTEXT NULL, @@ -235,13 +241,14 @@ CREATE TABLE {prefix}payment_code ( -- Only created when an event is selected to offer registrations CREATE TABLE {prefix}reg_event ( id INT NOT NULL AUTO_INCREMENT, - event INT NULL, -- Pointer to event in Events add-on - False if event record in Events add-on no longer exists + event INT NULL, -- Pointer to event in Events add-on - 0 (false) if stand-alone regsitrations event event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for notify_email TINYTEXT NULL, -- E-Mail addresses to receive notification of a registration other than org_internal_email in management, comma separated admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off. active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations and notifications - time_specific BOOLEAN NULL, -- Registration for this event is not date/time specific. Can attend any date/time of event. + time_specific BOOLEAN NULL, -- Registration for this event is date/time specific. If not can attend any date/time of event. + not_included_in_lists BOOLEAN NULL, -- This registration event is not displayed in lists of registration events. attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited @@ -259,6 +266,30 @@ CREATE TABLE {prefix}reg_event ( reg_file_title TINYTEXT NULL, -- Title for downloadable file form_revision SMALLINT NULL, -- Current MagicForm form revision notes TEXT NULL, -- System operator's notes for this event - Not visible to users + -- Fields below are for stand-alonge registrations events only. + -- If not stand-alone, this data comes from the event. + image TINYTEXT NULL, -- Event Image + cost TINYTEXT NULL, -- Description of event cost + hide_address BOOLEAN NULL, -- Option to hide address on front-end + use_member_location BOOLEAN NULL, -- Use location of the member (if provided) rather than location table data + member INT NULL, -- Set location of the event to another member + location_name TINYTEXT NULL, -- Name of location + address TINYTEXT NULL, -- Street Address + city INT NULL, -- Pointer to city - references main plugin city table + state TINYTEXT NULL, -- Two character state abbreviation + zip TINYTEXT NULL, -- ZIP/Postal code + country TINYTEXT NULL, -- Country Code + lat FLOAT NULL, -- Latitude of location + lon FLOAT NULL, -- Longitude of location + region INT NULL, -- Pointer to Region - references main plugin region table + phone TINYTEXT NULL, -- Location Phone # + url TINYTEXT NULL, -- Location URL + email TINYTEXT NULL, -- Location E-Mail Address + contact_addon_id INT NULL, -- ID of Contact from contact add-on (optional and if available) + contact_fname TINYTEXT NULL, -- Contact first name for this location (optional) + contact_lname TINYTEXT NULL, -- Contact last name for this location (optional) + contact_phone TINYTEXT NULL, -- Contact phone for this location (optional) + contact_email TINYTEXT NULL, -- Contact E-Mail address (optional) PRIMARY KEY (id), INDEX (event), INDEX (event_code(10)) @@ -634,7 +665,8 @@ INSERT INTO {prefix}management reg_bill_info_req_check, reg_bill_info_req_credit_card, reg_bill_info_req_merchant_call, - reg_medical_info + reg_medical_info, + reg_show_select_by_code ) VALUES ( @@ -667,7 +699,8 @@ INSERT INTO {prefix}management 0, -- reg_bill_info_req_check, 0, -- reg_bill_info_req_credit_card, 0, -- reg_bill_info_req_merchant_call, - true -- reg_medical_info, + true, -- reg_medical_info, + true -- reg_show_select_by_code ); ---- @@ -705,6 +738,14 @@ INSERT INTO {prefix}settings_terms reg_term_id_cap, reg_term_id_plur, reg_term_id_plur_cap, + reg_term_level, + reg_term_level_cap, + reg_term_level_plur, + reg_term_level_plur_cap, + reg_term_rate, + reg_term_rate_cap, + reg_term_rate_plur, + reg_term_rate_plur_cap, reg_term_password, reg_term_password_cap, reg_term_password_plur, @@ -719,53 +760,91 @@ INSERT INTO {prefix}settings_terms reg_term_payment_code_plur_cap, reg_term_registration_button, reg_term_contact_information + reg_term_button_event_list, + reg_term_button_login_or_create, + reg_term_button_create_account, + reg_term_button_login, + reg_term_button_logout, + reg_term_button_add_attendee, + reg_term_button_save_attendee, + reg_term_button_attendee_page_continue, + reg_term_button_apply_comp_code, + reg_term_button_cart_page_continue, + reg_term_button_checkout_page_submit ) VALUES ( - 'Event Registrations', -- reg_term_registrations_name - 'registration', -- reg_term_registration - 'Registration', -- reg_term_registration_cap - 'registrations', -- reg_term_registration_plur - 'Registrations', -- reg_term_registration_plur_cap - 'register', -- reg_term_registe - 'Register', -- reg_term_register_cap - 'registers', -- reg_term_registers - 'registering', -- reg_term_registering - 'Registering', -- reg_term_registering_cap - 'registered', -- reg_term_registered - 'Registered', -- reg_term_registered_cap - 'attendee', -- reg_term_attendee - 'Attendee', -- reg_term_attendee_cap - 'attendees', -- reg_term_attendee_plur - 'Attendees', -- reg_term_attendee_plur_cap - 'attending', -- reg_term_attending - 'attended', -- reg_term_attended - 'user', -- reg_term_registered_user - 'User', -- reg_term_registered_user_cap - 'users', -- reg_term_registered_user_plur - 'Users', -- reg_term_registered_user_plur_cap - 'event', -- reg_term_event - 'Event', -- reg_term_event_cap - 'events', -- reg_term_event_plur - 'Events', -- reg_term_event_plur_cap - 'ID', -- reg_term_id - 'ID', -- reg_term_id_cap - 'IDs', -- reg_term_id_plur - 'IDs', -- reg_term_id_plur_cap - 'password', -- reg_term_password - 'passwords', -- reg_term_password_cap - 'Password', -- reg_term_password_plur - 'Passwords', -- reg_term_password_plur_cap - 'instructor', -- reg_term_instructor - 'Instructor', -- reg_term_instructor_cap - 'instructors', -- reg_term_instructor_plur - 'Instructors', -- reg_term_instructor_plur_cap - 'payment code', -- reg_term_payment_code - 'Payment code', -- reg_term_payment_code_cap - 'payment codes', -- reg_term_payment_code_plur - 'Payment codes', -- reg_term_payment_code_plur_cap - 'Register for Event', -- reg_term_registration_button - 'Contact Information' -- reg_term_contact_information + 'Event Registrations', -- reg_term_registrations_name + 'registration', -- reg_term_registration + 'Registration', -- reg_term_registration_cap + 'registrations', -- reg_term_registration_plur + 'Registrations', -- reg_term_registration_plur_cap + 'register', -- reg_term_register + 'Register', -- reg_term_register_cap + 'registers', -- reg_term_registers + 'registering', -- reg_term_registering + 'Registering', -- reg_term_registering_cap + 'registered', -- reg_term_registered + 'Registered', -- reg_term_registered_cap + 'attendee', -- reg_term_attendee + 'Attendee', -- reg_term_attendee_cap + 'attendees', -- reg_term_attendee_plur + 'Attendees', -- reg_term_attendee_plur_cap + 'attending', -- reg_term_attending + 'attended', -- reg_term_attended + 'user', -- reg_term_registered_user + 'User', -- reg_term_registered_user_cap + 'users', -- reg_term_registered_user_plur + 'Users', -- reg_term_registered_user_plur_cap + 'event', -- reg_term_event + 'Event', -- reg_term_event_cap + 'events', -- reg_term_event_plur + 'Events', -- reg_term_event_plur_cap + 'ID', -- reg_term_id + 'ID', -- reg_term_id_cap + 'IDs', -- reg_term_id_plur + 'IDs', -- reg_term_id_plur_cap + 'level', -- reg_term_level + 'Level', -- reg_term_level_cap + 'levels', -- reg_term_level_plur + 'Levels', -- reg_term_level_plur_cap + 'rate', -- reg_term_rate + 'Rate', -- reg_term_rate_cap + 'rates', -- reg_term_rate_plur + 'Rates', -- reg_term_rate_plur_cap + 'password', -- reg_term_password + 'passwords', -- reg_term_password_cap + 'Password', -- reg_term_password_plur + 'Passwords', -- reg_term_password_plur_cap + 'instructor', -- reg_term_instructor + 'Instructor', -- reg_term_instructor_cap + 'instructors', -- reg_term_instructor_plur + 'Instructors', -- reg_term_instructor_plur_cap + 'payment code', -- reg_term_payment_code + 'Payment code', -- reg_term_payment_code_cap + 'payment codes', -- reg_term_payment_code_plur + 'Payment codes', -- reg_term_payment_code_plur_cap + 'Register for Event', -- reg_term_registration_button + 'Contact Information', -- reg_term_contact_information + 'Event Registration List', -- reg_term_button_event_list + 'Login or Create Account', -- reg_term_button_login_or_create + 'Create an Account', -- reg_term_button_create_account + 'Login'. -- reg_term_button_login + 'Logout', -- reg_term_button_logout + 'Add New Attendee', -- reg_term_button_add_attendee + 'Save Attendee', -- reg_term_button_save_attendee + 'Continue', -- reg_term_button_attendee_page_continue + 'Apply Comp Code', -- reg_term_button_apply_comp_code + 'Proceed to Checkout', -- reg_term_button_cart_page_continue + 'Submit Registration Request' -- reg_term_button_checkout_page_submit + + + + + + + + ); ---- @@ -799,18 +878,33 @@ INSERT INTO {prefix}misc 'Text for top of Summary Page', 'Terms and Conditions', 'Registration Request Submitted', - 'A registration request has just been submitted to your site. - -Sincerely, - -{$OrgName} -{$OrgAddress} -{$OrgCity}, {$OrgState} {$OrgZip} -{$OrgPhone} -{$OrgEmail} - -{$Summary} - + 'A registration request has just been submitted to your site. + +$OrgName: {$OrgName} +$OrgAddress: {$OrgAddress} +$OrgCity: {$OrgCity} +$OrgState: {$OrgState} +$OrgZip: {$OrgZip} +$OrgPhone: {$OrgPhone} +$OrgEmail: {$OrgEmail} +$SubmittedByFirstName: {$SubmittedByFirstName} +$SubmittedByLastName: {$SubmittedByLastName} +$SubmittedByTitle: {$SubmittedByTitle} +$SubmittedByOrganization: {$SubmittedByOrganization} +$BillingFirstname: {$BillingFirstname} +$BillingLastname: {$BillingLastname} +$BillingAddrLine1: {$BillingAddrLine1} +$BillingAddrLine2 {$BillingAddrLine2} +$BillingCity: {$BillingCity} +$BillingState: {$BillingState} +$BillingCountry: {$BillingCountry} +$BillingPhone: {$BillingPhone} +$BillingEmailAddress: {$BillingEmailAddress} +$DateTimeSubmitted: {$DateTimeSubmitted} +$PaymentMethod: {$PaymentMethod} +$Status: {$Status} +$NumberAttendees: {$NumberAttendees} +$Summary: {$Summary} ', 'Registration Submitted for {$EventName}', 'The following people were just registered for {$EventName}... @@ -819,13 +913,21 @@ Sincerely, {/foreach} ', 'Registration Request Submitted', - 'Thank you for submitting your event registration request. + 'Thank you for submitting your registration request. -Below is a summary of your submission. Please contact us if you have any questions regarding this request. +Here is a summary of your submission: -{$summary}', +{$Summary}', 'Your Registration for: {$EventName}', - 'You have been registered for {$EventName} by {$SubmittedByFirstName} {$SubmittedByLastName}. + '{$DateTimeSubmitted} + +{$SubmittedByFirstName} {$SubmittedByLastName} has registered you for the {$EventName}. + +Here is your registration confirmation: +Event: {$EventName} +Registration Type: {$LevelName} +Rate Name: {$RateName} +Attendee Name Submitted: {$AttendeeFirstName} {$AttendeeLastName} Please let us know if you have any questions regarding your registration for this event. ', diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index f0706e0..a595f81 100755 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -48,7 +48,8 @@ $glmMembersRegistrationsDbVersions = array( '0.0.32' => array('version' => '0.0.32', 'tables' => 18, 'date' => '05/22/2018'), '1.0.0' => array('version' => '1.0.0', 'tables' => 18, 'date' => '06/04/2018'), '1.0.1' => array('version' => '1.0.1', 'tables' => 18, 'date' => '06/12/2018'), - '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018') + '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018'), + '1.0.3' => array('version' => '1.0.3', 'tables' => 18, 'date' => '12/11/2018') ); diff --git a/setup/databaseScripts/drop_database_V1.0.2.sql b/setup/databaseScripts/drop_database_V1.0.3.sql similarity index 100% rename from setup/databaseScripts/drop_database_V1.0.2.sql rename to setup/databaseScripts/drop_database_V1.0.3.sql diff --git a/setup/databaseScripts/update_database_V0.0.10.sql b/setup/databaseScripts/update_database_V0.0.10.sql old mode 100644 new mode 100755 index 1f825fb..e4e119a --- a/setup/databaseScripts/update_database_V0.0.10.sql +++ b/setup/databaseScripts/update_database_V0.0.10.sql @@ -7,7 +7,7 @@ -- all queries must be separated by a line with four dashes -- Pending Attendees - In carts but not checked out --- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out +-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out -- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table -- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired CREATE TABLE {prefix}reg_time_pending ( diff --git a/setup/databaseScripts/update_database_V1.0.3.sql b/setup/databaseScripts/update_database_V1.0.3.sql new file mode 100755 index 0000000..e57eeb1 --- /dev/null +++ b/setup/databaseScripts/update_database_V1.0.3.sql @@ -0,0 +1,126 @@ +-- Gaslight Media Members Database - Registratiuons Add-On +-- File Updated: 2018-10-08 +-- Database Version: 1.0.2 +-- Database Update From Previous Version Script +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +ALTER TABLE {prefix}management ADD COLUMN reg_bill_info_requested SMALLINT DEFAULT 32767; + +---- + +ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_cap TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur_cap TINYTEXT DEFAULT NULL; + +---- + +UPDATE {prefix}settings_terms SET reg_term_rate = 'rate', reg_term_rate_cap = 'Rate', reg_term_rate_plur = 'rates', reg_term_rate_plur_cap = 'Rates' where id = 1; + +---- + +ALTER TABLE {prefix}management ADD COLUMN reg_show_select_by_code BOOLEAN DEFAULT FALSE; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN not_included_in_lists BOOLEAN DEFAULT FALSE; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN image TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN cost TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN hide_address BOOLEAN DEFAULT FALSE; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN use_member_location BOOLEAN DEFAULT FALSE; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN member INT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN location_name TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN address TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN city INT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN state TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN zip TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN country TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN lat FLOAT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN lon FLOAT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN region INT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN phone TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN url TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN email TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN contact_addon_id INT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN contact_fname TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN contact_lname TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN contact_phone TINYTEXT DEFAULT NULL; + +---- + +ALTER TABLE {prefix}reg_event ADD COLUMN contact_email TINYTEXT DEFAULT NULL; + diff --git a/views/admin/ajax/registrantsListExport.html b/views/admin/ajax/registrantsListExport.html index f7cb58d..759dc18 100644 --- a/views/admin/ajax/registrantsListExport.html +++ b/views/admin/ajax/registrantsListExport.html @@ -27,6 +27,8 @@ {if $select.exportId}ID{/if} {if $select.exportRegistrant}{$terms.reg_term_attendee_cap} Name{/if} + {if $select.exportOrg}Org{/if} + {if $select.exportTitle}Title{/if} {if $select.exportAddr1}Address{/if} {if $select.exportAddr2}Addr Line #2{/if} {if $select.exportCity}City{/if} @@ -53,6 +55,8 @@ {if $select.exportId}{$m.id}{/if} {if $select.exportRegistrant}{$m.fname} {$m.lname}{/if} + {if $select.exportOrg}{$m.account.org}{/if} + {if $select.exportTitle}{$m.account.title}{/if} {if $select.exportAddr1}{$m.account.addr1}{/if} {if $select.exportAddr2}{$m.account.addr2}{/if} {if $select.exportCity}{$m.account.city}{/if} diff --git a/views/admin/ajax/registrantsListExportCsv.html b/views/admin/ajax/registrantsListExportCsv.html index d1a223b..dc121f0 100644 --- a/views/admin/ajax/registrantsListExportCsv.html +++ b/views/admin/ajax/registrantsListExportCsv.html @@ -1,6 +1,8 @@ {if $haveRegistrants} {if $select.exportId}"ID",{/if} {if $select.exportRegistrant}"{$terms.reg_term_attendee_cap} Name",{/if} +{if $select.exportOrg}"Organization",{/if} +{if $select.exportTitle}"Title/Dept",{/if} {if $select.exportAddr1}"Address",{/if} {if $select.exportAddr2}"Addr Line #2",{/if} {if $select.exportCity}"City",{/if} @@ -18,6 +20,8 @@ {foreach $registrants as $m} {if $select.exportId}"{$m.id}",{/if} {if $select.exportRegistrant}"{$m.fname} {$m.lname}",{/if} +{if $select.exportOrg}"{$m.account.org}",{/if} +{if $select.exportTitle}"{$m.account.title}",{/if} {if $select.exportAddr1}"{$m.account.addr1}",{/if} {if $select.exportAddr2}"{$m.account.addr2}",{/if} {if $select.exportCity}"{$m.account.city}",{/if} diff --git a/views/admin/management/registrations.html b/views/admin/management/registrations.html index 7577ddc..3e62dd0 100644 --- a/views/admin/management/registrations.html +++ b/views/admin/management/registrations.html @@ -110,7 +110,7 @@ {foreach from=$regSettings.fieldData.reg_payment_methods.bitmap item=v} {$v.name}
- {/foreach} + {/foreach} {if $regSettings.fieldFail.reg_payment_methods}

{$regSettings.fieldFail.reg_payment_methods}

{/if} @@ -119,7 +119,7 @@ {foreach from=$regSettings.fieldData.reg_cc_accepts.bitmap item=v} {$v.name}
- {/foreach} + {/foreach} {if $regSettings.fieldFail.reg_cc_accepts}

{$regSettings.fieldFail.reg_cc_accepts}

{/if} @@ -136,9 +136,9 @@ - + - +

Authorize.net

@@ -171,12 +171,12 @@ - + See Authorize.net Merchant Portal for notifications sent by Authorize.net. - +--> - + Verified Merchant Seal HTML: @@ -206,7 +206,7 @@ - + @@ -253,9 +253,9 @@ {if $regSettings.fieldFail.reg_merchant_solutions_merchant_email}

{$regSettings.fieldFail.reg_merchant_solutions_merchant_email}

{/if} - + - +

PayPal

@@ -301,9 +301,9 @@ - - - + + +

Other General Options

@@ -340,22 +340,40 @@ + + Show Select Event by Code Form on Registration Events list + + + +

Billing Information Fields

+ + + Billing Info Fields for Checkout: + + {foreach from=$regSettings.fieldData.reg_bill_info_requested.bitmap item=v} + {$v.name}
+ {/foreach} + {if $regSettings.fieldFail.reg_bill_info_requested}

{$regSettings.fieldFail.reg_bill_info_requested}

{/if} + + + - + @@ -427,7 +446,7 @@ // Get the value from the selected Payment Method var processor = $('#reg_proc_methods').val(); - + // This is a hack, we should be looking at the plugin.ini for these numbers but I'm just too lazy today if (processor == 2) { $('.authorize-net').removeClass('glm-hidden'); @@ -441,7 +460,7 @@ } } - + // When payment method selection changes $('#reg_proc_methods').on('change', function() { showSelectedCardProcessor(); @@ -457,7 +476,7 @@ window.open(sealUrl, '_blank', "width=300,height=200,menubar=no,scrollbars=no,location=no"); return false; }); - + }); diff --git a/views/admin/management/regterms.html b/views/admin/management/regterms.html index 992d82a..34f963b 100644 --- a/views/admin/management/regterms.html +++ b/views/admin/management/regterms.html @@ -15,7 +15,7 @@ {if $settingsUpdated}

Settings Updated

{/if} {if $settingsUpdateError}Settings Update Error{/if}

{$terms.reg_term_registrations_name} Terms and Phrases

- + @@ -30,7 +30,7 @@ {if $termSettings.fieldFail.reg_term_registrations_name}

{$termSettings.fieldFail.reg_term_registrations_name}

{/if} - + Attendee: @@ -64,7 +64,7 @@ {if $termSettings.fieldFail.reg_term_attendee_plur_cap}

{$termSettings.fieldFail.reg_term_attendee_plur_cap}

{/if} - + Attended: @@ -74,7 +74,7 @@ {if $termSettings.fieldFail.reg_term_attended}

{$termSettings.fieldFail.reg_term_attended}

{/if} - + Attending: @@ -84,7 +84,7 @@ {if $termSettings.fieldFail.reg_term_attending}

{$termSettings.fieldFail.reg_term_attending}

{/if} - + Contact Information: @@ -94,7 +94,7 @@ {if $termSettings.fieldFail.reg_term_contact_information}

{$termSettings.fieldFail.reg_term_contact_information}

{/if} - + Event: @@ -128,7 +128,7 @@ {if $termSettings.fieldFail.reg_term_event_plur_cap}

{$termSettings.fieldFail.reg_term_event_plur_cap}

{/if} - + ID: @@ -231,6 +231,40 @@ + + + Rate: + Normal: + + + {if $termSettings.fieldFail.reg_term_rate}

{$termSettings.fieldFail.reg_term_rate}

{/if} + + + +   + Capitalized: + + + {if $termSettings.fieldFail.reg_term_rate_cap}

{$termSettings.fieldFail.reg_term_rate_cap}

{/if} + + + +   + Plural: + + + {if $termSettings.fieldFail.reg_term_rate_plur}

{$termSettings.fieldFail.reg_term_rate_plur}

{/if} + + + +   + Plural Capitalized: + + + {if $termSettings.fieldFail.reg_term_rate_plur_cap}

{$termSettings.fieldFail.reg_term_rate_plur_cap}

{/if} + + + Password: @@ -316,10 +350,10 @@ {if $termSettings.fieldFail.reg_term_register_cap}

{$termSettings.fieldFail.reg_term_register_cap}

{/if} - + - Register for Event + Register for Event: Normal: @@ -327,9 +361,9 @@ - + - Registered; + Registered: Normal: @@ -344,7 +378,7 @@ {if $termSettings.fieldFail.reg_term_registered_cap}

{$termSettings.fieldFail.reg_term_registered_cap}

{/if} - + Registered User: @@ -378,7 +412,7 @@ {if $termSettings.fieldFail.reg_term_registered_user_plur_cap}

{$termSettings.fieldFail.reg_term_registered_user_plur_cap}

{/if} - + Registering @@ -403,11 +437,10 @@ Normal: - {if $termSettings.fieldFail.reg_term_registers}

{$termSettings.fieldFail.reg_term_registers}

{/if} - (Intransitive Verb) + {if $termSettings.fieldFail.reg_term_registers}

{$termSettings.fieldFail.reg_term_registers}

{/if} (Verb) - + Registration: @@ -441,13 +474,13 @@ {if $termSettings.fieldFail.reg_term_registration_plur_cap}

{$termSettings.fieldFail.reg_term_registration_plur_cap}

{/if} - + - + @@ -529,9 +562,9 @@ {if $termSettings.fieldFail.reg_term_button_checkout_page_submit}

{$termSettings.fieldFail.reg_term_button_checkout_page_submit}

{/if} -

NOTE: Please try to keep text for the buttons below very short and verify how they look when you're done!

NOTE: Please try to keep text for the buttons below very short and verify how they look when you're done!

 

Buttons at top of all pages

List Events:
+ - + diff --git a/views/admin/registrations/accountDashboard.html b/views/admin/registrations/accountDashboard.html index 38976d7..f990884 100755 --- a/views/admin/registrations/accountDashboard.html +++ b/views/admin/registrations/accountDashboard.html @@ -74,14 +74,14 @@ Status {$terms.reg_term_attendee_plur_cap} - {foreach $account.requests as $request} + {foreach $account.requests as $request} {$request.id} {$request.date_submitted.datetime} {$request.pay_method.name} {$request.status.name} {$request.registrants} - + {/foreach} @@ -98,11 +98,11 @@ Name {$terms.reg_term_event_cap} Level - Rate + {$terms.reg_term_rate_cap} Request Status Attending - {foreach $account.registrants as $registrant} + {foreach $account.registrants as $registrant} {$registrant.id} {$registrant.fname} {$registrant.lname} @@ -111,7 +111,7 @@ {$registrant.rate_name} {$registrant.request_status_name} {if $registrant.not_attending.value}No{else}Yes{/if} - + {/foreach} diff --git a/views/admin/registrations/accountsDashboard.html b/views/admin/registrations/accountsDashboard.html index 5a92563..9322635 100755 --- a/views/admin/registrations/accountsDashboard.html +++ b/views/admin/registrations/accountsDashboard.html @@ -25,7 +25,7 @@ Inactive Accounts  

- +
@@ -52,12 +52,12 @@ Phone Requests {$terms.reg_term_registered_cap} - Created + Created {foreach $accounts as $account} - + {$account.id} {$account.member_id} @@ -90,8 +90,8 @@ {$account.lname}, {$account.fname}{if $account.title}{if $account.lname != '' || $account.fname != ''} - {/if}{$account.title}{/if} {/if}
{if $account.org != ''}{$account.org}
{/if} - {if $account.add1 != ''}{$account.addr1}
{/if} - {if $account.add2 != ''}{$account.addr2}
{/if} + {if $account.addr1 != ''}{$account.addr1}
{/if} + {if $account.addr2 != ''}{$account.addr2}
{/if} {if $account.city != ''}{$account.city}{/if} {if $account.state.value != ''}{if $account.city != ''},ddd {/if}{$account.state.name}{/if} {if $account.country.value}{$account.country.name}{/if} @@ -99,7 +99,7 @@ {if $account.phone != ''}{$account.phone}
{/if} {if $account.email != ''}{$account.email}
{/if}

- + {if $account.numb_requests}
@@ -114,14 +114,14 @@ Status {$terms.reg_term_attendee_plur_cap} - {foreach $account.requests as $request} + {foreach $account.requests as $request} {$request.id} {$request.date_submitted.datetime} {$request.pay_method.name} {$request.status.name} {$request.registrants} - + {/foreach}
@@ -137,11 +137,11 @@ Name {$terms.reg_term_event_cap} Level - Rate + {$terms.reg_term_rate_cap} Requeest Status Attending - {foreach $account.registrants as $registrant} + {foreach $account.registrants as $registrant} {$registrant.id} {$registrant.fname} {$registrant.lname} @@ -150,7 +150,7 @@ {$registrant.rate_name} {$registrant.request_status_name} {if $registrant.not_attending.value}No{else}Yes{/if} - + {/foreach} @@ -235,7 +235,7 @@ return; } }); - + }); diff --git a/views/admin/registrations/eventDashboard.html b/views/admin/registrations/eventDashboard.html index fc86a82..a8b38db 100755 --- a/views/admin/registrations/eventDashboard.html +++ b/views/admin/registrations/eventDashboard.html @@ -30,6 +30,17 @@ {$regEventLastTime.datetime}  + {if $regEvent.not_included_in_lists} +
+
+

This {$terms.reg_term_event_cap} is Not Displayed in Lists

+
+
+ This {$terms.reg_term_event} is not displayed to users in lists of available + {$terms.reg_term_registration_plur} {$terms.reg_term_event_plur}. +
+
+ {/if}
@@ -74,8 +85,8 @@

Available Less Currently Held:

- {$regEvent.curAvailCalc} - {if $regEvent.curAvailError}
(discrepancy in stored quantity corrected) {/if} + {$regEvent.curAvailCalc} + {if $regEvent.curAvailError}
(discrepancy in stored quantity corrected) {/if}
{/if} @@ -92,7 +103,14 @@
+
User {$terms.reg_term_registration_cap} Page

+
+
+
+
+ {if !$regEventStandAlone}
Add {$terms.reg_term_registration_cap} Dates/Times from {$terms.reg_term_event_cap}
+ {/if}

This action looks for dates and time specified for the associated {$terms.reg_term_event} in the {$terms.reg_term_event} schedules. If there are any dates and times that are @@ -109,7 +127,7 @@ and times to {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. To deactivate or remove those dates you will be required to click on each date/time and either deactivate it or demove it.

-
+ @@ -162,7 +180,7 @@ possible to search for these requests by {$terms.reg_term_event}.

{/if} - + @@ -202,27 +220,22 @@
{if $haveRegEvent}

Dates and Availability

-

{$terms.reg_term_event_cap} occurs every day from first day to last day at the times shown.

- {foreach $regEvent.reg_time as $rt} {if !$regEvent.time_specific.value && $rt.non_time_specific.value} +
- {if $rt.attendee_max == 0} - - {else} - - {/if} +

Edit {$terms.reg_term_attendee} availability here for this {$terms.reg_term_event}.

Unlimited {$terms.reg_term_registration} - Set maximum {$terms.reg_term_attendee_plur} quantity below to limit {$terms.reg_term_registration_plur}.
Limited availability for this {$terms.reg_term_event} - the below numbers are for all days.
Maximum {$terms.reg_term_attendee_plur_cap} (0 for unlimited):
Update
+   UNLIMTED:
{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:{$rt.attendee_count}
Pending in Carts:{$rt.attendees_pending}
Available for {$terms.reg_term_registration_cap}:{$rt.attendees_available}
{/if} {/foreach} - {if $regEvent.time_specific.value}

Edit {$terms.reg_term_attendee} availability for a specific date/time by clicking {$terms.reg_term_event} time in the calendar below.

Availability guide: (limit)-(registered)-(pending)-(available)

@@ -230,6 +243,21 @@ @@ -268,6 +296,12 @@ + {/if} + {if $settings.selected_map_interface == 2} + + + {/if} + +
Map Location Using Above Address
+

+ {if $settings.selected_map_interface == 1} + +

+ {/if} + + {if $settings.selected_map_interface == 2} + +
(map loads here)
+ {/if} +

+ Position: +  Lat +  Lon +   Update pointer
+ You may drag the map marker to the exact location desired. Also consider selecting "Satellite" view to better locate the marker. +

+

+ + + {/if} {* stand-alone registration *} + + + - -
+
+

  + + {if $calDefaultDateChosen == 'nextActive'} + Displaying month with next active event date. + {/if} + {if $calDefaultDateChosen == 'firstListed'} + No future active dates. Displaying month with first date selected for this {$terms.reg_term_event}. + {/if} + {if $calDefaultDateChosen == 'today'} + No dates selected. Showing this month. + {/if} + +

+

Payment

{$terms.reg_term_registration_plur_cap} By: @@ -125,47 +368,47 @@ {if $regEvent.fieldFail.restricted_payment_methods}

{$regEvent.fieldFail.restricted_payment_methods}

{/if}

Misc

{$terms.reg_term_registration_cap} Description: - This will be displayed in addition to any description text from the {$terms.reg_term_event} - {php} - wp_editor('{$regEvent.fieldData.descr|escape:quotes}', 'glm_descr', array( - 'media_buttons' => false, - // 'quicktags' => false, - // 'wpautop' => false, NOTE: Dont use. Problem when numerous spaces before text. - 'textarea_name' => 'descr', - 'editor_height' => 200, // Height in px, overrides editor_rows - // 'textarea_rows' => 8 - )); - {/php} + This will be displayed in addition to any description text from the {$terms.reg_term_event}. + {wp_editor( + $regEvent.fieldData.descr, + 'glm_descr', + json_decode('{ + "media_buttons": false, + "quicktags": false, + "textarea_name": "descr", + "editor_height": 200 + }', true) + )} {if $regEvent.fieldFail.descr}

{$regEvent.fieldFail.descr}

{/if}
Terms and Conditions
for {$terms.reg_term_registration_cap}:
- the user will be required to acknowledge this at checkout. - {php} - wp_editor('{$regEvent.fieldData.terms|escape:quotes}', 'glm_terms', array( - 'media_buttons' => false, - // 'quicktags' => false, - // 'wpautop' => false, NOTE: Dont use. Problem when numerous spaces before text. - 'textarea_name' => 'terms', - 'editor_height' => 200, // Height in px, overrides editor_rows - // 'textarea_rows' => 8 - )); - {/php} + The user will be required to acknowledge this at checkout. + {wp_editor( + $regEvent.fieldData.terms, + 'glm_terms', + json_decode('{ + "media_buttons": false, + "quicktags": false, + "textarea_name": "terms", + "editor_height": 200 + }', true) + )} {if $regEvent.fieldFail.terms}

{$regEvent.fieldFail.terms}

{/if}
File: + This is a file that users may download. Depending on site design, a link to this file may be displayed to the user.
{if $regEvent.fieldData.reg_file} - Replace this file: {$regEvent.fieldData.reg_file}    Delete File
+ Replace this file: {else} New file: {/if} @@ -181,6 +424,8 @@
Notes: + This field is for general notes you may want to keep regarding this {$terms.reg_term_registration} {$terms.reg_term_event}.
+ These notes are only displayed here and are not displayed to Website users.
{if $regEvent.fieldFail.notes}

{$regEvent.fieldFail.notes}

@@ -198,6 +443,430 @@ diff --git a/views/admin/registrations/eventPaymentCodes.html b/views/admin/registrations/eventPaymentCodes.html index 6fe222d..2c8f297 100644 --- a/views/admin/registrations/eventPaymentCodes.html +++ b/views/admin/registrations/eventPaymentCodes.html @@ -28,13 +28,14 @@
- + {if $option == 'globalCodes'} {else} {/if} + @@ -45,11 +46,11 @@ @@ -85,8 +86,8 @@
{$terms.reg_term_payment_code_cap}:
-{if $option == 'globalCodes'} +{if $option == 'globalCodes'} {else} -{/if} +{/if}

* Required

- Cancel - + Cancel +
@@ -102,7 +103,7 @@
-
+ {if $option == 'globalCodes'} {else} @@ -153,7 +154,7 @@

* Required

- Cancel + Cancel @@ -175,10 +176,10 @@ {if $option == 'globalCodes'}

{$terms.reg_term_payment_code_plur_cap} that apply to any {$terms.reg_term_event}

- Add Global {$terms.reg_term_payment_code_cap} + Add Global {$terms.reg_term_payment_code_cap} {else}

{$terms.reg_term_payment_code_plur_cap} that apply to any {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}

- Add {$terms.reg_term_event_cap} {$terms.reg_term_payment_code_cap} + Add {$terms.reg_term_event_cap} {$terms.reg_term_payment_code_cap} {/if} {if $havePayCodes} @@ -192,7 +193,7 @@
{$p.code}
{$p.code_type.name}
- {if $p.code_type.value==20} + {if $p.code_type.value==20} ${$p.amount|number_format:2} {elseif $p.code_type.value==30} {$p.amount|number_format:2}% @@ -217,6 +218,7 @@ diff --git a/views/admin/registrations/eventRegistrants.html b/views/admin/registrations/eventRegistrants.html index db4523b..5cdf687 100755 --- a/views/admin/registrations/eventRegistrants.html +++ b/views/admin/registrations/eventRegistrants.html @@ -17,12 +17,12 @@

- +--> Text Search:     @@ -56,23 +56,24 @@

- +

Total found: {if $haveRegistrants}{$registrantCount}{else}(none){/if}  

- + {if $paging} {/if} - + {* Attendee Listing Table *} {* Showing the results from reg_request_registrant table *} + - + @@ -88,6 +89,7 @@ {$r.fname} {$r.lname} + @@ -104,22 +106,22 @@ View Request | - View Account + View Account {if $r.request_status == 0} | Access Cart - {/if} - + {/if} + -
NameOrganization Level Event Date/TimeRate{$terms.reg_term_rate_cap} Status Submitted Not Attending {$r.account.org} {$r.class_name} {$r.event_time_reformatted} {$r.rate_name}
- - + + {if $paging} {/if} - +
@@ -205,6 +209,8 @@ {$terms.reg_term_attendee_cap} ID
{$terms.reg_term_attendee_cap} Name
+ Organization
+ Title/Department
Address Line #1
Address Line #2
City
@@ -218,7 +224,7 @@ County
Level
Date/Time
- Rate
+ {$terms.reg_term_rate_cap}
Status
{if apply_filters('glm-members-customfields-plugin-active', false)} Custom Fields
@@ -238,11 +244,13 @@ - + @@ -316,7 +324,7 @@ jQuery(document).ready(function($){ }); // Edit registrant - $('.glm-edit').click(function(e){ + $('.glm-edit').click(function(e) { e.preventDefault(); attendeeLinksEditSelected(); $('.glm-edit-form-' + $(this).data('registrant')).show(); @@ -330,6 +338,8 @@ jQuery(document).ready(function($){ var classId = $(this).data('class'); var fieldsHtml = ''; + $('.customfields-attendee-' + refId).html('Loading additional fields ...'); + // Get event attendee custom fields $.ajax({ cache: false, @@ -371,9 +381,13 @@ jQuery(document).ready(function($){ // Add custom fields to form $('.customfields-attendee-' + refId).html( fieldsHtml); - }).fail(); + }).fail( function() { + $('.customfields-attendee-' + refId).html('(Unable to get additional field data.)'); + }); - }).fail(); + }).fail( function() { + $('.customfields-attendee-' + refId).html('(Unable to get additional field data.)'); + }); {/if} @@ -477,7 +491,7 @@ jQuery(document).ready(function($){ $('.glm-admin-table-inner').mouseleave( function() { $('#attendeeLinks_' + attendeeHoverId).addClass('glm-hidden'); }) - + $('#statusFieldsSelect').multiselect(); }); diff --git a/views/admin/registrations/eventSubTabs.html b/views/admin/registrations/eventSubTabs.html index 3dabb1c..107950d 100644 --- a/views/admin/registrations/eventSubTabs.html +++ b/views/admin/registrations/eventSubTabs.html @@ -19,12 +19,12 @@ {if $haveMessages} -
+
Please Note: -
    +
      {foreach $messages as $m}
    • {$m}
    • {/foreach} -
    +
{/if} diff --git a/views/admin/registrations/eventsDashboard.html b/views/admin/registrations/eventsDashboard.html index c8d5d52..5fe637c 100755 --- a/views/admin/registrations/eventsDashboard.html +++ b/views/admin/registrations/eventsDashboard.html @@ -1,113 +1,121 @@ {include file='admin/registrations/eventHeader.html'} - +
+

Add a {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}

+ +

Display Notification E-Mails sent today

+

{$terms.reg_term_registration_plur_cap} Dashboard

- -
+
- -

- Display Notification E-Mails sent today -

List of {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}

-

- -
- Text Search: - +
+

List of {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}

+

+ Text Search: + +

+
+
+

Total found: {$regEventsCount}  

+ - - -

Total found: {$regEventsCount}  

- -
- - - {if $paging} {/if} - - - - - - - - - - - - - - - - - - - - -{if $haveRegEvents} - {assign var="i" value="0"} - {foreach $regEvents as $r} - {if $i++ is odd by 1} - - {else} - - {/if} - - - - - - - - - - - - - {/foreach} -{else} - -{/if} - -
ID{$terms.reg_term_event_cap} NameDate Specific?Maximum
{$terms.reg_term_attendee_plur_cap}
{$terms.reg_term_registered_cap}Cart
Hold
Currently
Available
Total
Available
First DateLast Date 
- {$r.id} - - {$r.event_name} - {if $r.time_specific.value}Yes{/if}{$r.total}{$r.registered}{$r.cartHold}{$r.curAvail}{$r.totalAvail}{$r.first_datetime.datetime}{$r.last_datetime.datetime} - {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $r.event)} - {if is_array($r_link)} - {$r_link.title} - {/if} -
(no {$terms.reg_term_registration} {$terms.reg_term_event} listed)
- + + + + + + + + + + + + + + + + + + {if $haveRegEvents} + {assign var="i" value="0"} + {foreach $regEvents as $r} + {if $i++ is odd by 1} + + {else} + + {/if} + + + + + + + + + + + + + {/foreach} + {else} + + + + {/if} + +
ID{$terms.reg_term_event_cap} NameDate Specific?Maximum
{$terms.reg_term_attendee_plur_cap}
{$terms.reg_term_registered_cap}Cart
Hold
Currently
Available
Total
Available
First DateLast Date 
{$r.id}{$r.event_name}{if $r.time_specific.value}Yes{/if}{$r.total}{$r.registered}{$r.cartHold}{$r.curAvail}{$r.totalAvail}{$r.first_datetime.datetime}{$r.last_datetime.datetime} + {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $r.event)} + {if is_array($r_link)} + {$r_link.title} + {/if} +
(no {$terms.reg_term_registration} {$terms.reg_term_event} listed)
{if $paging} {/if} -
- -
-

-

List of {$terms.reg_term_registration_cap} Requests Needing Attention

-

+
+
+

List of {$terms.reg_term_registration_cap} Requests Needing Attention

-
+
Selected Status:   {foreach $requestStatusSelect as $s} -  {$s.descr}    +  {$s.descr}    {/foreach}
@@ -123,60 +131,67 @@ -{if $haveRequests} - {assign var="i" value="0"} - {foreach $requests as $r} - {if $i++ is odd by 1} + {if $haveRequests} + {assign var="i" value="0"} + {foreach $requests as $r} + {if $i++ is odd by 1} - {else} + {else} - {/if} - - {$r.id} - + {/if} + {$r.id} {$r.account_fname} {$r.account_lname} {$r.status.nameEsc} - {$r.total} + {$r.total} {$r.date_created.datetime} {$r.last_update.datetime} - Edit Request Status | + Edit Request Status + | View Request Detail -

Edit This Request

- Set Status To:   - {foreach $requestStatusEditSelect as $s} -  {$s.descr}    - {/foreach} -
- Save - Cancel Edit -

+

+ Set Status To:   + {foreach $requestStatusEditSelect as $s} +  {$s.descr}    + {/foreach} +

+

+ Save + Cancel Edit +

- NOTE: The summary below is a copy from when the request was submitted. Any changes to {$terms.reg_term_attendee_plur} after that are not shown here.
- {$r.summary} +

+ NOTE: The summary below is a copy from + when the request was submitted. Any changes to + {$terms.reg_term_attendee_plur} after that are + not shown here.
+

+

{$r.summary}

- {/foreach} -{else} - (no requests with selected status) -{/if} + {/foreach} {else} + + (no requests with selected status) + + {/if}
+ {include file='admin/footer.html'} diff --git a/views/admin/registrations/requestDashboard.html b/views/admin/registrations/requestDashboard.html index 386cd0a..8014b1e 100755 --- a/views/admin/registrations/requestDashboard.html +++ b/views/admin/registrations/requestDashboard.html @@ -16,14 +16,14 @@ {else} Delete Request {/if} - +

Request

- +
- +

Request ID:

@@ -46,7 +46,7 @@ {$cart.accounts.$acct.email}
- +

Billing Information:

@@ -77,7 +77,7 @@
- {if $cart.request.status.name != 'In Cart'} + {if $cart.request.status.name != 'In Cart'}

Submitted:

@@ -124,7 +124,7 @@
- +

Notes:

@@ -142,7 +142,7 @@
- +
@@ -154,13 +154,13 @@ Name {$terms.reg_term_event_cap} Level - Rate + {$terms.reg_term_rate_cap} Attending {foreach $cart.events as $event} {foreach $event.classes as $class} {foreach $class.rates as $rate} - {foreach $rate.registrants as $registrant} + {foreach $rate.registrants as $registrant} {$registrant.fname} {$registrant.lname} {$event.event_name} @@ -170,13 +170,13 @@ {/foreach} {/foreach} - {/foreach} + {/foreach} {/foreach}
- +
- + {if $cart.request.status.name != 'In Cart'}

Cart Contents When Submitted

@@ -189,18 +189,18 @@ NOTE: This is the current contents of the cart for this request. This request has not yet been submitted.

{/if} - +
- + {if $cart.request.summary} {$cart.request.summary} {else} - + {if $haveCart} {assign var="summaryType" value="adminRequest"} {include file='front/registrations/cartSummary.html'} {/if} {* / if have cart *} - + {/if}
diff --git a/views/admin/registrations/requestEdit.html b/views/admin/registrations/requestEdit.html index b23d1ce..095fe26 100644 --- a/views/admin/registrations/requestEdit.html +++ b/views/admin/registrations/requestEdit.html @@ -10,7 +10,7 @@
{if $option == 'edit' || $option == 'update'} -*** Edit or Update *** +--> {else} {$req = $cart.request} - + - {/if} + {/if}
@@ -63,7 +63,7 @@
Card Type: {$req.cc_type.value}
Card Number: {$req.cc_numb}
Confirmation: {$req.cc_conf}
@@ -74,9 +74,9 @@ - + - {/if} + {/if} @@ -84,7 +84,7 @@ - - + + {/if}
diff --git a/views/admin/settings/registrationsMisc.html b/views/admin/settings/registrationsMisc.html index 69b03df..00f6bad 100644 --- a/views/admin/settings/registrationsMisc.html +++ b/views/admin/settings/registrationsMisc.html @@ -1,6 +1,6 @@ {include file='admin/settings/header.html'} -
- +
{* If there's a starting timestamp for this event. Why wouldn't there be? *} @@ -51,7 +56,7 @@
{$event.first_datetime.timestamp|date_format:"%l:%M %p"}
{* If the first and last timestamp are NOT the same, then there's other dates and times Should be selectable below. *} - {if $event.first_date.timestamp != $regEvent.last_date.timestamp} + {if $event.first_datetime.timestamp != $event.last_datetime.timestamp}
(see other dates and times below)
{/if} @@ -105,7 +110,7 @@ {/foreach} {else} -

Sorry, no {$terms.reg_term_event_plur} are available for {$terms.reg_term_registration} at this time.

+

Sorry, no {$terms.reg_term_event_plur} listed for {$terms.reg_term_registration} at this time.

{/if}
diff --git a/views/front/registrations/register.html b/views/front/registrations/register.html index 605edf5..61ab379 100644 --- a/views/front/registrations/register.html +++ b/views/front/registrations/register.html @@ -41,6 +41,14 @@
+
+
+ +
+
{/if} + +{else} {* Have Reg Event *} +
+
+

{$terms.reg_term_registration_cap} {$terms.reg_term_event} not found.

+ Return to {$terms.reg_term_registration_plur_cap} List +
+
+{/if}
{* Bootstrap the models needed on page load *} {* Need to have RegEvent model created *} {* And create the RegClasses collection *} + +{if $haveRegEvent} {* Ignoring all code below if event doesn't exist. *} + + +{/if} {* Ignoring code if event not found. *} \ No newline at end of file diff --git a/views/front/registrations/summary.html b/views/front/registrations/summary.html index 0e1a8e3..e66f301 100644 --- a/views/front/registrations/summary.html +++ b/views/front/registrations/summary.html @@ -62,6 +62,14 @@
+
+
+
+ +
diff --git a/views/front/registrations/summaryStore.html b/views/front/registrations/summaryStore.html index 02e333f..7344b5e 100755 --- a/views/front/registrations/summaryStore.html +++ b/views/front/registrations/summaryStore.html @@ -1,4 +1,4 @@ - + - +

Checkout Summary

@@ -114,7 +114,7 @@ {if $account.fax} {/if} - + @@ -145,7 +145,7 @@ {/if}
title:{$account.title}
E-Mail Address:{$account.email}
E-Mail Address:{$account.email}
Request #:{$request.id}
Submitted:{$request.date_submitted.datetime}
Status:{$request.status.name}
- + {if $request.pay_method.value == $payMethodsNumb.NoCharge} @@ -188,9 +188,9 @@

{$terms.reg_term_registration_plur_cap}

- + - + {foreach $cart.events as $event} @@ -221,20 +221,20 @@ + {else} + {/if} {/if} @@ -248,25 +248,25 @@ + {else} + {/if} {/if} {/foreach} - {/if} + {/if} {if $registrant.registrantDiscounts > 0} @@ -276,12 +276,12 @@ {/foreach} {* Registrant *} {/foreach} {* Rate *} - {/foreach} {* Class *} + {/foreach} {* Class *} {foreach $event.payCodes as $payCode} @@ -302,10 +302,10 @@ - + {/foreach} {/if} @@ -319,6 +319,6 @@ -
        {$customField.field_name}: {$customField.stored} - {if $customField.cost > 0} + {if $customField.cost > 0} ${$customField.cost|number_format:2} {/if} -
        {$customField.field_name}: {$customField.stored} - {if $customField.cost > 0} + {if $customField.cost > 0} ${$customField.cost|number_format:2} {/if} -
        {$customField.field_name}: {$customField.stored} - {if $customField.cost > 0} + {if $customField.cost > 0} ${$customField.cost|number_format:2} {/if} -
        {$customField.field_name}: {$customField.stored} - {if $customField.cost > 0} + {if $customField.cost > 0} ${$customField.cost|number_format:2} {/if} -
        {$terms.reg_term_attendee_cap} Discount
 
  - Event {$terms.reg_term_payment_code_cap}: {$payCode.code} + Event {$terms.reg_term_payment_code_cap}: {$payCode.code} -${$payCode.thisDiscount|number_format:2}
  - Global {$terms.reg_term_payment_code_cap}: {$payCode.code} + Global {$terms.reg_term_payment_code_cap}: {$payCode.code} -${$payCode.thisDiscount|number_format:2}
${$cart.grandTotal|number_format:2}
+ -- 2.17.1