Fixed various undefined references and other misc warnings.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 26 Jan 2018 22:05:06 +0000 (17:05 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 26 Jan 2018 22:05:06 +0000 (17:05 -0500)
models/admin/ajax/updateAvailability.php
models/admin/registrations/events_notifications.php
views/admin/registrations/eventEditNotification.html
views/admin/registrations/eventNotifications.html
views/admin/registrations/eventPaymentCodes.html
views/admin/registrations/eventRegistrants.html

index 037aae4..2f1c672 100644 (file)
 
         // re-calculate the total
         $avail = $max - $regTime['attendee_count'] - $regTime['attendees_pending'];
-trigger_error('start = '.$startTime,E_USER_NOTICE);
-trigger_error('end = '.$endTime,E_USER_NOTICE);
-trigger_error(print_r($_REQUEST,1),E_USER_NOTICE);
 
         // Try to update the reg_time entry
         $this->wpdb->update(
index 847c001..a9bfa6c 100644 (file)
@@ -19,18 +19,25 @@ $Notifications = new GlmDataRegistrationsRegNotification($this->wpdb, $this->con
 $regEvent = $this->getEntry($regEventID);
 // echo '<pre>$regEvent: ' . print_r( $regEvent, true ) . '</pre>';
 
+// Delete
 if ( isset( $_REQUEST['delete'] ) && filter_var( $_REQUEST['delete'], FILTER_VALIDATE_BOOLEAN ) ) {
     $regNotifications = $Notifications->getList("T.reg_event = $regEventID", 'notification_days');
     $view = 'eventNotifications';
+
+// Edit
 } else if ( isset( $_REQUEST['id'] ) && $notice_id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ) ) {
     $regNotifications = $Notifications->editEntry( $notice_id );
     $view = 'eventEditNotification';
-    $days = $regNotifications['notification_days'];
+    $days = $regNotifications['fieldData']['notification_days'];
     $when = ( $days > 0 ) ? 'after' : 'before';
+
+// New
 } else if ( isset( $_REQUEST['new'] ) && filter_var( $_REQUEST['new'], FILTER_VALIDATE_BOOLEAN ) ) {
     $regNotifications = $Notifications->newEntry();
     $view = 'eventEditNotification';
     $newEntry = true;
+
+// List
 } else {
     $regNotifications = $Notifications->getList("T.reg_event = $regEventID", 'notification_days');
     $view = 'eventNotifications';
index 5d254ef..632e67e 100644 (file)
@@ -21,7 +21,7 @@
     <input type="hidden" name="regEventID" value="{$regEvent.id}">
     <div id="notificationsContainer">
         <div class="glm-row">&nbsp;</div>
-        <div id="notificationContainer_{$regNotifications.fieldData.id}" class="glm-row">
+        <div {if !$newEntry}id="notificationContainer_{$regNotifications.fieldData.id}"{/if} class="glm-row">
             <div class="glm-small-12 glm-large-3 glm-column">
                 <div class="glm-row">
                     <div class="glm-small-12 glm-column">
index 496afa9..90d81f8 100644 (file)
@@ -27,7 +27,7 @@
     <tbody>
         {if $regNotifications}
             {foreach $regNotifications as $n}
-                <tr class="{if $r@iteration is div by 2}alternate{/if}">
+                <tr class="{if $n@iteration is div by 2}alternate{/if}">
                     <td>{$n.id}</td>
                     <td>
                         <a
index 945d23c..973d1e3 100644 (file)
@@ -7,7 +7,7 @@
 {if $option == 'globalCodes'}
     <h1>Global {$terms.reg_term_payment_code_plur_cap}</h1>
 {else}
-    <h1>{$terms.reg_term_event_cap} {$terms.reg_term_payment_code_plur_Cap}</h1>
+    <h1>{$terms.reg_term_event_cap} {$terms.reg_term_payment_code_plur_cap}</h1>
 {/if}
 </div>
 <div>&nbsp;</div>
index fafe76b..a28149c 100644 (file)
@@ -39,7 +39,7 @@
 
 <div class="glm-admin-table-inner glm-admin-table">
 
-    <p><b>Total found:</b> {$registrantCount}&nbsp;&nbsp;</p>
+    <p><b>Total found:</b> {if $haveRegistrants}{$registrantCount}{else}(none){/if}&nbsp;&nbsp;</p>
 
     {if $paging}
     <form method="post" action="{$thisUrl}?page={$thisPage}">