// 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(
$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';
<input type="hidden" name="regEventID" value="{$regEvent.id}">
<div id="notificationsContainer">
<div class="glm-row"> </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">
<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
{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> </div>
<div class="glm-admin-table-inner glm-admin-table">
- <p><b>Total found:</b> {$registrantCount} </p>
+ <p><b>Total found:</b> {if $haveRegistrants}{$registrantCount}{else}(none){/if} </p>
{if $paging}
<form method="post" action="{$thisUrl}?page={$thisPage}">