From: Chuck Scott Date: Mon, 28 Jan 2019 21:14:23 +0000 (-0500) Subject: Fixed confused display when no reg event is found in registrations event dashboard. X-Git-Tag: v1.2.0^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=cfc330b024fcb75056a3d0ba6073fe77efe79be8;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed confused display when no reg event is found in registrations event dashboard. --- diff --git a/models/admin/registrations/events_eventDashboard.php b/models/admin/registrations/events_eventDashboard.php index f2f99ae..6046fd6 100755 --- a/models/admin/registrations/events_eventDashboard.php +++ b/models/admin/registrations/events_eventDashboard.php @@ -214,50 +214,54 @@ if ($regEvent !== false) { * 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 ($haveRegEvent) { + + 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 && !$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 (!$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 (!$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 ($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 (!$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 (!$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)'; -} + 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)'; + } + + 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); + } -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)."
"; diff --git a/views/admin/registrations/eventDashboard.html b/views/admin/registrations/eventDashboard.html index a8b38db..3399e68 100755 --- a/views/admin/registrations/eventDashboard.html +++ b/views/admin/registrations/eventDashboard.html @@ -1,296 +1,282 @@ {include file='admin/registrations/eventHeader.html'} -{include file='admin/registrations/eventSubTabs.html'} -
{if $haveRegEvent} -
-
-
-
-
-

{$terms.reg_term_event_cap} Code:

-
-
- {$regEvent.event_code} (ID {$regEvent.id}) -
-
-
-
-

First {$terms.reg_term_event_cap} Time:

-
-
- {$regEventFirstTime.datetime}  -
-
-
-
-

Last {$terms.reg_term_event_cap} Time:

-
-
- {$regEventLastTime.datetime}  + {include file='admin/registrations/eventSubTabs.html'} + +
+
+
+
+
+
+

{$terms.reg_term_event_cap} Code:

+
+
+ {$regEvent.event_code} (ID {$regEvent.id}) +
-
- {if $regEvent.not_included_in_lists} -
-
-

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

+
+
+

First {$terms.reg_term_event_cap} Time:

+
+
+ {$regEventFirstTime.datetime}  +
-
- This {$terms.reg_term_event} is not displayed to users in lists of available - {$terms.reg_term_registration_plur} {$terms.reg_term_event_plur}. +
+
+

Last {$terms.reg_term_event_cap} Time:

+
+
+ {$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}
- {/if}
-
-
-
- {if $haveRegEvent} -
-
-

Maximum {$terms.reg_term_attendee_plur_cap}:

-
-
- {$regEvent.total} -
-
- {/if} -
-
-

{$terms.reg_term_registered_cap}:

-
-
- {$regEvent.registered} -
-
- {if $haveRegEvent} -
-
-

{$terms.reg_term_attendee_plur_cap} Available:

-
-
- {$regEvent.totalAvail} +
+
+
+
+

Maximum {$terms.reg_term_attendee_plur_cap}:

+
+
+ {$regEvent.total} +
-
-
-
-

On Hold in Pending Requests:

+
+
+

{$terms.reg_term_registered_cap}:

+
+
+ {$regEvent.registered} +
-
- {$regEvent.cartHold} +
+
+

{$terms.reg_term_attendee_plur_cap} Available:

+
+
+ {$regEvent.totalAvail} +
-
-
-
-

Available Less Currently Held:

+
+
+

On Hold in Pending Requests:

+
+
+ {$regEvent.cartHold} +
-
- {$regEvent.curAvailCalc} - {if $regEvent.curAvailError}
(discrepancy in stored quantity corrected) {/if} +
+
+

Available Less Currently Held:

+
+
+ {$regEvent.curAvailCalc} + {if $regEvent.curAvailError}
(discrepancy in stored quantity corrected) {/if} +
- {/if}
-
- {if apply_filters('glm_members_menu_members', true)} - -
-
-
-
- {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)} -
-
-
-
-
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 - not already included for {$terms.reg_term_registration_plur}, this action will add them using the defaults set for this {$terms.reg_term_event}. You may set those - defaults by clicking the "Edit {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}" button on this page. This action will not modify or remove date and times already - added to {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. -

-

- The primary purpose of this action is to assist with initial setup of {$terms.reg_term_registration_plur} for an {$terms.reg_term_event} when there are a number of - dates and times specified in the schedules for the {$terms.reg_term_event} and you wish to make most or all of those dates and times available for {$terms.reg_term_registration}. -

-

- NOTE: If the {$terms.reg_term_event} covers a large number of dates, this action may add a large number of dates - 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. -

-
- - - - - -
-

{$terms.reg_term_event_cap}: {$regEvent.event_name}

-

To add dates and times from the {$terms.reg_term_event} schedules
enter exactly "ADD" in the field below.

- -

Then click this button

- -
-
+ {if apply_filters('glm_members_menu_members', true)} +
+
+
+
+ {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)} +
- - - -
-
-
-
-
Delete {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}
-
-
-

WARNING!

-

*** Entirely removes an {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap} ***

-
-

- Continuing with this action will permanently remove this {$terms.reg_term_event} from {$terms.reg_term_registration_plur} including all configuration associated with it. - This will not remove the {$terms.reg_term_event} listing, only the information on {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. -

-

- This action is - NOT REVERSABLE! After deletion, you will be required to re-enter all {$terms.reg_term_registration} related - configuration information in order to have {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. -

- {if $regEvent.registered > 0} -
-

ALSO NOTE!

-

There have been {$regEvent.registered} {$terms.reg_term_registration_plur} submitted for this {$terms.reg_term_event}.

-
-

- Continuing with this action will delete all {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. - This will also remove these {$terms.reg_term_registration_plur} from all reports. It's important that you print all reports and other information - you want to preserve for {$terms.reg_term_registration_plur} for this {$terms.reg_term_event} prior to deletion. -

-

- The only exception is that the {$terms.reg_term_registration} request records will remain along with the summary that was displayed after checkout - for those requests. After this action, that will be the only historic record the the submission took place and it will not be - possible to search for these requests by {$terms.reg_term_event}. -

- {/if} -
- - - - -
-

{$terms.reg_term_event_cap}: {$regEvent.event_name}

-

To delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}, enter exactly "DELETE" in the field below.

- -

Then click this button

- -
-
+
+
+
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 + not already included for {$terms.reg_term_registration_plur}, this action will add them using the defaults set for this {$terms.reg_term_event}. You may set those + defaults by clicking the "Edit {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}" button on this page. This action will not modify or remove date and times already + added to {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. +

+

+ The primary purpose of this action is to assist with initial setup of {$terms.reg_term_registration_plur} for an {$terms.reg_term_event} when there are a number of + dates and times specified in the schedules for the {$terms.reg_term_event} and you wish to make most or all of those dates and times available for {$terms.reg_term_registration}. +

+

+ NOTE: If the {$terms.reg_term_event} covers a large number of dates, this action may add a large number of dates + 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. +

+
+ + + + + +
+

{$terms.reg_term_event_cap}: {$regEvent.event_name}

+

To add dates and times from the {$terms.reg_term_event} schedules
enter exactly "ADD" in the field below.

+ +

Then click this button

+ +
+
+
+
+
+
+
+
Delete {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}
+
+
+

WARNING!

+

*** Entirely removes an {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap} ***

+
+

+ Continuing with this action will permanently remove this {$terms.reg_term_event} from {$terms.reg_term_registration_plur} including all configuration associated with it. + This will not remove the {$terms.reg_term_event} listing, only the information on {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. +

+

+ This action is + NOT REVERSABLE! After deletion, you will be required to re-enter all {$terms.reg_term_registration} related + configuration information in order to have {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. +

+ {if $regEvent.registered > 0} +
+

ALSO NOTE!

+

There have been {$regEvent.registered} {$terms.reg_term_registration_plur} submitted for this {$terms.reg_term_event}.

+
+

+ Continuing with this action will delete all {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. + This will also remove these {$terms.reg_term_registration_plur} from all reports. It's important that you print all reports and other information + you want to preserve for {$terms.reg_term_registration_plur} for this {$terms.reg_term_event} prior to deletion. +

+

+ The only exception is that the {$terms.reg_term_registration} request records will remain along with the summary that was displayed after checkout + for those requests. After this action, that will be the only historic record the the submission took place and it will not be + possible to search for these requests by {$terms.reg_term_event}. +

+ {/if} +
+ + + + +
+

{$terms.reg_term_event_cap}: {$regEvent.event_name}

+

To delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}, enter exactly "DELETE" in the field below.

+ +

Then click this button

+ +
+
+
+
+
+
+
+ {if is_array($r_link)} + {$r_link.title} + {/if} +
- - - -
-
-
-
- {if is_array($r_link)} - {$r_link.title} - {/if}
- -
+ {/if}
- {/if}
+
+ {if $haveRegEvent} +

Dates and Availability

+ {foreach $regEvent.reg_time as $rt} + {if !$regEvent.time_specific.value && $rt.non_time_specific.value} + + + + + + +

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

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)

+ {/if} + + + + +
+
+

  + + {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} + +

+
+
+
+ {else} +

Did not find selected {$terms.reg_term_event}.

+ {/if} +
+
+ + + + + {if $regEvent.time_specific.value} + + {/if} + + + {if $regEvent.time_specific.value} + + + + + {else} + + {/if} + +
Active:
All Day:
Track {$terms.reg_term_attendee_plur_cap}:
Start Time:
End Time:
Maximum {$terms.reg_term_attendee_plur_cap}: (0 = Unlimited)
{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:
Pending in Carts:
Available for {$terms.reg_term_registration_cap}: (0 = Unlimited)
Use form above calendar to adjust {$terms.reg_term_attendee} availability.
+
Update
+
+
+ {else} -

Did not find selected {$terms.reg_term_event}.

+

{$terms.reg_term_registration_cap} {$terms.reg_term_event_cap} not found!

{/if} -
- - -
- {if $haveRegEvent} -

Dates and Availability

- {foreach $regEvent.reg_time as $rt} - {if !$regEvent.time_specific.value && $rt.non_time_specific.value} - - - - - - -

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

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)

- {/if} - - - - -
-
-

  - - {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} - -

-
-
-
- - - {else} -

Did not find selected {$terms.reg_term_event}.

- {/if} -
-
- - - - - {if $regEvent.time_specific.value} - - {/if} - - - {if $regEvent.time_specific.value} - - - - - {else} - - {/if} - -
Active:
All Day:
Track {$terms.reg_term_attendee_plur_cap}:
Start Time:
End Time:
Maximum {$terms.reg_term_attendee_plur_cap}: (0 = Unlimited)
{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:
Pending in Carts:
Available for {$terms.reg_term_registration_cap}: (0 = Unlimited)
Use form above calendar to adjust {$terms.reg_term_attendee} availability.
-
Update
-
-