From 4b3a2c84248c2420030e4f3796155c70fa0ee3f2 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 28 Nov 2017 14:43:32 -0500 Subject: [PATCH] Fixed problems with add/edit time dialog box start and end dates and showing incorrect edit fields for edit and other fixes. Fixed getEventForRegistration() so that it would not check reg_time records for event_time values. Removed account name from cart summary check code construction in checkoutProcess.php and summaryContent.php. --- classes/data/dataRegEvent.php | 7 +++--- models/admin/ajax/summaryContent.php | 2 +- models/admin/registrations/events.php | 2 +- .../front/registrations/checkoutProcess.php | 2 +- views/admin/registrations/eventDashboard.html | 24 ++++++++++++------- views/front/registrations/checkout.html | 1 + 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index 2b10096..c14eee2 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -836,7 +836,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract if ($timeSpecific) { // Remove entry if it's not time specific or is in the past - if ($timeVal['event_time'] == 0 || $timeVal['start_datetime']['timestamp'] < time()) { + if ($timeVal['start_datetime']['timestamp'] < time()) { // remove $timeVal['event_time'] == 0 || unset($this->regEventData['reg_time'][$timeKey]); } @@ -885,7 +885,8 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract if ($this->regEventData['time_specific']['value']) { // If event time is for time-specific event (might be either mixed in) - if ($tv['event_time']) { +// Not checking time specific/non-time specific reg_time records at this time due to adding reg_times manually that don't have event_time(s) that match +// if ($tv['event_time']) { // Try to find a current rate for this time - within the start and end days before this time foreach ($cv['reg_rate'] as $rk=>$rv) { @@ -907,7 +908,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract } - } +// } // Otherwise for non time specific eventes - rate days are per the first event date } else { diff --git a/models/admin/ajax/summaryContent.php b/models/admin/ajax/summaryContent.php index b5c5b37..974889f 100644 --- a/models/admin/ajax/summaryContent.php +++ b/models/admin/ajax/summaryContent.php @@ -87,7 +87,7 @@ $check = $_REQUEST['check']; // Make sure the check code matches - $md5 = md5($requestId.GLM_MEMBERS_REGISTRATIONS_PLUGIN_SECRET.$request['account']); + $md5 = md5($requestId.GLM_MEMBERS_REGISTRATIONS_PLUGIN_SECRET); if ($md5 != $check) { wp_die(); } diff --git a/models/admin/registrations/events.php b/models/admin/registrations/events.php index e16ca6c..bb10932 100644 --- a/models/admin/registrations/events.php +++ b/models/admin/registrations/events.php @@ -276,7 +276,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent $regEventUpdated = true; // Create all needed reg_time entries - $this->checkEventTimes($regEventID); + // $this->checkEventTimes($regEventID); } diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php index 8de770f..84e7b5f 100644 --- a/models/front/registrations/checkoutProcess.php +++ b/models/front/registrations/checkoutProcess.php @@ -658,7 +658,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport $view = 'summary'; // Build check code for display of summary in iframe - $summaryCheck = md5($this->cart['request']['id'].GLM_MEMBERS_REGISTRATIONS_PLUGIN_SECRET.$this->cart['request']['account']); + $summaryCheck = md5($this->cart['request']['id'].GLM_MEMBERS_REGISTRATIONS_PLUGIN_SECRET); // Compile template data $templateData = array( diff --git a/views/admin/registrations/eventDashboard.html b/views/admin/registrations/eventDashboard.html index 93a3a2c..984d2b2 100644 --- a/views/admin/registrations/eventDashboard.html +++ b/views/admin/registrations/eventDashboard.html @@ -258,10 +258,10 @@ - - - - + + + + @@ -355,14 +355,14 @@ {/if} start: '{$t.start_datetime.datetime}', end: '{$t.end_datetime.datetime}', - active: {$t.active.value}, + active: {if $t.active.value}true{else}false{/if}, {if $t.active.value} backgroundColor: 'light-blue', {else} backgroundColor: '#aaa', {/if} allday: {$t.all_day.value}, - attendees: {$t.attendees.value}, + attendees: {if $t.attendees.value}true{else}false{/if}, max: {$t.attendee_max}, count: {$t.attendee_count}, pending: {$t.attendees_pending}, @@ -475,10 +475,16 @@ $('#availabilityEditDialog').dialog('open'); - $('#availabilityTitle').html(calEvent.datetime); - $('#dialogRegActive').prop('checked', calEvent.active) - $('#dialogTimeAllDay').prop('checked', calEvent.allDay) + $('#dialogAllDayLine').hide(); + $('#dialogTrackLine').hide(); + $('#dialogStartTimeLine').hide(); + $('#dialogEndTimeLine').hide(); + $('#availabilityTitle').html(calEvent.datetime); + $('#dialogRegActive').prop('checked', calEvent.active); + $('#dialogTimeAllDay').prop('checked', calEvent.allDay); + $('#dialogStartTime').val(calEvent.start); + $('#dialogEndTime').val(calEvent.end); $('#dialogMaxAtt').val(calEvent.max); $('#dialogRegLine').show(); $('#dialogRegAtt').html(calEvent.count); diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index e0f675c..c512050 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -21,6 +21,7 @@ + See summary of registration request and charges below -- 2.17.1
Active:
All Day:
Track Attendees:
Start Time:
End Time:
All Day:
Track Attendees:
Start Time:
End Time:
Maximum Attendees: 0 = Unlimited
Registered Attendees:
Pending in Carts: