'use' => 'lgneud'
),
+ // Account E-Mail
+ 'email' => array (
+ 'field' => 'account',
+ 'as' => 'email',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account',
+ 'p_field' => 'email',
+ 'p_static' => true,
+ 'use' => 'lg'
+ ),
+
// Pointer to reg_event entry
'reg_event' => array (
'field' => 'reg_event',
// If doing the following actions
if (in_array($action, array('l','g'))) {
- // Get the registration request status name
- $r['request_status_name'] = $this->config['submission_status'][$r['request_status']];
+ if (isset($this->fields['request_status'])) {
- // Add a reformatted date/time
- $r['event_time_reformatted'] = '';
- $t = strtotime($r['event_time']);
- if ($t > 0) {
- $r['event_time_reformatted'] = date('m/d/Y h:i A', strtotime($r['event_time']));
+ // Get the registration request status name
+ $r['request_status_name'] = $this->config['submission_status'][$r['request_status']];
+
+ }
+
+ if (isset($this->fields['event_time'])) {
+
+ // Add a reformatted date/time
+ $r['event_time_reformatted'] = '';
+ $t = strtotime($r['event_time']);
+ if ($t > 0) {
+ $r['event_time_reformatted'] = date('m/d/Y h:i A', strtotime($r['event_time']));
+ }
}
}
// Get certain registrant data
$savedFields = $this->fields;
- $this->fields = array();
- $this->fields['id'] = $savedFields['id'];
- $this->fields['not_attending'] = $savedFields['not_attending'];
- $this->fields['reg_time'] = $savedFields['reg_time'];
- $this->fields['reg_time_avail'] = array (
- 'field' => 'reg_time',
- 'as' => 'reg_time_avail',
- 'type' => 'pointer',
- 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_time',
- 'p_field' => 'attendees_available',
- 'p_static' => true,
- 'use' => 'g'
- );
+ $this->fields = array(
+ 'id' => $savedFields['id'],
+ 'account' => $savedFields['account'],
+ 'email' => $savedFields['email'],
+ 'not_attending' => $savedFields['not_attending'],
+ 'reg_time' => $savedFields['reg_time'],
+ 'reg_time_avail' => array (
+ 'field' => 'reg_time',
+ 'as' => 'reg_time_avail',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_time',
+ 'p_field' => 'attendees_available',
+ 'p_static' => true,
+ 'use' => 'g'
+ ),
+ );
$registrantData = $this->getEntry($modelData['reg_id']);
$this->fields = $savedFields;
}
}
+ // Update registrant entry
$this->wpdb->update(
GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_request_registrant',
array(
array( '%d' )
);
+ // If the submitted E-Mail is different than what's stored in the account
+ if (trim($registrantData['email']) != trim($modelData['email'])) {
+
+ // Update the E-Mail address in the account and reset validated flag
+ $this->wpdb->update(
+ GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account',
+ array(
+ 'email' => $modelData['email'],
+ 'validated' => false
+ ),
+ array( 'id' => $registrantData['account'] ),
+ array(
+ '%s',
+ '%d'
+ ),
+ array( '%d' )
+ );
+
+ }
+
$registrant = array(
'id' => $modelData['reg_id'],
+ 'email' => $modelData['email'],
'fname' => $modelData['fname'],
'lname' => $modelData['lname'],
'notAttending' => $notAttending,
If checked this inventory will be returned to permit another {$terms.reg_term_attendee} to {$terms.reg_term_register}.
If you un-check this it will check to see if inventory is available and if not will not change this to {$terms.reg_term_attending}.
</p>
+ <label>E-Mail Address</label>
+ <input class="glm-form-text-input-medium" type="text" name="email" value="{$r.account.email}"><br>
<label>First Name</label>
- <input class="glm-form-text-input-medium" type="text" name="fname" value="{$r.fname}">
+ <input class="glm-form-text-input-medium" type="text" name="fname" value="{$r.fname}"><br>
<label>Last Name</label>
<input class="glm-form-text-input-medium" type="text" name="lname" value="{$r.lname}">
</div>
var notAttending = $('#glmRegNotAttending_' + refId).prop('checked');
+ var accountEmail = $('#glm-attendee-' + refId + ' input[name=email]').val().trim();
var accountFname = $('#glm-attendee-' + refId + ' input[name=fname]').val().trim();
var accountLname = $('#glm-attendee-' + refId + ' input[name=lname]').val().trim();
collection: 'attendee',
option: 'update',
reg_id: refId,
+ email: accountEmail,
fname: accountFname,
lname: accountLname,
not_attending: notAttending,
$('#glmRegAttedeeLine_' + refId).removeClass('glm-reg-gray');
$('#glmRegNotAttendingText_' + refId).html('');
}
+ $('#glm-attendee-form-' + account.id + ' input[name=email]').val( account.email );
$('#glm-attendee-form-' + account.id + ' input[name=fname]').val( account.fname );
$('#glm-attendee-form-' + account.id + ' input[name=lname]').val( account.lname );
$('.glm-edit-form-' + $(this).data('registrant')).hide();
<!-- START EVENT REG TIMES -->
<div class="glm-reg-list-details-wrapper">
<div class="glm-row">
- <!-- <div class="glm-columns glm-large-2 glm-small-12 glm-reg-list-label">
- <strong> Dates/Times: </strong>
- </div>-->
-
+
<div class="glm-columns glm-small-12 glm-reg-list-details">
- {$lastDate = ''}
- {foreach $event.recurrences as $rec}
-
- {$eDate = $rec.from_date.timestamp|date_format:"%B %e"}
-
- {if $eDate != $lastDate}
- {$lastDate = $eDate}
-
- <div class="glm-reg-list-dates glm-reg-list-details">
-<!-- {if $event.recurrences.0.recurring.value == 1} Occurring {/if}-->
-
- {if $rec.from_date.timestamp|date_format:"%Y" != $rec.to_date.timestamp|date_format:"%Y"}
- {$eDate}, {$rec.from_date.timestamp|date_format:"%Y"}
- {else}
- {$eDate}
- {/if}
-
- {if $rec.from_date.date != $rec.to_date.date}
- {if $rec.from_date.timestamp|date_format:"%Y" != $rec.to_date.timestamp|date_format:"%Y"}
- - {$rec.to_date.timestamp|date_format:"%B %e, %Y"}
- {else}
- - {$rec.to_date.timestamp|date_format:"%B %e, %Y"}
- {/if}
- {else if $rec.specific_dates}
- {if $rec.from_date.timestamp|date_format:"%Y" != $rec.specific_dates|@end|date_format:"%Y"}
- - {$rec.specific_dates|@end|date_format:"%B %e, %Y"},
- {else}
- - {$rec.specific_dates|@end|date_format:"%B %e, %Y"}
- {/if}
-
- {/if}
-<!--
- {if $rec.day_of_week.names|@count < 7 && $rec.day_of_week.names|@count > 0 }
- on
- {foreach $rec.day_of_week.names as $day}
- {if $day == "Thursday"}
- <span> {$day|substr:0:4} </span>
- {else}
- <span> {$day|substr:0:3} </span>
- {/if}
- {/foreach}
-
- {/if}-->
- </div>
- {/if}
- {if isset($rec.all_day) && !$rec.all_day.value}
- <div class="glm-reg-list-times glm-reg-list-details">
- {if $rec.start_time.time == $rec.end_time.time || $rec.start_time_only.value}
- {$rec.start_time.time|strtotime|date_format:"%l:%M %P"}
- {else}
- {$rec.start_time.time|strtotime|date_format:"%l:%M %P"} - {$rec.end_time.time|strtotime|date_format:"%l:%M %P"}
- {/if}
- {if $rec.name && $rec.name != 'Imported' && $rec.name != 'Imported Event Schedule' }
- {$rec.name}
- {/if}
- </div>
- {else}
-
- {if $rec.name && $rec.name != 'Imported' && $rec.name != 'Imported Event Schedule' }
- {$rec.name}
- {/if}
-
- {/if}
- {/foreach}
-
- {if $event.eventCost}
+ {* If there's a starting timestamp for this event. Why wouldn't there be? *}
+ {if $event.first_datetime.timestamp}
+
+ <div class="small-12 columns glm-reg-event-profile-details glm-reg-date glm-reg-has-icon"> {$event.first_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
+ <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$event.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
+
+ {* If the first and last timestamp are NOT the same, then there's other dates and times Should be selectable below. *}
+ {if $event.first_date.timestamp != $regEvent.last_date.timestamp}
+ <div class="small-12 columns glm-reg-event-profile-details"> (see other dates and times below)</div>
+ {/if}
+
+ {/if}
+
+
+ {if $event.eventCost}
<div class="glm-reg-list-cost glm-small-12 glm-column glm-reg-list-details">
{$event.eventCost}
</div>
- {/if}
- {if $event.hide_address.name == 'No'}
- {if !$event.use_member_location.value && isset($event.locations) && ($event.locations.name || $event.locations.address)}
+ {/if}
+ {if $event.hide_address.name == 'No'}
+ {if !$event.use_member_location.value && isset($event.locations) && ($event.locations.name || $event.locations.address)}
<div class="glm-columns glm-small-12 glm-reg-list-details glm-reg-list-location">
- {if $event.locations.name}{$event.locations.name}<br>{/if}
- </div>
- {/if}
- {/if}
+ {if $event.locations.name}{$event.locations.name}<br>{/if}
+ </div>
+ {/if}
+ {/if}
</div>
</div>
<!-- EVENT REG TIMES END -->