Fixed confused display when no reg event is found in registrations event dashboard.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 28 Jan 2019 21:14:23 +0000 (16:14 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 28 Jan 2019 21:14:23 +0000 (16:14 -0500)
models/admin/registrations/events_eventDashboard.php
views/admin/registrations/eventDashboard.html

index f2f99ae..6046fd6 100755 (executable)
@@ -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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* You have not added any dates/times to this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
-    if (!$haveAvailability) {
-        $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* You have not added any dates/times to this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
+        if (!$haveAvailability) {
+            $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* There is no availability for any listed '.$this->config['terms']['reg_term_registration_plur'].' dates. (Dates and Availability Calendar below)';
+        }
     }
-}
-if (!$haveFutureTimes) {
-    $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* "'.$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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* "Not Displayed in Lists" is checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)';
-}
-if (!$haveTimeSpecificEvent && !$haveNonTimeAvailability) {
-    $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* You have no availability for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability below)';
-}
+    if (!$regEvent['active']['value']) {
+        $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* "'.$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[] = '&nbsp;&nbsp;&nbsp;&nbsp;* "Not Displayed in Lists" is checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)';
+    }
+    if (!$haveTimeSpecificEvent && !$haveNonTimeAvailability) {
+        $reasons[] = '&nbsp;&nbsp;&nbsp;&nbsp;* 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 "<pre>".print_r($regEvent,1)."</pre>";
index a8b38db..3399e68 100755 (executable)
 {include file='admin/registrations/eventHeader.html'}
-{include file='admin/registrations/eventSubTabs.html'}
 
- <div id="glm-admin-member-dashboard" class="glm-admin-table">
 {if $haveRegEvent}
-    <div class="glm-row">
-        <div class="glm-small-12 glm-medium-4 glm-left">
-            <div class="glm-admin-table">
-                <div class="glm-row">
-                    <div class="glm-small-6 glm-column">
-                        <h3>{$terms.reg_term_event_cap} Code:</h3>
-                    </div>
-                    <div class="glm-small-6 glm-column">
-                        {$regEvent.event_code} (ID {$regEvent.id})
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>First {$terms.reg_term_event_cap} Time:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column time-input">
-                        {$regEventFirstTime.datetime}&nbsp;
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Last {$terms.reg_term_event_cap} Time:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEventLastTime.datetime}&nbsp;
+    {include file='admin/registrations/eventSubTabs.html'}
+
+    <div id="glm-admin-member-dashboard" class="glm-admin-table">
+        <div class="glm-row">
+            <div class="glm-small-12 glm-medium-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-6 glm-column">
+                            <h3>{$terms.reg_term_event_cap} Code:</h3>
+                        </div>
+                        <div class="glm-small-6 glm-column">
+                            {$regEvent.event_code} (ID {$regEvent.id})
+                        </div>
                     </div>
-                </div>
-    {if $regEvent.not_included_in_lists}
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3 class="glm-notice">This {$terms.reg_term_event_cap} is Not Displayed in Lists</h3>
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>First {$terms.reg_term_event_cap} Time:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column time-input">
+                            {$regEventFirstTime.datetime}&nbsp;
+                        </div>
                     </div>
-                    <div class="glm-small-12 glm-column">
-                        This {$terms.reg_term_event} is not displayed to users in lists of available
-                        {$terms.reg_term_registration_plur} {$terms.reg_term_event_plur}.
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Last {$terms.reg_term_event_cap} Time:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEventLastTime.datetime}&nbsp;
+                        </div>
                     </div>
+                    {if $regEvent.not_included_in_lists}
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                <h3 class="glm-notice">This {$terms.reg_term_event_cap} is Not Displayed in Lists</h3>
+                            </div>
+                            <div class="glm-small-12 glm-column">
+                                This {$terms.reg_term_event} is not displayed to users in lists of available
+                                {$terms.reg_term_registration_plur} {$terms.reg_term_event_plur}.
+                            </div>
+                        </div>
+                    {/if}
                 </div>
-    {/if}
             </div>
-        </div>
-        <div class="glm-small-12 glm-medium-4 glm-left">
-            <div class="glm-admin-table">
-  {if $haveRegEvent}
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Maximum {$terms.reg_term_attendee_plur_cap}:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEvent.total}
-                    </div>
-                </div>
-  {/if}
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>{$terms.reg_term_registered_cap}:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEvent.registered}
-                    </div>
-                </div>
-  {if $haveRegEvent}
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>{$terms.reg_term_attendee_plur_cap} Available:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEvent.totalAvail}
+            <div class="glm-small-12 glm-medium-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Maximum {$terms.reg_term_attendee_plur_cap}:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEvent.total}
+                        </div>
                     </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>On Hold in Pending Requests:</h3>
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>{$terms.reg_term_registered_cap}:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEvent.registered}
+                        </div>
                     </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEvent.cartHold}
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>{$terms.reg_term_attendee_plur_cap} Available:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEvent.totalAvail}
+                        </div>
                     </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Available Less Currently Held:</h3>
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>On Hold in Pending Requests:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEvent.cartHold}
+                        </div>
                     </div>
-                    <div class="glm-small-12 glm-column">
-                        {$regEvent.curAvailCalc}
-        {if $regEvent.curAvailError}<br>(discrepancy in stored quantity corrected) {/if}
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Available Less Currently Held:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$regEvent.curAvailCalc}
+                            {if $regEvent.curAvailError}<br>(discrepancy in stored quantity corrected) {/if}
+                        </div>
                     </div>
                 </div>
-  {/if}
             </div>
-        </div>
-  {if apply_filters('glm_members_menu_members', true)}
-
-        <div class="glm-small-12 glm-medium-4 glm-left">
-            <div class="glm-admin-table">
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-          {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)}
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <div id="regEventFrontEndButton" class="button button-secondary glm-button">User {$terms.reg_term_registration_cap} Page</div><br>
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-          {if !$regEventStandAlone}
-                        <div id="regEventAddTimesButton" class="button button-secondary glm-button">Add {$terms.reg_term_registration_cap} Dates/Times from {$terms.reg_term_event_cap}</div>
-          {/if}
-                        <div id="regEventAddTimesDialog" class="glm-dialog-box" title="Add {$terms.reg_term_registration_cap} Dates/Times from {$terms.reg_term_event_cap}">
-                            <p>
-                                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}.
-                            </p>
-                            <p>
-                                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}.
-                            </p>
-                            <p>
-                                <span class="glm-warning">NOTE:</span> 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.
-                            </p>
-                            <form action="{$thisUrl}">
-                                <input type="hidden" name="page" value="glm-members-admin-menu-registrations-events">
-                                <input type="hidden" name="option" value="eventDashboard">
-                                <input type="hidden" name="regEventID" value="{$regEvent.id}">
-                                <input type="hidden" name="getTimesFromEvent" value="yes">
-
-                                <center>
-                                    <h3>{$terms.reg_term_event_cap}: <span class="glm-warning">{$regEvent.event_name}</span></h3>
-                                    <p>To add dates and times from the {$terms.reg_term_event} schedules<br>enter exactly "ADD" in the field below.</p>
-                                    <input type="text" name="addConfirmation" value="" placeholder="Enter 'ADD' here." required>
-                                    <p>Then click this button</p>
-                                    <input type="submit" class="button button-primary glm-button" value="Add Dates and Times to {$terms.reg_term_registration_plur_cap} from the {$terms.reg_term_event_cap}">
-                                </center>
-                            </form>
+            {if apply_filters('glm_members_menu_members', true)}
+                <div class="glm-small-12 glm-medium-4 glm-left">
+                    <div class="glm-admin-table">
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)}
+                            </div>
                         </div>
-
-
-
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <div id="regEventDeleteButton" class="button button-secondary glm-button">Delete {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}</div>
-                        <div id="regEventDeleteDialog" class="glm-dialog-box" title="Delete {$terms.reg_term_registration_plur_cap} for this {$terms.reg_term_event_cap}">
-                            <center>
-                                <h1 class="glm-error">WARNING!</h1>
-                                <p class="glm-error">*** Entirely removes an {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap} ***</p>
-                            </center>
-                            <p>
-                                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}.
-                            </p>
-                            <p>
-                                This action is
-                                <span class="glm-error">NOT REVERSABLE</span>! 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}.
-                            </p>
-                    {if $regEvent.registered > 0}
-                            <center>
-                                <h3 class="glm-warning">ALSO NOTE!</h3>
-                                <p class="glm-error">There have been {$regEvent.registered} {$terms.reg_term_registration_plur} submitted for this {$terms.reg_term_event}.</p>
-                            </center>
-                            <p>
-                                Continuing with this action <span class="glm-error">will delete all {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}</span>.
-                                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.
-                            </p>
-                            <p>
-                                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}.
-                            </p>
-                    {/if}
-                            <form action="{$thisUrl}">
-                                <input type="hidden" name="page" value="glm-members-admin-menu-registrations-events">
-                                <input type="hidden" name="option" value="delete">
-                                <input type="hidden" name="regEventID" value="{$regEvent.id}">
-
-                                <center>
-                                    <h3>{$terms.reg_term_event_cap}: <span class="glm-warning">{$regEvent.event_name}</span></h3>
-                                    <p>To delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}, enter exactly "DELETE" in the field below.</p>
-                                    <input type="text" name="deleteConfirmation" value="" placeholder="Enter 'DELETE' here." required>
-                                    <p>Then click this button</p>
-                                    <input type="submit" class="button button-primary glm-button" value="Remove this {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap}">
-                                </center>
-                            </form>
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                <div id="regEventFrontEndButton" class="button button-secondary glm-button">User {$terms.reg_term_registration_cap} Page</div><br>
+                            </div>
+                        </div>
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                {if !$regEventStandAlone}
+                                    <div id="regEventAddTimesButton" class="button button-secondary glm-button">Add {$terms.reg_term_registration_cap} Dates/Times from {$terms.reg_term_event_cap}</div>
+                                {/if}
+                                <div id="regEventAddTimesDialog" class="glm-dialog-box" title="Add {$terms.reg_term_registration_cap} Dates/Times from {$terms.reg_term_event_cap}">
+                                    <p>
+                                        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}.
+                                    </p>
+                                    <p>
+                                        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}.
+                                    </p>
+                                    <p>
+                                        <span class="glm-warning">NOTE:</span> 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.
+                                    </p>
+                                    <form action="{$thisUrl}">
+                                        <input type="hidden" name="page" value="glm-members-admin-menu-registrations-events">
+                                        <input type="hidden" name="option" value="eventDashboard">
+                                        <input type="hidden" name="regEventID" value="{$regEvent.id}">
+                                        <input type="hidden" name="getTimesFromEvent" value="yes">
+
+                                        <center>
+                                            <h3>{$terms.reg_term_event_cap}: <span class="glm-warning">{$regEvent.event_name}</span></h3>
+                                            <p>To add dates and times from the {$terms.reg_term_event} schedules<br>enter exactly "ADD" in the field below.</p>
+                                            <input type="text" name="addConfirmation" value="" placeholder="Enter 'ADD' here." required>
+                                            <p>Then click this button</p>
+                                            <input type="submit" class="button button-primary glm-button" value="Add Dates and Times to {$terms.reg_term_registration_plur_cap} from the {$terms.reg_term_event_cap}">
+                                        </center>
+                                    </form>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                <div id="regEventDeleteButton" class="button button-secondary glm-button">Delete {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}</div>
+                                <div id="regEventDeleteDialog" class="glm-dialog-box" title="Delete {$terms.reg_term_registration_plur_cap} for this {$terms.reg_term_event_cap}">
+                                    <center>
+                                        <h1 class="glm-error">WARNING!</h1>
+                                        <p class="glm-error">*** Entirely removes an {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap} ***</p>
+                                    </center>
+                                    <p>
+                                        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}.
+                                    </p>
+                                    <p>
+                                        This action is
+                                        <span class="glm-error">NOT REVERSABLE</span>! 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}.
+                                    </p>
+                                    {if $regEvent.registered > 0}
+                                        <center>
+                                            <h3 class="glm-warning">ALSO NOTE!</h3>
+                                            <p class="glm-error">There have been {$regEvent.registered} {$terms.reg_term_registration_plur} submitted for this {$terms.reg_term_event}.</p>
+                                        </center>
+                                        <p>
+                                            Continuing with this action <span class="glm-error">will delete all {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}</span>.
+                                            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.
+                                        </p>
+                                        <p>
+                                            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}.
+                                        </p>
+                                    {/if}
+                                    <form action="{$thisUrl}">
+                                        <input type="hidden" name="page" value="glm-members-admin-menu-registrations-events">
+                                        <input type="hidden" name="option" value="delete">
+                                        <input type="hidden" name="regEventID" value="{$regEvent.id}">
+
+                                        <center>
+                                            <h3>{$terms.reg_term_event_cap}: <span class="glm-warning">{$regEvent.event_name}</span></h3>
+                                            <p>To delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}, enter exactly "DELETE" in the field below.</p>
+                                            <input type="text" name="deleteConfirmation" value="" placeholder="Enter 'DELETE' here." required>
+                                            <p>Then click this button</p>
+                                            <input type="submit" class="button button-primary glm-button" value="Remove this {$terms.reg_term_event_cap} from {$terms.reg_term_registration_plur_cap}">
+                                        </center>
+                                    </form>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="glm-row">
+                            <div class="glm-small-12 glm-column">
+                                {if is_array($r_link)}
+                                    <a class="button button-secondary glm-button" href="{$r_link.url|escape:'string'}">{$r_link.title}</a>
+                                {/if}
+                            </div>
                         </div>
-
-
-
-                    </div>
-                </div>
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-          {if is_array($r_link)}
-                        <a class="button button-secondary glm-button" href="{$r_link.url|escape:'string'}">{$r_link.title}</a>
-          {/if}
                     </div>
                 </div>
-
-            </div>
+            {/if}
         </div>
-  {/if}
     </div>
+    <div class="glm-admin-table-inner glm-admin-table">
+        {if $haveRegEvent}
+            <p><h3>Dates and Availability</h3></p>
+            {foreach $regEvent.reg_time as $rt}
+                {if !$regEvent.time_specific.value && $rt.non_time_specific.value}
+                    <table class="reg-non-time-specific-max-form">
+                        <tr><th colpsan="2" style="white-space: nowrap;"><h3>Edit {$terms.reg_term_attendee} availability here for this {$terms.reg_term_event}.</h3></th></tr>
+                        <tr><th style="text-align: left">Maximum {$terms.reg_term_attendee_plur_cap} (0 for unlimited):</th><td>
+                            <input class="glm-form-text-input-veryshort availabilityInput" type="text" id="maxAtt" value="{$rt.attendee_max}">
+                            <div id="availSubmit" class="button-primary" data-timeid="{$rt.id}">Update</div>
+                            <span id="unlimitedEvent" class="glm-notice">&nbsp;&nbsp;<b>UNLIMTED:</b></span>
+                            <span id="submit-flash" class="glm-notice" style="display: none; margin-left: 1rem;">Submitted</span>
+                        </td></tr>
+                        <tr><th style="text-align: left">{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:</th><td id="regAtt">{$rt.attendee_count}</td></tr>
+                        <tr><th style="text-align: left">Pending in Carts:</th><td id="pendAtt">{$rt.attendees_pending}</td></tr>
+                        <tr><th style="text-align: left">Available for {$terms.reg_term_registration_cap}:</th><td id="availAtt">{$rt.attendees_available}</td></tr>
+                    </table>
+                {/if}
+            {/foreach}
+            {if $regEvent.time_specific.value}
+                <h3>Edit {$terms.reg_term_attendee} availability for a specific date/time by clicking {$terms.reg_term_event} time in the calendar below.</h3>
+                <p>Availability guide: (limit)-(registered)-(pending)-(available)</p>
+            {/if}
+            <table id="glm-table-calendar" class="glm-admin-table glm-event-table">
+                <tr>
+                    <td>
+                        <center>
+                            <h3>&nbsp;
+                                <span id="initialCalendarMessage">
+                                   {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}
+                                </span>
+                            </h3>
+                        </center>
+                        <div id="eventCalendar" style="width: 95%;"></div>
+                    </td>
+                </tr>
+            </table>
+        {else}
+            <h3>Did not find selected {$terms.reg_term_event}.</h3>
+        {/if}
+    </div>
+    <div id="availabilityEditDialog" class="glm-dialog-box" title="{$terms.reg_term_registration_cap} Date/Time Edit">
+        <table>
+            <tr><th id="availabilityTitle" colspan="2"><!-- item date / time goes here --></th></tr>
+            <tr><th style="text-align: left">Active:</th><td><input id="dialogRegActive" type="checkbox" value=""></td></tr>
+            <tr id="dialogAllDayLine"><th style="text-align: left">All Day:</th><td><input id="dialogTimeAllDay" type="checkbox" value=""></td></tr>
+            {if $regEvent.time_specific.value}
+                <tr id="dialogTrackLine"><th style="text-align: left">Track {$terms.reg_term_attendee_plur_cap}:</th><td><input id="dialogAttendees" type="checkbox" value=""></td></tr>
+            {/if}
+            <tr id="dialogStartTimeLine"><th style="text-align: left" class="glm-required">Start Time:</th><td><input id="dialogStartTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
+            <tr id="dialogEndTimeLine"><th style="text-align: left" class="glm-required">End Time:</th><td><input id="dialogEndTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
+            {if $regEvent.time_specific.value}
+                <tr><th style="text-align: left" class="glm-required">Maximum {$terms.reg_term_attendee_plur_cap}:</th><td><input class="glm-form-text-input-veryshort availabilityInput" type="text" id="dialogMaxAtt" value=""> (0 = Unlimited)</td></tr>
+                <tr id="dialogRegLine"><th style="text-align: left">{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:</th><td id="dialogRegAtt"></td></tr>
+                <tr id="dialogPendLine"><th style="text-align: left">Pending in Carts:</th><td id="dialogPendAtt"></td></tr>
+                <tr id="dialogAvailLine"><th style="text-align: left">Available for {$terms.reg_term_registration_cap}:</th><td><span id="dialogAvailAtt"></span> (0 = Unlimited)</td></tr>
+            {else}
+                <tr><th style="text-align: left" colspan="2">Use form above calendar to adjust {$terms.reg_term_attendee} availability.</td></tr>
+            {/if}
+            <tr><td style="text-align: right">
+                <div id="dialogAvailSubmit" class="button-primary" data-timeid="">Update</div>
+            </td></tr>
+        </table>
+    </div>
+
 {else}
-    <h3>Did not find selected {$terms.reg_term_event}.</h3>
+    <h3>{$terms.reg_term_registration_cap} {$terms.reg_term_event_cap} not found!</h3>
 {/if}
-</div>
-
-
-<div class="glm-admin-table-inner glm-admin-table">
-  {if $haveRegEvent}
-    <p><h3>Dates and Availability</h3></p>
-      {foreach $regEvent.reg_time as $rt}
-      {if !$regEvent.time_specific.value && $rt.non_time_specific.value}
-    <table class="reg-non-time-specific-max-form">
-        <tr><th colpsan="2" style="white-space: nowrap;"><h3>Edit {$terms.reg_term_attendee} availability here for this {$terms.reg_term_event}.</h3></th></tr>
-        <tr><th style="text-align: left">Maximum {$terms.reg_term_attendee_plur_cap} (0 for unlimited):</th><td>
-            <input class="glm-form-text-input-veryshort availabilityInput" type="text" id="maxAtt" value="{$rt.attendee_max}">
-            <div id="availSubmit" class="button-primary" data-timeid="{$rt.id}">Update</div>
-            <span id="unlimitedEvent" class="glm-notice">&nbsp;&nbsp;<b>UNLIMTED:</b></span>
-            <span id="submit-flash" class="glm-notice" style="display: none; margin-left: 1rem;">Submitted</span>
-        </td></tr>
-        <tr><th style="text-align: left">{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:</th><td id="regAtt">{$rt.attendee_count}</td></tr>
-        <tr><th style="text-align: left">Pending in Carts:</th><td id="pendAtt">{$rt.attendees_pending}</td></tr>
-        <tr><th style="text-align: left">Available for {$terms.reg_term_registration_cap}:</th><td id="availAtt">{$rt.attendees_available}</td></tr>
-    </table>
-       {/if}
-      {/foreach}
-   {if $regEvent.time_specific.value}
-    <h3>Edit {$terms.reg_term_attendee} availability for a specific date/time by clicking {$terms.reg_term_event} time in the calendar below.</h3>
-    <p>Availability guide: (limit)-(registered)-(pending)-(available)</p>
-   {/if}
-    <table id="glm-table-calendar" class="glm-admin-table glm-event-table">
-        <tr>
-            <td>
-                <center>
-                    <h3>&nbsp;
-                        <span id="initialCalendarMessage">
-   {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}
-                        </span>
-                    </h3>
-                </center>
-                <div id="eventCalendar" style="width: 95%;"></div>
-            </td>
-        </tr>
-    </table>
-
-
-  {else}
-        <h3>Did not find selected {$terms.reg_term_event}.</h3>
-  {/if}
-</div>
-<div id="availabilityEditDialog" class="glm-dialog-box" title="{$terms.reg_term_registration_cap} Date/Time Edit">
-    <table>
-        <tr><th id="availabilityTitle" colspan="2"><!-- item date / time goes here --></th></tr>
-        <tr><th style="text-align: left">Active:</th><td><input id="dialogRegActive" type="checkbox" value=""></td></tr>
-        <tr id="dialogAllDayLine"><th style="text-align: left">All Day:</th><td><input id="dialogTimeAllDay" type="checkbox" value=""></td></tr>
-  {if $regEvent.time_specific.value}
-        <tr id="dialogTrackLine"><th style="text-align: left">Track {$terms.reg_term_attendee_plur_cap}:</th><td><input id="dialogAttendees" type="checkbox" value=""></td></tr>
-  {/if}
-        <tr id="dialogStartTimeLine"><th style="text-align: left" class="glm-required">Start Time:</th><td><input id="dialogStartTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
-        <tr id="dialogEndTimeLine"><th style="text-align: left" class="glm-required">End Time:</th><td><input id="dialogEndTime" class="glm-form-text-input-short time-input not-all-day" type="text" value=""></td></tr>
-  {if $regEvent.time_specific.value}
-        <tr><th style="text-align: left" class="glm-required">Maximum {$terms.reg_term_attendee_plur_cap}:</th><td><input class="glm-form-text-input-veryshort availabilityInput" type="text" id="dialogMaxAtt" value=""> (0 = Unlimited)</td></tr>
-        <tr id="dialogRegLine"><th style="text-align: left">{$terms.reg_term_registered_cap} {$terms.reg_term_attendee_plur_cap}:</th><td id="dialogRegAtt"></td></tr>
-        <tr id="dialogPendLine"><th style="text-align: left">Pending in Carts:</th><td id="dialogPendAtt"></td></tr>
-        <tr id="dialogAvailLine"><th style="text-align: left">Available for {$terms.reg_term_registration_cap}:</th><td><span id="dialogAvailAtt"></span> (0 = Unlimited)</td></tr>
-  {else}
-        <tr><th style="text-align: left" colspan="2">Use form above calendar to adjust {$terms.reg_term_attendee} availability.</td></tr>
-  {/if}
-        <tr><td style="text-align: right">
-            <div id="dialogAvailSubmit" class="button-primary" data-timeid="">Update</div>
-        </td></tr>
-    </table>
-</div>
 
 </div>
     <script type="text/javascript">