'default' => 0,
),
+ // Billing fields to be used at checkout
+ 'reg_bill_info_requested' => array (
+ 'field' => 'reg_bill_info_requested',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+/*
// Billing Info used for No Charge - Bitmap
'reg_bill_info_req_no_charge' => array (
'field' => 'reg_bill_info_req_no_charge',
'use' => 'a',
'default' => 0
),
-
+*/
// Registration Request Hold Days
'reg_request_hold_days' => array (
'field' => 'reg_request_hold_days',
'type' => 'checkbox',
'use' => 'a',
'default' => 0
- )
+ ),
+ // Show event select by code form on list poage
+ 'reg_show_select_by_code' => array (
+ 'field' => 'reg_show_select_by_code',
+ 'type' => 'checkbox',
+ 'use' => 'a',
+ 'default' => 0
+ )
);
'field' => 'event',
'type' => 'integer',
'required' => true,
- 'use' => 'lgned'
+ 'use' => 'a'
),
// Event Name
'field' => 'event_code',
'type' => 'text',
'required' => true,
+ 'unique' => true,
'use' => 'a'
),
'time_specific' => array (
'field' => 'time_specific',
'type' => 'checkbox',
- 'use' => 'a',
- 'default' => 1
+ 'required' => true,
+ 'default' => null,
+ 'use' => 'a'
+ ),
+
+ // Flag to indicate that this event should not be included in registration event listings
+ 'not_included_in_lists' => array (
+ 'field' => 'not_included_in_lists',
+ 'type' => 'checkbox',
+ 'default' => false,
+ 'use' => 'a'
),
// Registration requires attendees - Otherwise the person submitting the registration is the registrant
// Name of a downloadable file
'reg_file' => array (
'field' => 'reg_file',
- 'type' => 'text',
+ 'type' => 'file',
'required' => false,
'use' => 'a'
),
'use' => 'a'
),
+ /*
+ * The following fields are used for stand-alone registrations only
+ */
+
+ // Event Image
+ 'image' => array(
+ 'field' => 'image',
+ 'type' => 'image',
+ 'use' => 'a'
+ ),
+
+ // Cost Description
+ 'cost' => array (
+ 'field' => 'cost',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Hide Location Address
+ 'hide_address' => array (
+ 'field' => 'hide_address',
+ 'type' => 'checkbox',
+ 'use' => 'a'
+ ),
+
+ // Use Member Location rather than location table
+ 'use_member_location' => array (
+ 'field' => 'use_member_location',
+ 'type' => 'checkbox',
+ 'use' => 'a'
+ ),
+
+ // Member for use member location
+ 'member' => array(
+ 'field' => 'member',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members',
+ 'p_field' => 'name',
+ 'p_orderby' => 'name',
+ 'p_blank' => true,
+ 'force_list' => true,
+ 'use' => 'a'
+ ),
+
+ // Location Name
+ 'location_name' => array (
+ 'field' => 'location_name',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Location Address
+ 'address' => array (
+ 'field' => 'address',
+ 'type' => 'text',
+ 'required' => false,
+ 'use' => 'a'
+ ),
+
+ // City - References main plugin cities table
+ 'city' => array (
+ 'field' => 'city',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'cities',
+ 'p_field' => 'name',
+ 'p_orderby' => 'name',
+ 'p_blank' => false,
+ 'force_list' => true,
+ 'use' => 'a'
+ ),
+
+ // State
+ 'state' => array (
+ 'field' => 'state',
+ 'type' => 'list',
+ 'list' => $this->config['states'],
+ 'default' => 'MI',
+ 'force_list' => true,
+ 'use' => 'a'
+ ),
+
+ // ZIP / Postal Code
+ 'zip' => array (
+ 'field' => 'zip',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Country
+ 'country' => array (
+ 'field' => 'country',
+ 'type' => 'list',
+ 'list' => $this->config['countries'],
+ 'default' => 'US',
+ 'force_list' => true,
+ 'use' => 'a'
+ ),
+
+ // Latitude
+ 'lat' => array(
+ 'field' => 'lat',
+ 'type' => 'float',
+ 'default' => $this->config['settings']['maps_default_lat'],
+ 'use' => 'a'
+ ),
+
+ // Longitude
+ 'lon' => array(
+ 'field' => 'lon',
+ 'type' => 'float',
+ 'default' => $this->config['settings']['maps_default_lon'],
+ 'use' => 'a'
+ ),
+
+ // Region - References main plugin regions table
+ 'region' => array (
+ 'field' => 'region',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'regions',
+ 'p_field' => 'name',
+ 'p_orderby' => 'name',
+ 'p_blank' => false,
+ 'force_list' => true,
+ 'use' => 'a'
+ ),
+
+ // Phone Number
+ 'phone' => array (
+ 'field' => 'phone',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // URL
+ 'url' => array (
+ 'field' => 'url',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // E-Mail
+ 'email' => array (
+ 'field' => 'email',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Not including contact addon ID yet
+
+ // Contact First Name
+ 'contact_fname' => array (
+ 'field' => 'contact_fname',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Contact Last Name
+ 'contact_lname' => array (
+ 'field' => 'contact_lname',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Contact phone
+ 'contact_phone' => array (
+ 'field' => 'contact_phone',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Contact E-Mail Address
+ 'contact_email' => array (
+ 'field' => 'contact_email',
+ 'type' => 'text',
+ 'use' => 'a'
+ )
+
);
}
// If doing the following actions
if (in_array($action, array('l','g'))) {
- // Use hook to Events to get current data for this event
- $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']);
-
- // echo '<pre>$eventData: ' . print_r( $eventData, true ) . '</pre>';
-
- // Add to the registration event array
- $result_data['intro'] = $eventData['intro'];
- $result_data['eventDescr'] = $eventData['descr'];
- $result_data['image'] = $eventData['image'];
- $result_data['contact_name'] = $eventData['contact_name'];
- $result_data['contact_email'] = $eventData['contact_email'];
- $result_data['contact_phone'] = $eventData['contact_phone'];
- $result_data['url'] = $eventData['url'];
- $result_data['eventCost'] = $eventData['cost'];
- $result_data['hide_address'] = $eventData['hide_address'];
- $result_data['use_member_location'] = $eventData['use_member_location'];
-
- // Check for times data and use that.
- if ( isset( $eventData['times'] ) && $eventData['times'] ) {
- $result_data['times'] = $eventData['times'];
- }
- if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) {
- $result_data['starting_date'] = $eventData['starting_date'];
- }
- if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) {
- $result_data['ending_date'] = $eventData['ending_date'];
- }
- if ( isset( $eventData['locations'] ) && $eventData['locations'] ) {
- $result_data['locations'] = $eventData['locations'];
- }
- if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) {
- $result_data['other_ref_dest'] = $eventData['other_ref_dest'];
- }
- if ( isset( $eventData['member'] ) && $eventData['member'] ) {
- $result_data['member'] = $eventData['member'];
- }
- if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) {
- $result_data['recurrences'] = $eventData['recurrences'];
- }
- if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) {
- $result_data['all_day'] = $eventData['all_day'];
+ // If this is not a stand-alone registrations event, get the event data
+ if ($result_data['event'] != 0) {
+
+ // Use hook to Events to get current data for this event
+ $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']);
+
+ // echo '<pre>$eventData: ' . print_r( $eventData, true ) . '</pre>';
+
+ // Add to the registration event array
+ $result_data['intro'] = $eventData['intro'];
+ $result_data['eventDescr'] = $eventData['descr'];
+ $result_data['image'] = $eventData['image'];
+ $result_data['contact_name'] = $eventData['contact_name'];
+ $result_data['contact_email'] = $eventData['contact_email'];
+ $result_data['contact_phone'] = $eventData['contact_phone'];
+ $result_data['url'] = $eventData['url'];
+ $result_data['eventCost'] = $eventData['cost'];
+ $result_data['hide_address'] = $eventData['hide_address'];
+ $result_data['use_member_location'] = $eventData['use_member_location'];
+
+ // Check for times data and use that.
+ if ( isset( $eventData['times'] ) && $eventData['times'] ) {
+ $result_data['times'] = $eventData['times'];
+ }
+ if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) {
+ $result_data['starting_date'] = $eventData['starting_date'];
+ }
+ if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) {
+ $result_data['ending_date'] = $eventData['ending_date'];
+ }
+ if ( isset( $eventData['locations'] ) && $eventData['locations'] ) {
+ $result_data['locations'] = $eventData['locations'];
+ }
+ if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) {
+ $result_data['other_ref_dest'] = $eventData['other_ref_dest'];
+ }
+ if ( isset( $eventData['member'] ) && $eventData['member'] ) {
+ $result_data['member'] = $eventData['member'];
+ }
+ if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) {
+ $result_data['recurrences'] = $eventData['recurrences'];
+ }
+ if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) {
+ $result_data['all_day'] = $eventData['all_day'];
+ }
+
+ // Stand-Alone event, so assemble certain data as if it came from an event listing
+ } else {
+
+ // Check first if the current request included the location data
+ if (isset($result_data['cost'])) {
+ $result_data['eventCost'] = $result_data['cost'];
+ $result_data['locations'] = array(
+ 'name' => $result_data['location_name'],
+ 'address' => $result_data['address'],
+ 'city' => $result_data['city'],
+ 'state' => $result_data['state'],
+ 'zip' => $result_data['zip'],
+ 'country' => $result_data['country'],
+ 'lat' => $result_data['lat'],
+ 'lon' => $result_data['lon'],
+ 'region' => $result_data['region'],
+ 'phone' => $result_data['phone'],
+ 'url' => $result_data['url'],
+ 'email' => $result_data['email'],
+ 'contact_name' => $result_data['contact_fname'].' '.$result_data['contact_lname'],
+ 'contact_phone' => $result_data['contact_phone'],
+ 'contact_email' => $result_data['contact_email']
+ );
+ }
}
}
-
}
// If we're asked to get registrant counts
$savedFields = $this->fields;
$this->fields = array(
- 'id' => $savedFields['id'],
- 'event_name' => $savedFields['event_name'],
- 'notify_email' => $savedFields['notify_email'],
- 'descr' => $savedFields['descr'],
- 'first_datetime' => $savedFields['first_datetime'],
- 'last_datetime' => $savedFields['last_datetime']
+ 'id' => $savedFields['id'],
+ 'event_name' => $savedFields['event_name'],
+ 'notify_email' => $savedFields['notify_email'],
+ 'descr' => $savedFields['descr'],
+ 'first_datetime' => $savedFields['first_datetime'],
+ 'last_datetime' => $savedFields['last_datetime']
);
$r = $this->getEntry($eventId);
if ($haveTimeEntry) {
$firstDateTime = array('datetime' => date('m/d/Y h:i A', $firstTime), 'timestamp' => $firstTime, 'mysql_datetime' => date('Y-m-d H:i:s', $firstTime));
$lastDateTime = array('datetime' => date('m/d/Y h:i A', $lastTime), 'timestamp' => $lastTime, 'mysql_datetime' => date('Y-m-d H:i:s', $lastTime));
+
+ // Check if we need to update first and/or last event times in database - if so, do that
+ if ($this->regEventData['first_datetime']['timestamp'] != $firstTime ||
+ $this->regEventData['last_datetime']['timestamp'] != $lastTime ) {
+
+ // Update the regEventData first and last times
+ $this->regEventData['first_datetime'] = $firstDateTime;
+ $this->regEventData['last_datetime'] = $lastDateTime;
+
+ // Update the database
+ $this->wpdb->update(
+ GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event',
+ array(
+ 'first_datetime' => $firstDateTime['mysql_datetime'],
+ 'last_datetime' => $lastDateTime['mysql_datetime'],
+ ),
+ array( 'id' => $this->regEventData['id'] ),
+ array(
+ '%s',
+ '%s'
+ )
+ );
+ }
+
+
+
} else {
$firstDateTime = 'NULL';
$lastDateTime = 'NULL';
}
- // Check if we need to update first and/or last event times in database - if so, do that
- if ($this->regEventData['first_datetime']['timestamp'] != $firstTime ||
- $this->regEventData['last_datetime']['timestamp'] != $lastTime
- ) {
-
- // Update the regEventData first and last times
- $this->regEventData['first_datetime'] = $firstDateTime;
- $this->regEventData['last_datetime'] = $lastDateTime;
-
- // Update the database
- $this->wpdb->update(
- GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event',
- array(
- 'first_datetime' => $firstDateTime['mysql_datetime'],
- 'last_datetime' => $lastDateTime['mysql_datetime'],
- ),
- array( 'id' => $this->regEventData['id'] ),
- array(
- '%s',
- '%s'
- )
- );
- }
// If this is a non-time-specific event
if (!$this->regEventData['time_specific']) {
return false;
}
$registrants = $listResult['list'];
-
$registrantCount = $this->getStats(str_replace('T.', '', $whereEvent));
// Make sure we received registrants
// Try to get any per
}
+
$listResult['list'] = $registrants;
$listResult['totalCount'] = $registrantCount;
'use' => 'a'
),
+ // Term for rate
+ 'reg_term_rate' => array (
+ 'field' => 'reg_term_rate',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for Rate (cap)
+ 'reg_term_rate_cap' => array (
+ 'field' => 'reg_term_rate_cap',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for rates (plur)
+ 'reg_term_rate_plur' => array (
+ 'field' => 'reg_term_rate_plur',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for Rates (plur, cap)
+ 'reg_term_rate_plur_cap' => array (
+ 'field' => 'reg_term_rate_plur_cap',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
// Term for payment code
'reg_term_payment_code' => array (
'field' => 'reg_term_payment_code',
'SubmittedByOrganization' => $account['org'],
'BillingFirstname' => $this->cart['request']['bill_fname'],
'BillingLastname' => $this->cart['request']['bill_lname'],
+ 'BillingOrg' => $this->cart['request']['bill_org'],
'BillingAddrLine1' => $this->cart['request']['bill_addr1'],
'BillingAddrLine2' => $this->cart['request']['bill_addr2'],
'BillingCity' => $this->cart['request']['bill_city'],
[common]
-cart_id_check_secret = 'GlMREGcartSecret4ID'
+cart_id_check_secret = 'GlMREGcartSecret4ID'
;
; Show Rate type (how it rates will be displayed in lists) - Use as List
billing_field[11] = 'Phone'
billing_field[12] = 'FAX'
-billing_field_numb['First Name'] = 1
-billing_field_numb['Last Name'] = 2
+billing_field_numb['FirstName'] = 1
+billing_field_numb['LastName'] = 2
billing_field_numb['Organization'] = 3
-billing_field_numb['Title/Department'] = 4
-billing_field_numb['Address Line 1'] = 5
-billing_field_numb['Address Line 2'] = 6
+billing_field_numb['TitleDepartment'] = 4
+billing_field_numb['AddressLine1'] = 5
+billing_field_numb['AddressLine2'] = 6
billing_field_numb['City'] = 7
billing_field_numb['State'] = 8
-billing_field_numb['ZIP/Postal Code'] = 9
+billing_field_numb['ZIPPostalCode'] = 9
billing_field_numb['Country'] = 10
billing_field_numb['Phone'] = 11
billing_field_numb['FAX'] = 12
;
submission_status[0] = 'In Cart'
submission_status[10] = 'Complete'
-; submission_status[20] = 'Unpaid'
+; submission_status[20] = 'Unpaid'
submission_status[30] = 'Card Pending'
-; submission_status[40] = 'Card Declined'
+; submission_status[40] = 'Card Declined'
submission_status[50] = 'Payment Pending'
submission_status[60] = 'Pay On Arrival'
submission_status[70] = 'Administrative Hold'
}
.reg-level-container {
margin-bottom: 1em;
- background-color: white;
- padding: .25rem;
- border: 1px solid black;
+ background-color: white;
+ padding: .25rem;
+ border: 1px solid black;
cursor: pointer;
}
.reg-level-display-container {
}
.reg-level-edit-container {
display: none;
- border: 1px solid black;
- padding: 1em;
+ border: 1px solid black;
+ padding: 1em;
background-color: #f8ffff;
margin: 1em;
}
margin-bottom: .5em;
}
.reg-rate-edit-container {
- display: none;
- border: 1px solid black;
- padding: 1em;
+ display: none;
+ border: 1px solid black;
+ padding: 1em;
background-color: #f8ffff;
margin: 1em;
}
font-size: 0.875rem;
}
+/* Admin Event Dashboard page */
+.reg-non-time-specific-max-form {
+ border: 1px solid #bbb;
+ padding: 5px;
+ margin: 1em 0 1em 0;
+}
+
+/* Admin Event Edit page */
+.reg-event-edit-section {
+ text-align: left;
+ font-size: 1.2em;
+ padding: 1em 0 1em 0;
+}
/* Event Registration Edit Page */
.glm-reg-label{
padding: 2rem 0 1rem 0;
}
.glm-reg-message-title {
- padding: 1rem 0 1rem 0;
+ padding: 1rem 0 1rem 0;
}
.glm-reg-message-prompt {
text-align: right !important;
- padding-top: 3rem;
+ padding-top: 3rem;
}
.glm-reg-message-prompt-email-text {
text-align: right !important;
- padding-top: 3rem;
+ padding-top: 3rem;
}
.glm-reg-message-body {
}
.glm-reg-cart-item, .glm-reg-cart-registrant{
/* padding: 0;*/
}
-
+
}
/*{{{ Media Queries */
}
@media (max-width: 1024px) {
-
+
}
@media(min-width: 1024px){
.glm-reg-cart-summary-custom-fields{
.glm-reg-cart-custom-charge{
margin-top: -5px;
}
-}
\ No newline at end of file
+}
+
+++ /dev/null
-<?php
-
-
-// Sample event setup data - Describes registration for an event
-// This data must be stored into the data tables and pulled out using data abstract to be useable.
-$regEventSample = array(
-
- // reg_event base data - Base info on this registration event - from reg_event table
- 'reg_event' => array
- (
- 'id' => 1000,
- 'event' => 1,
- 'event_name' => 'GLM Sample Event',
- 'event_code' => 'glm-sample-event',
- 'notify_email' => '',
- 'admin_active' => true,
- 'active' => false,
- 'attendees' => true,
- 'attendee_max' => 50,
- 'attendee_max_per_reg' => 5,
- 'reg_hold_minutes' => 30,
- 'cart_hold_days' => 2,
- 'registration_account_options' => 7, // Guest, Saved accounts, Member Contact registrations
- 'payment_methods' => 18, // Credit Card and comp code
- 'restricted_payment_methods' => 13, // No charge, cash, check
- 'terms' => 'Sample terms and conditions',
- 'reg_file' => '',
- 'reg_file_title' => ''
- ),
-
- // reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
- 'reg_time' => array
- (
- 1 => array
- (
- 'id' => 1100,
- 'reg_event' => 1000,
- 'event_time' => false,
- 'start_datetime' => null,
- 'end_datetime' => null,
- 'all_day' => true,
- 'attendees' => true,
- 'attendee_max' => false,
- 'attendee_count' => 0,
- 'attendee_pending' => 0,
- 'attendees_available' => 50,
- 'total_base_charge' => 0,
- 'total_per_attendee' => 0,
- 'total_other' => 0,
- 'total_taxes' => 0,
- 'total_charge' => 0,
- 'total_discounts' => 0,
- 'total_payments' => 0
- )
- // Additional times registration may take place
- ),
-
- // reg_class - Type of registration for this event (one or more)
- 'reg_class' => array
- (
- 1 => array
- (
- 'id' => 1200,
- 'reg_event' => 1000,
- 'name' => 'Standard',
- 'descr' => 'Standard registration for this event. Provides all standard attendee privileges.',
- 'reg_rate_name' => 'Early Bird',
- 'reg_rate_base_price' => 100.00,
- 'reg_rate_per_reg' => 10.00,
- // 'reg_rate' => array
- // (
- // 1 => array
- // (
- // 'id' => 1300,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Early Bird',
- // 'start_days' => 60,
- // 'end_days' => 31,
- // 'base_rate' => 100.00,
- // 'per_registrant' => 10.00,
- // 'registrant_credits' => 1
- // ),
- // 2 => array
- // (
- // 'id' => 1301,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Standard Registration',
- // 'start_days' => 30,
- // 'end_days' => 11,
- // 'base_rate' => 120.00,
- // 'per_registrant' => 12.00,
- // 'registrant_credits' => 1
- // ),
- // 3 => array
- // (
- // 'id' => 1302,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Last Chance',
- // 'start_days' => 10,
- // 'end_days' => 2, // no registration after 2 days before event
- // 'base_rate' => 160.00,
- // 'per_registrant' => 16.00,
- // 'registrant_credits' => 1
- // ),
- // )
- ),
-
- 2 => array(
- 'id' => 1201,
- 'reg_event' => 1000,
- 'name' => 'Deluxe',
- 'descr' => 'Deluxe registration for this event. Provides all attendee privileges.',
- 'reg_rate_name' => 'Early Bird',
- 'reg_rate_base_price' => 100.00,
- 'reg_rate_per_reg' => 10.00,
- // 'reg_rate' => array
- // (
- // 1 => array
- // (
- // 'id' => 1300,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Early Bird',
- // 'start_days' => 60,
- // 'end_days' => 31,
- // 'base_rate' => 100.00,
- // 'per_registrant' => 10.00,
- // 'registrant_credits' => 1
- // ),
- // 2 => array
- // (
- // 'id' => 1301,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Standard Registration',
- // 'start_days' => 30,
- // 'end_days' => 11,
- // 'base_rate' => 120.00,
- // 'per_registrant' => 12.00,
- // 'registrant_credits' => 1
- // ),
- // 3 => array
- // (
- // 'id' => 1302,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Last Chance',
- // 'start_days' => 10,
- // 'end_days' => 2, // no registration after 2 days before event
- // 'base_rate' => 160.00,
- // 'per_registrant' => 16.00,
- // 'registrant_credits' => 1
- // ),
- // )
- ),
-
- // reg_rates - Date range / rate for a reg class (one or more)
-
- )
-
-);
-
-
-//echo "<pre>".print_r($regEventSample,1)."</pre>";
-
-/* Sample actual data for reference for a complete event (this one doesn't include classes and times yet)
-
-Array
-(
- [id] => 61
- [event] => 2
- [event_name] => Active Time
- [event_code] => active-time
- [notify_email] => cscott@gaslightmedia.com
- [admin_active] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [active] => Array
- (
- [list] =>
- [value] => 1
- [name] => Yes
- )
-
- [time_specific] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [attendees] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [attendee_max] => 0
- [attendee_max_per_reg] => 0
- [reg_hold_minutes] => 60
- [cart_hold_days] => 10
- [registration_account_options] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => Guest Registration
- [nameEsc] => Guest Registration
- [value] => 1
- [default] => 1
- )
-
- [2] => Array
- (
- [name] => Saved Registration Accounts
- [nameEsc] => Saved Registration Accounts
- [value] => 2
- [default] => 1
- )
-
- [3] => Array
- (
- [name] => Member Contact Registrations
- [nameEsc] => Member Contact Registrations
- [value] => 3
- [default] => 1
- )
-
- )
-
- [value] => 14
- [names] => Array
- (
- [1] => Guest Registration
- [2] => Saved Registration Accounts
- [3] => Member Contact Registrations
- )
-
- )
-
- [payment_methods] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => No Charge
- [nameEsc] => No Charge
- [value] => 1
- [default] =>
- )
-
- [2] => Array
- (
- [name] => Comp Code
- [nameEsc] => Comp Code
- [value] => 2
- [default] => 1
- )
-
- [3] => Array
- (
- [name] => Cash
- [nameEsc] => Cash
- [value] => 3
- [default] =>
- )
-
- [4] => Array
- (
- [name] => Check
- [nameEsc] => Check
- [value] => 4
- [default] =>
- )
-
- [5] => Array
- (
- [name] => Credit Card
- [nameEsc] => Credit Card
- [value] => 5
- [default] => 1
- )
-
- [6] => Array
- (
- [name] => Call from Merchant
- [nameEsc] => Call from Merchant
- [value] => 6
- [default] =>
- )
-
- [99] => Array
- (
- [name] => Undefined
- [nameEsc] => Undefined
- [value] => 99
- [default] =>
- )
-
- )
-
- [value] => 36
- [names] => Array
- (
- [2] => Comp Code
- [5] => Credit Card
- )
-
- )
-
- [restricted_payment_methods] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => No Charge
- [nameEsc] => No Charge
- [value] => 1
- [default] => 1
- )
-
- [2] => Array
- (
- [name] => Comp Code
- [nameEsc] => Comp Code
- [value] => 2
- [default] =>
- )
-
- [3] => Array
- (
- [name] => Cash
- [nameEsc] => Cash
- [value] => 3
- [default] => 1
- )
-
- [4] => Array
- (
- [name] => Check
- [nameEsc] => Check
- [value] => 4
- [default] => 1
- )
-
- [5] => Array
- (
- [name] => Credit Card
- [nameEsc] => Credit Card
- [value] => 5
- [default] =>
- )
-
- [6] => Array
- (
- [name] => Call from Merchant
- [nameEsc] => Call from Merchant
- [value] => 6
- [default] =>
- )
-
- [99] => Array
- (
- [name] => Undefined
- [nameEsc] => Undefined
- [value] => 99
- [default] =>
- )
-
- )
-
- [value] => 26
- [names] => Array
- (
- [1] => No Charge
- [3] => Cash
- [4] => Check
- )
-
- )
-
- [descr] => This is a description of registrations for this event. This is not the same as the event description that is stored in the Events add-on. This one is specific to registrations for this event.
- [terms] => asdasdasdasd
- [reg_file] =>
- [reg_file_title] => asdasdasd
- [form_revision] => 0
- [notes] => asdasdaaddadadad
- [reg_time] =>
- [reg_class] => Array
- (
- [22] => Array
- (
- [id] => 22
- [reg_event] => 61
- [name] => Admiral Class
- [descr] => This is our Admiral Class registration level.
- [reg_rate] => Array
- (
- [17] => Array
- (
- [id] => 17
- [reg_event] => 61
- [reg_class] => 22
- [name] => Rate Name
- [start_days] => 100
- [end_days] => 50
- [base_rate] => $20.00
- [per_registrant] => $10.00
- [registrant_credits] => 1
- )
-
- )
-
- )
-
- )
-
-)
-
-*/
+++ /dev/null
-<?php
-
-// Sample front-end event selection data - Should really be a cart entry
-$eventData = array(
- 1 => array(
- 'id' => 1,
- 'title' => 'PHP Payment Gateways',
- 'short_desc' => 'Setting up your developer account and testing payment gateways',
- 'levels' => array(
- 3 => array(
- 'id' => 3,
- 'title' => 'General Admittance',
- 'registrants' => array(
- 1 => array(
- 'id' => 1,
- 'fname' => 'Dan',
- 'lname' => 'Smith',
- 'email' => 'dan@smith.com',
- ),
- 3 => array(
- 'id' => 3,
- 'fname' => 'Tony',
- 'lname' => 'Johnson',
- 'email' => 'tj@website.com',
- ),
- ),
- ),
- ),
- ),
- 2 => array(
- 'id' => 2,
- 'title' => 'Mailchimp Newsletters',
- 'short_desc' => 'Learning how to setup test and use mailchimp to the fullest.',
- 'levels' => array(
- 4 => array(
- 'id' => 4,
- 'title' => 'General Admittance',
- 'registrants' => array(
- 2 => array(
- 'id' => 2,
- 'fname' => 'John',
- 'lname' => 'Handler',
- 'email' => 'johny@handler.com',
- ),
- ),
- ),
- ),
- )
-);
-
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_CURRENT_URL', $urlParts['scheme'].'://'.$urlParts['host'].$pageUri[0]);
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL', GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL.'assets');
-
// Directories
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH', dirname(__FILE__));
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_SETUP_PATH', GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/setup');
* version from this plugin.
*/
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.1.0');
-define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.2');
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.3');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.10.27');
// Default registrant values
defaults: {
id: 0,
- name: 'AppAccount',
+ name: 'AppAccount',
fname: '',
lname: '',
+ org: '',
+ title: '',
email: '',
validated: false,
},
email: '',
fname: '',
lname: '',
+ org: '',
+ title: '',
addr1: '',
addr2: '',
city: '',
var fname = this.$('.reg_fname').val().trim();
var lname = this.$('.reg_lname').val().trim();
var email = this.$('.reg_email').val().trim();
+ var org = this.$('.reg_org').val().trim();
+ var title = this.$('.reg_title').val().trim();
var addr1 = this.$('.reg_addr1').val().trim();
var addr2 = this.$('.reg_addr2').val().trim();
var city = this.$('.reg_city').val().trim();
fname: fname,
lname: lname,
email: email,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
var fname = this.$('.add_reg_fname').val().trim();
var lname = this.$('.add_reg_lname').val().trim();
var email = this.$('.add_reg_email').val().trim();
+ var org = this.$('.add_reg_org').val().trim();
+ var title = this.$('.add_reg_title').val().trim();
var addr1 = this.$('.add_reg_addr1').val().trim();
var addr2 = this.$('.add_reg_addr2').val().trim();
var city = this.$('.add_reg_city').val().trim();
email: email,
fname: fname,
lname: lname,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
this.$('.add_reg_email').val(account.email);
this.$('.add_reg_fname').val(account.fname);
this.$('.add_reg_lname').val(account.lname);
+ this.$('.add_reg_org').val(account.org);
+ this.$('.add_reg_title').val(account.title);
this.$('.add_reg_addr1').val(account.addr1);
this.$('.add_reg_addr2').val(account.addr2);
this.$('.add_reg_city').val(account.city);
lockForm: function(){
this.$('.add_reg_fname').prop('disabled', true);
this.$('.add_reg_lname').prop('disabled', true);
+ this.$('.add_reg_org').prop('disabled', true);
+ this.$('.add_reg_title').prop('disabled', true);
this.$('.add_reg_addr1').prop('disabled', true);
this.$('.add_reg_addr2').prop('disabled', true);
this.$('.add_reg_city').prop('disabled', true);
unLockForm: function(){
this.$('.add_reg_fname').prop('disabled', false);
this.$('.add_reg_lname').prop('disabled', false);
+ this.$('.add_reg_org').prop('disabled', false);
+ this.$('.add_reg_title').prop('disabled', false);
this.$('.add_reg_addr1').prop('disabled', false);
this.$('.add_reg_addr2').prop('disabled', false);
this.$('.add_reg_city').prop('disabled', false);
// Default registrant values
defaults: {
id: 0,
- name: 'AppAccount',
+ name: 'AppAccount',
fname: '',
lname: '',
+ org: '',
+ title: '',
email: '',
validated: false,
},
email: '',
fname: '',
lname: '',
+ org: '',
+ title: '',
addr1: '',
addr2: '',
city: '',
var fname = this.$('.reg_fname').val().trim();
var lname = this.$('.reg_lname').val().trim();
var email = this.$('.reg_email').val().trim();
+ var org = this.$('.reg_org').val().trim();
+ var title = this.$('.reg_title').val().trim();
var addr1 = this.$('.reg_addr1').val().trim();
var addr2 = this.$('.reg_addr2').val().trim();
var city = this.$('.reg_city').val().trim();
fname: fname,
lname: lname,
email: email,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
var fname = this.$('.add_reg_fname').val().trim();
var lname = this.$('.add_reg_lname').val().trim();
var email = this.$('.add_reg_email').val().trim();
+ var org = this.$('.add_reg_org').val().trim();
+ var title = this.$('.add_reg_title').val().trim();
var addr1 = this.$('.add_reg_addr1').val().trim();
var addr2 = this.$('.add_reg_addr2').val().trim();
var city = this.$('.add_reg_city').val().trim();
email: email,
fname: fname,
lname: lname,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
this.$('.add_reg_email').val(account.email);
this.$('.add_reg_fname').val(account.fname);
this.$('.add_reg_lname').val(account.lname);
+ this.$('.add_reg_org').val(account.org);
+ this.$('.add_reg_title').val(account.title);
this.$('.add_reg_addr1').val(account.addr1);
this.$('.add_reg_addr2').val(account.addr2);
this.$('.add_reg_city').val(account.city);
lockForm: function(){
this.$('.add_reg_fname').prop('disabled', true);
this.$('.add_reg_lname').prop('disabled', true);
+ this.$('.add_reg_org').prop('disabled', true);
+ this.$('.add_reg_title').prop('disabled', true);
this.$('.add_reg_addr1').prop('disabled', true);
this.$('.add_reg_addr2').prop('disabled', true);
this.$('.add_reg_city').prop('disabled', true);
unLockForm: function(){
this.$('.add_reg_fname').prop('disabled', false);
this.$('.add_reg_lname').prop('disabled', false);
+ this.$('.add_reg_org').prop('disabled', false);
+ this.$('.add_reg_title').prop('disabled', false);
this.$('.add_reg_addr1').prop('disabled', false);
this.$('.add_reg_addr2').prop('disabled', false);
this.$('.add_reg_city').prop('disabled', false);
array(
'fname' => $modelData['fname'],
'lname' => $modelData['lname'],
+ 'org' => $modelData['org'],
+ 'title' => $modelData['title'],
'email' => $modelData['email'],
'addr1' => $modelData['addr1'],
'addr2' => $modelData['addr2'],
$accountData = array(
'fname' => $modelData['fname'],
'lname' => $modelData['lname'],
+ 'org' => $modelData['org'],
+ 'title' => $modelData['title'],
'email' => $modelData['email'],
'addr1' => $modelData['addr1'],
'addr2' => $modelData['addr2'],
$accountDataFormat = array(
'%s', // fname
'%s', // lname
+ '%s', // org
+ '%s', // title
'%s', // email
'%s', // addr1
'%s', // addr2
// Check selected fields
$select = array(
- 'exportId' => $this->checkFlag('exportId'),
- 'exportRegistrant' => $this->checkFlag('exportRegistrant'),
- 'exportAddr1' => $this->checkFlag('exportAddr1'),
- 'exportAddr2' => $this->checkFlag('exportAddr2'),
- 'exportCity' => $this->checkFlag('exportCity'),
- 'exportState' => $this->checkFlag('exportState'),
- 'exportZip' => $this->checkFlag('exportZip'),
- 'exportEmail' => $this->checkFlag('exportEmail'),
- 'exportPhone' => $this->checkFlag('exportPhone'),
- 'exportCounty' => $this->checkFlag('exportCounty'),
- 'exportLevel' => $this->checkFlag('exportLevel'),
- 'exportTime' => $this->checkFlag('exportTime'),
- 'exportRate' => $this->checkFlag('exportRate'),
- 'exportStatus' => $this->checkFlag('exportStatus'),
- 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'),
- 'exportCustom' => $this->checkFlag('exportCustom')
+ 'exportId' => $this->checkFlag('exportId'),
+ 'exportRegistrant' => $this->checkFlag('exportRegistrant'),
+ 'exportOrg' => $this->checkFlag('exportOrg'),
+ 'exportTitle' => $this->checkFlag('exportTitle'),
+ 'exportAddr1' => $this->checkFlag('exportAddr1'),
+ 'exportAddr2' => $this->checkFlag('exportAddr2'),
+ 'exportCity' => $this->checkFlag('exportCity'),
+ 'exportState' => $this->checkFlag('exportState'),
+ 'exportZip' => $this->checkFlag('exportZip'),
+ 'exportEmail' => $this->checkFlag('exportEmail'),
+ 'exportPhone' => $this->checkFlag('exportPhone'),
+ 'exportCounty' => $this->checkFlag('exportCounty'),
+ 'exportLevel' => $this->checkFlag('exportLevel'),
+ 'exportTime' => $this->checkFlag('exportTime'),
+ 'exportRate' => $this->checkFlag('exportRate'),
+ 'exportStatus' => $this->checkFlag('exportStatus'),
+ 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'),
+ 'exportCustom' => $this->checkFlag('exportCustom')
);
// Get registration event ID if supplied
$where = implode(' AND ', $whereParts);
// $list = $this->getList($where, "lname");
- $listResult = $this->getFullRegistrantsData($regEventID, $where,
- false, false, $orderBy);
+ $listResult = $this->getFullRegistrantsData($regEventID, $where);
$list = $listResult['list'];
$customFieldsPluginActive = apply_filters(
'glm-members-customfields-plugin-active', false);
$customFieldHeaders = false;
+
// Go through the $listResult to pull out the custom fields if
// available and if plugin is on
if ($customFieldsPluginActive && $listResult['list']) {
$orderField = 'request_status';
break;
+ case 'org':
+ $orderField = 'org';
+ break;
+
+ case 'title':
+ $orderField = 'title';
+ break;
+
case 'city':
$orderField = 'account';
$orderField2 = 'city';
break;
case 'state':
- $orderField = 'acount';
+ $orderField = 'account';
$orderField2 = 'state';
break;
update_option('glmMembersDatabaseRegistrationsAccountID', $accountID);
}
+ // If there's no input data array generated, make a blank one
+ if ($inputData === null) {
+ $inputData = array(
+ 'textSearch' => '',
+ 'withRequests' => false,
+ 'withAttendees' => false,
+ 'withNoData' => false,
+ 'inactive' => false
+ );
+ }
+
// Compile template data
$templateData = array(
'inputData' => $inputData,
$haveRegEvent = false;
$regEventUpdated = false;
$regEventUpdateError = false;
+$standAloneRegEvent = false;
// If we're adding a new reg event
if ($option == 'add') {
$eventData = false;
$eventID = ($_REQUEST['event']-0);
- // Verify that event is not already listed
- $regEvent = $this->getEntry($eventID, 'event');
- if (!$regEvent) {
+ // If we have an event ID, then verify that event is not already listed
+ if ($eventID > 0) {
+ $regEvent = $this->getEntry($eventID, 'event');
+
+ if ($regEvent) {
+ $messages[] = "Trying to add an event that is already listed in Registrations.";
+ $problem = true;
+ }
+ }
+
+ if (!$problem) {
// Get data on this event from events add-on
if ($eventID > 0) {
$eventData = apply_filters('glm-member-db-events-get-event', $eventID);
- }
- // Did we get event data?
- if ($eventData) {
+ if ($eventData) {
+
+ $eventName = $eventData['name'];
+ $eventSlug = $eventData['name_slug'];
+ $adminEmail = $eventData['admin_email'];
+ $timeSpecific = false;
+
+ // Add event to registrations
+ $sql = "
+ INSERT INTO ".$this->table."
+ (
+ event,
+ event_name,
+ event_code,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ reg_hours_before,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms
+ )
+ VALUES
+ (
+ $eventID,
+ '$eventName',
+ '$nameSlug',
+ '$adminEmail',
+ true,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 24,
+ 14,
+ 94,
+ 26,
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regEventID = $this->wpdb->insert_id;
+
+ // Check if added
+ if ($regEventID) {
+ $regEventUpdated = true;
+ } else {
+ $messages[] = "Sorry, we were unable to create registrations for this event.";
+ $problem = true;
+ }
+
+ } else {
+ $messages[] = "Unable to retrieve information on specified event.";
+ $problem = true;
+ }
+
+ } else {
+
+ $standAloneRegEvent = true;
// Add event to registrations
$sql = "
- INSERT INTO ".$this->table."
- (
- event,
- event_name,
- event_code,
- notify_email,
- admin_active,
- active,
- time_specific,
- attendees,
- attendee_max,
- attendee_max_per_reg,
- reg_hold_minutes,
- cart_hold_days,
- reg_hours_before,
- registration_account_options,
- payment_methods,
- restricted_payment_methods,
- terms
- )
- VALUES
- (
- ".$eventData['id'].",
- '".$eventData['name']."',
- '".$eventData['name_slug']."',
- '".$eventData['admin_email']."',
- true,
- false,
- true,
- true,
- 0,
- 0,
- 60,
- 10,
- 24,
- 14,
- 94,
- 26,
- ''
- )
- ;";
+ INSERT INTO ".$this->table."
+ (
+ event,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ reg_hours_before,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms,
+ image,
+ cost,
+ hide_address,
+ use_member_location,
+ member,
+ location_name,
+ address,
+ city,
+ state,
+ zip,
+ country,
+ lat,
+ lon,
+ region,
+ phone,
+ url,
+ email,
+ contact_addon_id,
+ contact_fname,
+ contact_lname,
+ contact_phone,
+ contact_email
+ )
+ VALUES
+ (
+ 0,
+ '',
+ true,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 24,
+ 14,
+ 94,
+ 26,
+ '',
+ '',
+ '',
+ false,
+ false,
+ 0,
+ '',
+ '',
+ 0,
+ '',
+ '',
+ '',
+ ".$this->config['settings']['maps_default_lat'].",
+ ".$this->config['settings']['maps_default_lon'].",
+ 0,
+ '',
+ '',
+ '',
+ 0,
+ '',
+ '',
+ '',
+ ''
+ )
+ ;";
$this->wpdb->query($sql);
$regEventID = $this->wpdb->insert_id;
- if ($regEventID) {
+ // Check if added
+ if ($regEventID) {
$regEventUpdated = true;
-
+ } else {
+ $messages[] = "Unable to create new stand-alone registration event.";
+ $problem = true;
}
}
-
- } else {
- $messages[] = "Trying to add an event that is already listed in Registrations.";
- $problem = true;
}
}
}
}
-//echo "<pre>".print_r($regEvent,1)."</pre>";
+// echo "<pre>".print_r($regEvent,1)."</pre>";
$templateData = array(
'regEvent' => $regEvent,
* @link http://dev.gaslightmedia.com/
*/
-$regEvent = false;
-$haveRegEvent = false;
-$haveRegEventTimes = false;
-$defaultCalendarDate = false;
-$regEventFirstTime = false;
-$regEventLastTime = false;
-
+$regEvent = false;
+$haveRegEvent = false;
+$haveTimeSpecificEvent = false;
+$haveNonTimeAvailability = false;
+$haveRegEventTimes = false;
+$haveActiveRegEventTimes = false;
+$haveFutureTimes = false;
+$haveActiveFutureTimes = false;
+$haveActiveFutureAvailability = false;
+$haveRegClasses = false;
+$haveRegRates = false;
+$haveRegRatesForAllLevels = true;
+$haveCurrentRegRates = false;
+$haveAvailability = false;
+$defaultCalendarDate = false;
+$calDefaultDateChosen = false;
+$regEventFirstTime = false;
+$regEventLastTime = false;
+$regEventNotSetup = false;
+$regEventStandAlone = false;
+$haveMessages = false;
+$messages = array();
// Check if there's a request to add event times from the event
$getTimesFromEvent = false;
if ($regEvent !== false) {
$haveRegEvent = true;
- $haveRegEventTimes = false;
- $defaultCalendarDate = false;
+
+ // Check if it's a stand-alone event
+ if ($regEvent['event'] == 0) {
+ $regEventStandAlone = true;
+ }
+
+ $haveTimeSpecificEvent = $regEvent['time_specific']['value'];
+
+ // If time_specific or event_code are not set, warn user to go back and fix those.
+ if ($regEvent['time_specific']['value'] == null || $regEvent['event_code'] == '' || $regEvent['event_name'] == '') {
+ $messages[] = 'This '.$this->config['terms']['reg_term_event'].' has incomplete settings, please select "Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings" above!';
+ $regEventNotSetup = true;
+ }
// Check that we have reg event times
- if ($regEvent['first_datetime'] != 'NULL') {
+ if ($regEvent['first_datetime']['timestamp'] > 0) {
+
$haveRegEventTimes = true;
+
$regEventFirstTime = $regEvent['first_datetime'];
$regEventLastTime = $regEvent['last_datetime'];
+
+ foreach ($regEvent['reg_time'] as $time) {
+ if ($time['active']['value'] && $time['start_datetime']['timestamp'] > 0) {
+ $haveActiveRegEventTimes = true;
+
+ // Check for the first calendar date now or in the future
+ if (!$defaultCalendarDate && $time['start_datetime']['timestamp'] >= strtotime('today')) {
+ $defaultCalendarDate = date('m/d/Y h:i A', $time['start_datetime']['timestamp']);
+ $calDefaultDateChosen = 'nextActive';
+ }
+ }
+ }
+
} else {
- // We don't so set to current time so at least the current month is displayed in the calendar
- $defaultCalendarDate = date('m/d/Y h:i A');
$messages[] = 'There are no dates on the calendar for this '.$this->config['terms']['reg_term_event'].'.';
}
+ // If We don't have a default date yet
+ if (!$defaultCalendarDate) {
+ // If there's a FirstTime entry, use that - otherwise use today
+ if ($regEventFirstTime) {
+ $defaultCalendarDate = date('m/d/Y h:i A', $regEventFirstTime['timestamp']);
+ $calDefaultDateChosen = 'firstListed';
+ } else {
+ $defaultCalendarDate = date('m/d/Y h:i A');
+ $calDefaultDateChosen = 'today';
+ }
+ }
+
+ /*
+ * This section does a variety of checks to try to determine why a registration event may not be available
+ * to users for registration on the front-end.
+ */
+
+ // Check if we have any reg classes
+ if ($regEvent['reg_class'] && count($regEvent['reg_class']) > 0) {
+ $haveRegClasses = true;
+
+ // Scan all times for availbility in active time entries
+ foreach ($regEvent['reg_time'] as $time) {
+
+ // If this entry has availability
+ if ($time['attendees_available'] > 0) {
+
+ // If this is a time_spcific event and this is a real time entry
+ if ($regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] > 0) {
+ $haveAvailability = true;
+ }
+
+ // If this is NOT a time_specific event and this is a pseudo time entry for this type of event
+ if (!$regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] == 0) {
+ $haveAvailability = true;
+ }
+ }
+ }
+
+ // Check if we have any rates
+ foreach ($regEvent['reg_class'] as $class) {
+ if ($class['reg_rate'] && count($class['reg_rate']) > 0) {
+ $haveRegRates = true;
+
+ // For each rate with each time
+ foreach ($class['reg_rate'] as $rate) {
+ foreach ($regEvent['reg_time'] as $time) {
+
+ // If the time is not a pseudo time entry for nont-time specific event
+ if ($time['start_datetime']['timestamp'] > 0) {
+
+ // Calculate differernce between today and start date for this time
+ $timeDate = new DateTime(date('m/d/Y', $time['start_datetime']['timestamp']));
+ $today = new DateTime(date('m/d/Y', time()));
+ $diff = $today->diff($timeDate);
+ $diffDays = ($diff->format('%a days') - 0);
+ if ($diff->invert) {
+ $diffDays *= -1;
+ }
+
+ // Check if this is a current or future date
+ if ($diffDays >= 0) {
+ $haveFutureTimes = true;
+
+ // Check if this future time is active
+ if ($time['active']['value']) {
+ $haveActiveFutureTimes = true;
+
+ // If this is a time specific time entry and there's availability
+ if ($haveTimeSpecificEvent && $time['attendees_available'] > 0) {
+ $haveActiveFutureAvailability = true;
+ }
+
+ }
+
+ }
+
+ // Check if the number of days match the rate date range for this rate
+ if ($diffDays <= $rate['start_days'] && $diffDays >= $rate['end_days']) {
+ $haveCurrentRegRates = true;
+ }
+
+ // Otherwise this is a pseudo entry for a non-time-specific event (or should be)
+ } else {
+
+ // If this is a non-time-specific event, is there availability
+ if (!$haveTimeSpecificEvent && $time['attendees_available'] > 0) {
+ $haveNonTimeAvailability = true;
+ }
+
+ }
+ }
+ }
+ } else {
+ $haveRegRatesForAllLevels = false;
+ }
+ }
+ }
// if there's a user notice, add it to messages
if (isset($regEvent['message']) && $regEvent['message']) {
}
}
-// echo "<pre>".print_r($regEvent,1)."</pre>";
+/*
+ * This section tries to intelegently compile reasons a registration event may not be available for users
+ * to register on the front-end. It also tries not to display redundant messages that should be obvious.
+ * 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 ($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 (!$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)';
+}
-$templateData = array(
- 'regEvent' => $regEvent,
- 'haveRegEvent' => $haveRegEvent,
- 'haveRegEventTimes' => $haveRegEventTimes,
- 'defaultCalendarDate' => $defaultCalendarDate,
- 'regEventFirstTime' => $regEventFirstTime,
- 'regEventFirstTime' => $regEventFirstTime,
- 'regEventLastTime' => $regEventLastTime,
+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>";
+
+$templateData = array(
+ 'regEvent' => $regEvent,
+ 'haveRegEvent' => $haveRegEvent,
+ 'haveTimeSpecificEvent' => $haveTimeSpecificEvent,
+ 'haveNonTimeAvailability' => $haveNonTimeAvailability,
+ 'haveRegEventTimes' => $haveRegEventTimes,
+ 'haveActiveRegEventTimes' => $haveActiveRegEventTimes,
+ 'haveFutureTimes' => $haveFutureTimes,
+ 'haveActiveFutureTimes' => $haveActiveFutureTimes,
+ 'haveActiveFutureAvailability' => $haveActiveFutureAvailability,
+ 'haveRegClasses' => $haveRegClasses,
+ 'haveRegRates' => $haveRegRates,
+ 'haveCurrentRegRates' => $haveCurrentRegRates,
+ 'haveAvailability' => $haveAvailability,
+ 'defaultCalendarDate' => $defaultCalendarDate,
+ 'calDefaultDateChosen' => $calDefaultDateChosen,
+ 'regEventFirstTime' => $regEventFirstTime,
+ 'regEventFirstTime' => $regEventFirstTime,
+ 'regEventLastTime' => $regEventLastTime,
+ 'regEventNotSetup' => $regEventNotSetup,
+ 'regEventStandAlone' => $regEventStandAlone,
+ 'haveMessages' => (count($messages) > 0),
+ 'messages' => $messages
);
}
$templateData = array(
+ 'regEventId' => '',
'havePayCodes' => $havePayCodes,
'payCodes' => $payCodes,
'newPayCode' => $newPayCode,
$regNotifyUpdated = false;
-
// New and updated notifications
if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) {
// Make sure key is positive integer
$id = ( $key - 0 );
// Check the before or after for setting the sign for notification_days
- $notification_days = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT );
- $notification_when = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING );
- if ( $notification_when === 'before' ) {
- $notification_days = '-' . $notification_days;
+ $nDays = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT );
+ $nWhen = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING );
+ if ( $nWhen === 'before' ) {
+ $nDays = '-' . $nDays;
}
+ $nName = filter_var( $_REQUEST['name'][$id], FILTER_SANITIZE_STRING );
+ $nMessage = filter_var( $_REQUEST['message'][$id], FILTER_SANITIZE_STRING );
$reg_notification_data = array(
- 'name' => $_REQUEST['name'][$id],
- 'notification_days' => $notification_days,
- 'message' => $_REQUEST['message'][$id]
+ 'name' => $nName,
+ 'notification_days' => $nDays,
+ 'message' => $nMessage
);
// echo '<pre>$reg_notification_data: ' . print_r( $reg_notification_data, true ) . '</pre>';
if ( $id > 0 ) {
* @link http://dev.gaslightmedia.com/
*/
-$regEvent = false;
-$havePayCodes = false;
-$payCodes = false;
-$newPayCode = false;
-$refPaycodeType = false;
-
+$regEventId = false;
+$regEvent = false;
+$havePayCodes = false;
+$payCodes = false;
+$newPayCode = false;
+$refPaycodeType = false;
// Get event ID
-$eventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT);
+$regEventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT);
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataPaymentCode.php';
$PayCode = new GlmDataRegistrationsPaymentCode($this->wpdb, $this->config);
-if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
- switch($_REQUEST['option2']) {
+// Create data for a new pay code entry form
+$newPayCode = $PayCode->newEntry();
+
+// Specify the pay code type number that should be used.
+$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event'];
+
+// We need a reg event code to do anything here.
+if ($regEventId) {
- case 'new':
- $res = $PayCode->insertEntry();
- if (!$res['status']) {
- foreach ($res['fieldFail'] as $ff) {
- if (trim($ff) != '') {
- $messages[] = $ff;
+ if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
+
+ switch($_REQUEST['option2']) {
+
+ case 'new':
+ $res = $PayCode->insertEntry();
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
}
}
- }
- break;
+ break;
- case 'update':
- if ($eventId) {
+ case 'update':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
$res = $PayCode->updateEntry($payCodeId);
if (!$res['status']) {
}
}
}
- }
- break;
+ break;
- case 'delete':
- if ($eventId) {
+ case 'delete':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
if ( $payCodeId > 0 ) {
$PayCode->deleteEntry( $payCodeId, true );
}
- }
- break;
- }
-}
+ break;
+ }
-$newPayCode = $PayCode->newEntry();
-
-// Specify the pay code type number that should be used.
-$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event'];
+ }
-// If we have an event ID then get any pacodes for that event
-$payCodes = false;
-if ($eventId) {
- $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $eventId");
-}
+ // Get any pacodes for this event
+ $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $regEventId");
+ if ($payCodes) {
+ $havePayCodes = true;
+ }
-if ($payCodes) {
- $havePayCodes = true;
}
-$regEvent = $this->getEntry($regEventID);
+$regEvent = $this->getEntry($regEventId);
$templateData = array(
- 'regEvent' => $regEvent,
- 'havePayCodes' => $havePayCodes,
- 'payCodes' => $payCodes,
- 'newPayCode' => $newPayCode,
- 'eventPaycodeType' => $refPaycodeType
+ 'regEventId' => $regEventId,
+ 'regEvent' => $regEvent,
+ 'havePayCodes' => $havePayCodes,
+ 'payCodes' => $payCodes,
+ 'newPayCode' => $newPayCode,
+ 'eventPaycodeType' => $refPaycodeType
);
-
$view = 'eventPaymentCodes';
}
$registrants = $listResult['list'];
-// Calc Cart ID check
-foreach ($registrants as $key=>$val) {
- $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']);
-}
-
-$success = true;
-$haveRegistrants = false;
if ($registrants !== false) {
-
- $success = true;
-
// If we have any entries
if (count($registrants) > 0) {
$haveRegistrants = true;
}
}
+
+// Calc Cart ID check
+if ($haveRegistrants) {
+ foreach ($registrants as $key=>$val) {
+ $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']);
+ }
+}
+
// echo "<pre>".print_r($registrants,1)."</pre>";
$templateData = array(
$regEventUpdated = false;
$regEventUpdateError = false;
-
-// Get the current reg event type to check for change
-$timeSpecific = $this->wpdb->get_var("
- SELECT time_specific
+// Get the event ID - 0 if stand-alone
+$eventID = $this->wpdb->get_var("
+ SELECT event
FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event
WHERE id = $regEventID
");
+// If this is not a stand-alone reg event then remove certain fields.
+if ($eventID) {
+ unset(
+ $this->fields['image'],
+ $this->fields['cost'],
+ $this->fields['hide_address'],
+ $this->fields['use_member_location'],
+ $this->fields['location_name'],
+ $this->fields['address'],
+ $this->fields['city'],
+ $this->fields['state'],
+ $this->fields['zip'],
+ $this->fields['country'],
+ $this->fields['lat'],
+ $this->fields['lat'],
+ $this->fields['lon'],
+ $this->fields['phone'],
+ $this->fields['url'],
+ $this->fields['email'],
+ $this->fields['contact_fname'],
+ $this->fields['contact_lname'],
+ $this->fields['contact_phone'],
+ $this->fields['contact_email']
+ );
+}
+
// Try to update the reg event
$regEvent = $this->updateEntry($regEventID);
-// If there's some type of failure, flag that for the view file
+// If update was successful
if ($regEvent['status']) {
+
$regEventUpdated = true;
- // Now check to see if the type has been changed from Time specific to Non-Time specific
- if ($timeSpecific && !$regEvent['fieldData']['time_specific']['value']) {
+ // If this is a non-time specific registrations event
+ if (!$regEvent['fieldData']['time_specific']['value']) {
- // Changing to non-time=specific, so check if we need to create a time entry for that
+ // Check if there's a time entry for this non-time specific event - should be only one.
$timeEntry = $this->wpdb->get_row("
SELECT id
FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
}
}
-
} else {
$regEventUpdateError = true;
}
+// echo "<pre>".print_r($regEvent,1)."</pre>";
+
$templateData = array(
'regEvent' => $regEvent,
'regEventUpdated' => $regEventUpdated,
'regEventUpdateError' => $regEventUpdateError
);
-
$view = 'eventEdit';
}
}
+ // Convert config for billing fields to useable format for view file
+ $selected = array();
+ foreach ($management['reg_bill_info_requested']['bitmap'] as $key=>$bit) {
+ if ($bit['default']) {
+ $selected[] = $key;
+ }
+ }
+ require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/glmPluginSupport.php';
+ $billingFields = glmMembersConfigArraySetup( $this->config['billing_field'], $this->config['billing_field_numb'], $selected, true);
+
// Compile template data
$templateData = array(
+ 'billingFields' => $billingFields,
'page' => 'checkout',
'regAccountId' => $this->cart['request']['account'],
'regAccount' => $regAccount,
// Since there's no account yet, we'll use the billing data for the base account data
$_REQUEST['fname'] = $_REQUEST['bill_fname'];
$_REQUEST['lname'] = $_REQUEST['bill_lname'];
+ $_REQUEST['org'] = $_REQUEST['bill_org'];
$_REQUEST['addr1'] = $_REQUEST['bill_addr1'];
$_REQUEST['addr2'] = $_REQUEST['bill_addr2'];
$_REQUEST['city'] = $_REQUEST['bill_city'];
array(
'fname' => $regAccount['fieldData']['bill_fname'],
'lname' => $regAccount['fieldData']['bill_lname'],
+ 'org' => $regAccount['fieldData']['bill_org'],
'addr1' => $regAccount['fieldData']['bill_addr1'],
'addr2' => $regAccount['fieldData']['bill_addr2'],
'city' => $regAccount['fieldData']['bill_city'],
),
array( 'id' => $accountId ),
array(
+ '%s',
'%s',
'%s',
'%s',
'id' => false,
'fname' => $regAccount['fieldData']['bill_fname'],
'lname' => $regAccount['fieldData']['bill_lname'],
+ 'org' => $regAccount['fieldData']['bill_org'],
'addr1' => $regAccount['fieldData']['bill_addr1'],
'addr2' => $regAccount['fieldData']['bill_addr2'],
'city' => $regAccount['fieldData']['bill_city'],
$nextStart = '';
$alphaSelected = false;
$haveRegEvents = false;
+ $eventCode = false;
$regEventsCount = false;
$messages = false;
+ // Check for specified event
+ if (isset($_REQUEST['event'])) {
+ $eventCode = filter_input(INPUT_GET, 'event', FILTER_SANITIZE_STRING);
+ } elseif (isset($actionData['request']['event']) && $actionData['request']['event'] != '') {
+ $eventCode = trim($actionData['request']['event']);
+ }
+
+ // If the event is specified
+ if ($eventCode && trim($eventCode) != '') {
+
+ // Redirect to "register" model
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'registrations',
+ 'modelRedirect' => 'registration',
+ 'view' => false,
+ 'data' => array(
+ 'eventCode' => $eventCode
+ )
+ );
+
+ }
+
+
if (isset($actionData['messages'])) {
$messages = $actionData['messages'];
}
}
-
-
// Get misc texts
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
$Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
default:
- // Build Where clause to select only active future reg events
- $where .= "T.active AND T.last_datetime > now()";
+ // Build Where clause to select only active future reg events that are not bloked from lists
+ $where .= "T.active AND T.last_datetime > now() && !T.not_included_in_lists";
// Get a current list of reg events
$listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true);
break;
}
- // including test data for now
- include GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH . '/data/events.php';
+ // echo "<pre>".print_r($list,1)."</pre>";
// Compile template data
$templateData = array(
'reg_bulletin' => $misc['reg_bulletin']
);
- // echo "<pre>".print_r($templateData,1)."</pre>";
-
// Return status, any suggested view, and any data to controller
return array(
'status' => true,
$reg = array(
'fname' => '',
'lname' => '',
+ 'org' => '',
+ 'title' => '',
'addr1' => '',
'addr2' => '',
'city' => '',
$password = (isset($_REQUEST['password'])) ? filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING ): '';
$fname = (isset($_REQUEST['fname'])) ? filter_var( $_REQUEST['fname'], FILTER_SANITIZE_STRING ): '';
$lname = (isset($_REQUEST['lname'])) ? filter_var( $_REQUEST['lname'], FILTER_SANITIZE_STRING ): '';
+ $org = (isset($_REQUEST['org'])) ? filter_var( $_REQUEST['org'], FILTER_SANITIZE_STRING ): '';
+ $title = (isset($_REQUEST['title'])) ? filter_var( $_REQUEST['title'], FILTER_SANITIZE_STRING ): '';
$addr1 = (isset($_REQUEST['addr1'])) ? filter_var( $_REQUEST['addr1'], FILTER_SANITIZE_STRING ): '';
$addr2 = (isset($_REQUEST['addr2'])) ? filter_var( $_REQUEST['addr2'], FILTER_SANITIZE_STRING ): '';
$city = (isset($_REQUEST['city'])) ? filter_var( $_REQUEST['city'], FILTER_SANITIZE_STRING ): '';
'password' => password_hash($password, PASSWORD_DEFAULT),
'fname' => $fname,
'lname' => $lname,
+ 'org' => $org,
+ 'title' => $title,
'addr1' => $addr1,
'addr2' => $addr2,
'city' => $city,
$haveCart = false;
$regEventFirstTime = false;
$registrantsList = false;
+ $regEventID = false;
+ $haveRegEvent = false;
// Get misc texts
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
}
}
- // Get eventRegId if supplied
- if (isset($_REQUEST['eventRegId'])) {
+ // If an event code has been supplied by redirect from list page
+ if (isset($actionData['eventCode'])) {
+
+ // check if the code is a numeric ID
+ $ad = $actionData['eventCode'] - 0;
+ if ($ad > 0 && $ad == $actionData['eventCode']) {
+ $regEventID = $ad;
+
+ // Otherwise it should be an event code
+ } else {
+ if ($action)
+ // Try to get reg event ID
+ $regEventID = $this->wpdb->get_var("
+ SELECT id
+ FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event
+ WHERE event_code = '".$actionData['eventCode']."'
+ ");
+ }
+ }
+
+ // Get regEventID if supplied
+ if (!$regEventID && isset($_REQUEST['eventRegId'])) {
// Make sure it's numeric
- $eventRegID = ($_REQUEST['eventRegId'] - 0);
+ $regEventID = ($_REQUEST['eventRegId'] - 0);
- if ($eventRegID <= 0) {
- $eventRegID = false;
- }
+ }
+
+ if ($regEventID <= 0) {
+ $regEventID = false;
}
// Set the $view to registration
switch ( $option ) {
default:
- // Get the RegEvent entry
- $this->postProcAddedEventData = true;
- $regEvent = $this->getEventForRegistration($eventRegID);
-
- $regEventId = $regEvent['id'];
-
- // Create an $event array with the event data.
- $event = array(
- 'id' => $regEvent['id'],
- 'event' => $regEvent['event'],
- 'event_name' => $regEvent['event_name'],
- 'event_code' => $regEvent['event_code'],
- 'descr' => $regEvent['descr'],
- 'time_specific' => $regEvent['time_specific']['value'],
- 'reg_time' => null, //$regEvent['reg_time'],
- 'attendee_max' => $regEvent['attendee_max'],
- 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'],
- 'reg_hold_minutes' => $regEvent['reg_hold_minutes'],
- 'terms' => $regEvent['terms'],
- );
+ if ($regEventID) {
+
+ // Get the RegEvent entry
+ $this->postProcAddedEventData = true;
+ $regEvent = $this->getEventForRegistration($regEventID);
+
+ if ($regEvent) {
+ $regEventId = $regEvent['id'];
+
+ // Create an $event array with the event data.
+ $event = array(
+ 'id' => $regEvent['id'],
+ 'event' => $regEvent['event'],
+ 'event_name' => $regEvent['event_name'],
+ 'event_code' => $regEvent['event_code'],
+ 'descr' => $regEvent['descr'],
+ 'time_specific' => $regEvent['time_specific']['value'],
+ 'reg_time' => null, //$regEvent['reg_time'],
+ 'attendee_max' => $regEvent['attendee_max'],
+ 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'],
+ 'reg_hold_minutes' => $regEvent['reg_hold_minutes'],
+ 'terms' => $regEvent['terms'],
+ );
+
+ $haveRegEvent = true;
+ }
+ }
break;
}
- $eventData = array();
+ if ($haveRegEvent) {
- // Build the Class array of JSON objects for the classes.
- $jsonClasses = array();
- $regClasses = array();
+ $eventData = array();
- // $regTimes = array();
+ // Build the Class array of JSON objects for the classes.
+ $jsonClasses = array();
+ $regClasses = array();
- if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) {
+ // $regTimes = array();
- // Loop through the $regEvent['reg_class'] array to build $rClass array
- // If the event is Time Specific then the reg_class need to have
- // times array. If it doesn't then there's no current registration
- // allowed for that event.
- foreach ( $regEvent['reg_class'] as $key => $rClass ) {
+ if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) {
- $classStartingTime = '';
- // echo '<pre>$rClass '."($key): " . print_r( $rClass, true ) . '</pre>';
+ // Loop through the $regEvent['reg_class'] array to build $rClass array
+ // If the event is Time Specific then the reg_class need to have
+ // times array. If it doesn't then there's no current registration
+ // allowed for that event.
+ foreach ( $regEvent['reg_class'] as $key => $rClass ) {
- // Pull the rate data
- if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) {
+ $classStartingTime = '';
+ // echo '<pre>$rClass '."($key): " . print_r( $rClass, true ) . '</pre>';
- // echo '<pre>$rClass[times]: ' . print_r( $rClass['times'], true ) . '</pre>';
- foreach ( $rClass['times'] as $time ) {
- if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) {
- $classStartingTime = $time;
- }
+ // Pull the rate data
+ if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) {
- $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false;
- $rClass['reg_event'] = $regEventId;
- $rClass['reg_rate_id'] = $time['id'];
- $rClass['reg_rate_name'] = $time['name'];
- $rClass['reg_rate_base_price'] = $time['base_rate'];
- $rClass['reg_rate_per_reg'] = $time['per_registrant'];
- $rClass['registrant_credits'] = $time['registrant_credits'];
+ // echo '<pre>$rClass[times]: ' . print_r( $rClass['times'], true ) . '</pre>';
+ foreach ( $rClass['times'] as $time ) {
+ if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) {
+ $classStartingTime = $time;
+ }
- if ( $regEvent['time_specific'] ) {
- $rClass['selectedTime'] = $time['id'];
+ $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false;
+ $rClass['reg_event'] = $regEventId;
+ $rClass['reg_rate_id'] = $time['id'];
+ $rClass['reg_rate_name'] = $time['name'];
+ $rClass['reg_rate_base_price'] = $time['base_rate'];
+ $rClass['reg_rate_per_reg'] = $time['per_registrant'];
+ $rClass['registrant_credits'] = $time['registrant_credits'];
+
+ if ( $regEvent['time_specific'] ) {
+ $rClass['selectedTime'] = $time['id'];
+ }
+ // if ( empty( $regtimes[$time['id']] ) ) {
+ // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK );
+ // }
}
- // if ( empty( $regtimes[$time['id']] ) ) {
- // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK );
- // }
+ $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime'];
+ $rClass['id'] = $key;
+ $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK );
+ } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) {
+ unset( $regEvent['reg_class'][$key] );
}
- $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime'];
- $rClass['id'] = $key;
- $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK );
- } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) {
- unset( $regEvent['reg_class'][$key] );
}
}
- }
- // echo '<pre>$jsonClasses: ' . print_r( $jsonClasses, true ) . '</pre>';
+ // echo '<pre>$jsonClasses: ' . print_r( $jsonClasses, true ) . '</pre>';
- // echo '<pre>$regEvent: ' . print_r( $regEvent, true ) . '</pre>';
-
- // Build the regClass JSON for the template.
- $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']';
- $regCartJSON = json_encode( $cart );
- // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']';
-
- // Get terms into JSON
- $termsJSON = json_encode( $this->config['terms'] );
-
- // check to see if there's a user logged in
- if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) {
- // Setup JSON for the loginAccount.
- $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK );
- }
+ // echo '<pre>$regEvent: ' . print_r( $regEvent, true ) . '</pre>';
- // If there's a cart then pull any registrants for it
- // If there classes in the cart with rates and registrants they'll need
- // be setup.
+ // Build the regClass JSON for the template.
+ $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']';
+ $regCartJSON = json_encode( $cart );
+ // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']';
- $registrants = array();
+ // Get terms into JSON
+ $termsJSON = json_encode( $this->config['terms'] );
- // echo '<pre>$cart: ' . print_r( $cart, true ) . '</pre>';
- // Looping through to grab out registrants from the cart.
- if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) {
-
- // Loop through events array.
- foreach ( $cart['events'] as $rEvent ) {
- if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) {
-
- // Loop through classes array
- foreach ( $rEvent['classes'] as $class ) {
- if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) {
-
- // Loop through rates array
- foreach ( $class['rates'] as $rate ) {
- if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) {
+ // check to see if there's a user logged in
+ if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) {
+ // Setup JSON for the loginAccount.
+ $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK );
+ }
- // Loop through registrants array.
- foreach ( $rate['registrants'] as $registrant ) {
- $accountData = array();
- // If there's an account id get data for the account.
- if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) {
- $accountData = $this->wpdb->get_row(
+ // If there's a cart then pull any registrants for it
+ // If there classes in the cart with rates and registrants they'll need
+ // be setup.
+
+ $registrants = array();
+
+ // echo '<pre>$cart: ' . print_r( $cart, true ) . '</pre>';
+ // Looping through to grab out registrants from the cart.
+ if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) {
+
+ // Loop through events array.
+ foreach ( $cart['events'] as $rEvent ) {
+ if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) {
+
+ // Loop through classes array
+ foreach ( $rEvent['classes'] as $class ) {
+ if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) {
+
+ // Loop through rates array
+ foreach ( $class['rates'] as $rate ) {
+ if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) {
+
+ // Loop through registrants array.
+ foreach ( $rate['registrants'] as $registrant ) {
+ $accountData = array();
+ // If there's an account id get data for the account.
+ if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) {
+ $accountData = $this->wpdb->get_row(
+ $this->wpdb->prepare(
+ "SELECT fname,lname,org,title,email,addr1,addr2,city,state,zip,country,validated
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ WHERE id = %d",
+ $registrant['account']
+ ),
+ ARRAY_A
+ );
+ }
+
+ // Need to know the class id for the registrant
+ $classId = $this->wpdb->get_var(
$this->wpdb->prepare(
- "SELECT fname,lname,email,addr1,addr2,city,state,zip,country,validated
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ "SELECT class
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class
WHERE id = %d",
- $registrant['account']
- ),
- ARRAY_A
+ $registrant['reg_request_class']
+ )
);
- }
-
- // Need to know the class id for the registrant
- $classId = $this->wpdb->get_var(
- $this->wpdb->prepare(
- "SELECT class
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class
- WHERE id = %d",
- $registrant['reg_request_class']
- )
- );
- // Also need to fetch the email
- $email = $this->wpdb->get_var(
- $this->wpdb->prepare(
- "SELECT email
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
- WHERE id = %d",
- $registrant['account']
- )
- );
- if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) {
- $regTimeText = $this->wpdb->get_var(
+ // Also need to fetch the email
+ $email = $this->wpdb->get_var(
$this->wpdb->prepare(
- "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' )
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
+ "SELECT email
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
WHERE id = %d",
- $registrant['reg_time']
+ $registrant['account']
)
);
- $registrant['reg_time_text'] = $regTimeText;
- }
-
- // Setup the registrant for this level.
- $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname'];
- $registrant['class_id'] = $classId;
- $registrant['reg_class'] = $classId;
- $registrant['email'] = $email;
- $registrant['validated'] = $accountData['validated'];
- $registrant['addr1'] = $accountData['addr1'];
- $registrant['addr2'] = $accountData['addr2'];
- $registrant['city'] = $accountData['city'];
- $registrant['state'] = $accountData['state'];
- $registrant['zip'] = $accountData['zip'];
- $registrant['country'] = $accountData['country'];
- $registrant['reg_request'] = $rEvent['reg_request'];
- $registrants[] = $registrant;
- } // - End loop through for registrants array.
- }
-
- } // - End loop through rates.
- }
+ if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) {
+ $regTimeText = $this->wpdb->get_var(
+ $this->wpdb->prepare(
+ "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' )
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
+ WHERE id = %d",
+ $registrant['reg_time']
+ )
+ );
+ $registrant['reg_time_text'] = $regTimeText;
+ }
+
+ // Setup the registrant for this level.
+ $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname'];
+ $registrant['class_id'] = $classId;
+ $registrant['reg_class'] = $classId;
+ $registrant['email'] = $email;
+ $registrant['validated'] = $accountData['validated'];
+ $registrant['org'] = $accountData['org'];
+ $registrant['title'] = $accountData['title'];
+ $registrant['addr1'] = $accountData['addr1'];
+ $registrant['addr2'] = $accountData['addr2'];
+ $registrant['city'] = $accountData['city'];
+ $registrant['state'] = $accountData['state'];
+ $registrant['zip'] = $accountData['zip'];
+ $registrant['country'] = $accountData['country'];
+ $registrant['reg_request'] = $rEvent['reg_request'];
+ $registrants[] = $registrant;
+ } // - End loop through for registrants array.
+ }
+
+ } // - End loop through rates.
+ }
+
+ } // - End loop through classes.
+ }
- } // - End loop through classes.
- }
+ } // - End loop through events.
+ }
- } // - End loop through events.
- }
+ // If enabled, get list of registrants for this event
+ $registrantsList = false;
+ if ($this->config['settings']['reg_show_attendees_on_reg_page']) {
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php';
+ $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config);
+ $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname");
+ }
- // If enabled, get list of registrants for this event
- $registrantsList = false;
- if ($this->config['settings']['reg_show_attendees_on_reg_page']) {
- require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php';
- $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config);
- $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname");
}
- // echo "<pre>".print_r($registrantsList,1)."</pre>";
+
+
+ // echo "<pre>".print_r($registrants,1)."</pre>";
// Compile template data
$templateData = array(
'regEventId' => $regEventId,
'page' => 'registration',
'haveCart' => $haveCart,
+ 'haveRegEvent' => $haveRegEvent,
'regEvent' => $regEvent,
+ 'standAlone' => ($regEvent.event == 0),
'regEventFirstTime' => $regEventFirstTime,
'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js',
'regEventJSON' => json_encode( $event, JSON_NUMERIC_CHECK ),
== Changelog ==
= PENDING =
-* Added sort order for registration classes (levels)
+* Added sort order for registration classes (levels) - Drag and Drop
+* Added ability to create a Stand-Alone registrations event (Not tied to event in Events Add-On).
+* Added ability to hide registration events from front-end lists.
+* Added ability to select a registrations event by code.
+* Added ability to specify a registrations event on URL using registration event code rather than ID.
+* Added ability to go direct to a registrations event front-end page from admin registrations event dashboard.
+* Added more terms and phrases and updated defaults for those that didn't have them.
+* Added notification on registrations event dashboard for why a registrations event won't show up on front-end.
+* More intelligent selection of month initially displayed for calendar in dashboard for a specific event.
+* Displaying above calendar why the initial month displayed was selected. Hide after month change.
+* Added reg_bill_info_requested field to management for selection of checkout fields.
+* Defaulted reg_bill_info_requested field to all on to show all checkout fields by default.
+* Commented out management selection of checkout fields by payment type temporarily.
+* New Rate edit form now has default values.
+* Fixed a range of error log notices regarding undefined variables in models and views.
+* Removed "data" directory with code to inject original test data.
+* Fixed non-working "Read More" button on registration page.
+* Fixed incorrect "Total Charge" at bottom of checkout page when discount codes are applied.
+* Fixed bad dialog box layout due to CSS from Bootstrap
+* Fixed incorrect use of href in form tag
= 1.1.0 =
* Formal release for a range of front-end and admin improvement and fixes
* Checkout page now shows "Billing Information" if there are charges or "Contact Information" if there's no charge.
= 1.0.21 =
-* Added missing callback function for e-mail notices
+* Added missing callback function for e-mail notices
= 1.0.20 =
* Fixed date and time displayed for an event on registration page so it reflects only current or future dates and times.
* Fixed time displayed for an event on registration page so it no longer shows a range of times, only the time for the date shown.
* Added display of "(see below for other dates/times)" when there are more than the first date/time displayed on the registration page.
-* Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees.
+* Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees.
-= 1.0.19 =
+= 1.0.19 =
* Removed "Select" from progress bar on checkout page that leaked in from development work
= 1.0.18 =
* Now properly formatting checkout failure notices in request Notes field
* Added more list filtering and pagenation features to accounts and requests lists
* Now not showing requests that have no attendees in request admin list
-* Added more debug information to checout processing
+* Added more debug information to checout processing
= 1.0.17 =
* Fixed checkout error messages not showing on checkout page if not checkout page top text provided in settings
// Since we must not have had a good event ID or didn't find the event in registrations, return title and url to add this event to registrations
return array(
'title' => 'Add Registrations To Event',
- 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&option=add&event=".$eventId,
+ 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&&option=add&event=".$eventId,
'warning_title' => false,
'edit_warning' => '',
'update_warning' => ''
add_submenu_page(
'glm-members-admin-menu-members',
'Selected '.$this->config['terms']['reg_term_event_cap'],
- ' '.$this->config['terms']['reg_term_event_plur_cap'],
+ ' List',
'glm_members_members',
'glm-members-admin-menu-registrations-events',
function() {$this->controller('registrations', 'events');}
+++ /dev/null
--- Gaslight Media Registration Database
--- File Created: 01/18/2017 14:40:00
--- Database Version: 1.0.1
--- Database Creation Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
---
-/*
- * General Database Organization
- * -----------------------------
- *
- * management - General options and configuration - Site manager access only
- *
- * misc - Misc settings and text - Site owner may update
- *
- * payment codes - Promotional payment codes - Used with various things
- * --> Event, Submission, Event Registration, Event Registrant, Account or global
- *
- * reg_event - Describes registration for that event
- * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
- * reg_class - Type of registration for this event (one or more)
- * reg_rates - Date range / rate for a reg class (one or more)
- *
- * reg_account - Describes someone who submits / pays for a registration
- * Make these two things the same table....
- * registrant - A person who is registered for an event
- *
- * reg_request - Information on a specific request for registrations
- * reg_request_event - Event selected (one or more)
- * reg_request_class - Class of registration (one or more)
- * reg_request_rate - Specific registration date/rate (one or more)
- * reg_request_registrant - Registrant (one or more)
- *
- * NOTE: additional fields and added fields data will be coming from the Custom Fields add-on
- *
- * Overall Flow
- * ------------
- *
- * User selects an event
- * If the event has available registrations
- * User selects a date for the registration (or if only one that's selected automatically)
- * User can log back into registrations at this point if they've been there before and have a password, create an ccount, or continue as guest ???
- * User selects an available rate type and adds one or more registrants for that rate type
- * User may loop back to select additional rate type(s) and registrants
- * User may go back to date selection and request additional rate types and registrants for the addional dates
- * User may go back to select additional dates and do registrations for those dates as above
- * User may go back to select other events and do registrations for them as above
- * User may select the "Cart" and deselect something added to it
- * User may checkout
- *
- */
-
-/*
- * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
- * Lines commented out are selected for possible deletion.
- * The INSERT statements are not up-to-date with the tables.
- * The "config/plugin.ini" file in this plugin is also a work in progress.
- */
-
--- Management Options
--- General configurationm parameters for the Registrations application
--- Only one entry in this table!
-CREATE TABLE {prefix}management (
- id INT NOT NULL AUTO_INCREMENT,
- canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
- -- System Owner Information
- reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
- reg_org_short TINYTEXT NULL,
- reg_org_address TINYTEXT NULL,
- reg_org_city TINYTEXT NULL,
- reg_org_state TINYTEXT NULL,
- reg_org_zip TINYTEXT NULL,
- reg_org_phone TINYTEXT NULL,
- reg_org_toll_free TINYTEXT NULL,
- reg_org_internal_email TINYTEXT NULL,
- reg_org_from_email TINYTEXT NULL,
- reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
- reg_proc_methods SMALLINT NULL, -- Credit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini
- reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
- -- Authorize.net Credentials
- reg_authorize_net_login TINYTEXT NULL,
- reg_authorize_net_key TINYTEXT NULL,
- reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
- reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
- reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
- reg_authorize_net_merchant_seal TEXT NULL, -- Authorize.net Verified Merchant Seal code
- -- Merchant Solutions Credentials
- reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
- reg_merchant_solutions_merchantpin TINYTEXT NULL,
- reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
- reg_merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email
- reg_merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail
- -- PayPal Credentials
- reg_paypal_clientid TINYTEXT NULL, -- PayPal Client ID
- reg_paypal_secret TINYTEXT NULL, -- PayPal Secret
- reg_paypal_sandbox_clientid TINYTEXT NULL, -- PayPal Client ID
- reg_paypal_sandbox_secret TINYTEXT NULL, -- PayPal Secret
- reg_paypal_test TINYINT NULL, -- PayPal test mode - List - see
- -- Billing settings
- reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
- reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
- reg_bill_info_req_comp_code SMALLINT NULL,
- reg_bill_info_req_cash SMALLINT NULL,
- reg_bill_info_req_check SMALLINT NULL,
- reg_bill_info_req_credit_card SMALLINT NULL,
- reg_bill_info_req_merchant_call SMALLINT NULL,
- -- Misc Options
- reg_request_hold_days SMALLINT NULL, -- Number of days past last update that a request will be retained in "CART" status.
- reg_account_hold_days SMALLINT NULL, -- Number of days past last update that an account will be retained when there are no requests or registrants referring to it.
- reg_not_submitted_dialog BOOLEAN NULL, -- Flag to show page not submitted dialog boxes
- reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
- reg_show_navigation_aids BOOLEAN NULL, -- No, not marine navigational aids, this enables additional text, arrows, etc to direct a user to do something specific that would not normally be required.
- reg_show_attendees_on_reg_page BOOLEAN NULL, -- Flag to show a list of attendees on the registraitons page for an event
- PRIMARY KEY (id)
-);
-
-----
-
--- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
--- Terms in this table should be all self-explanatory
-CREATE TABLE {prefix}settings_terms (
- id INT NOT NULL AUTO_INCREMENT,
- reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
- reg_term_registration TINYTEXT NULL,
- reg_term_registration_cap TINYTEXT NULL,
- reg_term_registration_plur TINYTEXT NULL,
- reg_term_registration_plur_cap TINYTEXT NULL,
- reg_term_register TINYTEXT NULL,
- reg_term_register_cap TINYTEXT NULL,
- reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
- reg_term_registering TINYTEXT NULL,
- reg_term_registering_cap TINYTEXT NULL,
- reg_term_registered TINYTEXT NULL,
- reg_term_registered_cap TINYTEXT NULL,
- reg_term_attendee TINYTEXT NULL,
- reg_term_attendee_cap TINYTEXT NULL,
- reg_term_attendee_plur TINYTEXT NULL,
- reg_term_attendee_plur_cap TINYTEXT NULL,
- reg_term_attending TINYTEXT NULL,
- reg_term_attended TINYTEXT NULL,
- reg_term_registered_user TINYTEXT NULL,
- reg_term_registered_user_cap TINYTEXT NULL,
- reg_term_registered_user_plur TINYTEXT NULL,
- reg_term_registered_user_plur_cap TINYTEXT NULL,
- reg_term_event TINYTEXT NULL,
- reg_term_event_cap TINYTEXT NULL,
- reg_term_event_plur TINYTEXT NULL,
- reg_term_event_plur_cap TINYTEXT NULL,
- reg_term_id TINYTEXT NULL,
- reg_term_id_cap TINYTEXT NULL,
- reg_term_id_plur TINYTEXT NULL,
- reg_term_id_plur_cap TINYTEXT NULL,
- reg_term_level TINYTEXT NULL,
- reg_term_level_cap TINYTEXT NULL,
- reg_term_level_plur TINYTEXT NULL,
- reg_term_level_plur_cap TINYTEXT NULL,
- reg_term_password TINYTEXT NULL,
- reg_term_password_cap TINYTEXT NULL,
- reg_term_password_plur TINYTEXT NULL,
- reg_term_password_plur_cap TINYTEXT NULL,
- reg_term_instructor TINYTEXT NULL,
- reg_term_instructor_cap TINYTEXT NULL,
- reg_term_instructor_plur TINYTEXT NULL,
- reg_term_instructor_plur_cap TINYTEXT NULL,
- reg_term_payment_code TINYTEXT NULL,
- reg_term_payment_code_cap TINYTEXT NULL,
- reg_term_payment_code_plur TINYTEXT NULL,
- reg_term_payment_code_plur_cap TINYTEXT NULL,
- reg_term_registration_button TINYTEXT NULL,
- reg_term_contact_information TINYTEXT NULL,
- reg_term_button_event_list TINYTEXT NULL,
- reg_term_button_login_or_create TINYTEXT NULL,
- reg_term_button_create_account TINYTEXT NULL,
- reg_term_button_login TINYTEXT NULL,
- reg_term_button_logout TINYTEXT NULL,
- reg_term_button_add_attendee TINYTEXT NULL,
- reg_term_button_save_attendee TINYTEXT NULL,
- reg_term_button_attendee_page_continue TINYTEXT NULL,
- reg_term_button_apply_comp_code TINYTEXT NULL,
- reg_term_button_cart_page_continue TINYTEXT NULL,
- reg_term_button_checkout_page_submit TINYTEXT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Misc system-wide customer configurable configuration
--- Various text and flags to be configured by customer
--- Only one entry in this table!
-CREATE TABLE {prefix}misc (
- id INT NOT NULL AUTO_INCREMENT,
- reg_bulletin TEXT NULL, -- Text to display at top of first registration page
- cart_page_text TEXT NULL, -- Text to display at top of cart page
- checkout_page_text TEXT NULL, -- Text to display at top of checkout page
- summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
- reg_terms TEXT NULL, -- Registration terms and conditions
- notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
- notify_text TEXT NULL, -- Notification E-Mail text for site owner
- instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
- instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
- submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
- submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
- registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
- registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
- submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
- submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
- registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
- registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
- PRIMARY KEY (id)
-);
-
-----
-
--- Payment Codes
--- Promotional payment codes for free/discounted payment
-CREATE TABLE {prefix}payment_code (
- id INT NOT NULL AUTO_INCREMENT,
- code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
- ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
- ref_dest INT NULL, -- Pointer to the specific entity of ref_type
- code TINYTEXT NULL, -- Text code user must enter to use
- amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
- expire_date DATE NULL, -- Expiration Date
- descr TEXT NULL,
- PRIMARY KEY (id),
- INDEX (ref_dest),
- INDEX (code(10))
-);
-
-----
-
--- Registration event specific information
--- One record for each event in Events add-on
--- Only created when an event is selected to offer registrations
-CREATE TABLE {prefix}reg_event (
- id INT NOT NULL AUTO_INCREMENT,
- event INT NULL, -- Pointer to event in Events add-on - False if event record in Events add-on no longer exists
- event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
- event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for
- notify_email TINYTEXT NULL, -- E-Mail addresses to receive notification of a registration other than org_internal_email in management, comma separated
- admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
- active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations and notifications
- time_specific BOOLEAN NULL, -- Registration for this event is not date/time specific. Can attend any date/time of event.
- attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
- attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
- attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
- reg_hold_minutes MEDIUMINT NULL, -- Number of minutes hold time for an inactive cart before registrant count hold expires (after which cart attempts to hold again on next access)
- cart_hold_days MEDIUMINT NULL, -- NO LONGER IN USE - Number of days hold time for inactive cart before cart is purged
- reg_hours_before MEDIUMINT NULL, -- Number of hours before an event that is the latest a registration may be submitted.
- registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
- payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
- restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
- descr TEXT NULL, -- Registrations specific description field for this event
- terms TEXT NULL, -- Terms and Conditions for registration
- first_datetime DATETIME NULL, -- Start of first listed date/time for this event
- last_datetime DATETIME NULL, -- Start of last listed date/time for this event
- reg_file TINYTEXT NULL, -- Name of a downloadable file
- reg_file_title TINYTEXT NULL, -- Title for downloadable file
- form_revision SMALLINT NULL, -- Current MagicForm form revision
- notes TEXT NULL, -- System operator's notes for this event - Not visible to users
- PRIMARY KEY (id),
- INDEX (event),
- INDEX (event_code(10))
-);
-
-----
-
--- Registration Event Time - Information and summary data for a specific event instance (relates to a particular time record in events)
--- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
--- These are created the first time a person tries to register for an event instance (time)
--- One or more for each event
-CREATE TABLE {prefix}reg_time (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Flag. True if registrations is available for this time
- non_time_specific BOOLEAN NULL, -- Flag. True if this is a pseudo time for non-time-specific events - Other informational times for the event will have this flag off
- reg_event INT NULL, -- Pointer to reg_event table
- event_time INT NULL, -- ID of events times table entry in Events add-on - If false (0), then this is a pseudo entry to use for all registrations (non-date/time specific)
- start_datetime DATETIME NULL, -- Date and time when event instance starts
- end_datetime DATETIME NULL, -- Date and time when event instance ends
- all_day BOOLEAN NULL, -- All Day flag - Informational
- attendees BOOLEAN NULL, -- Flag if tracking attendees or if only one per registration submission (registers account submitting) - get from reg_event
- attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
- attendee_count MEDIUMINT NULL, -- Current attendee count - calculated on the fly and stored here for reference
- attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
- attendees_available MEDIUMINT NULL, -- Currently available attendee count (limit - registered - pending)
- total_base_charge DOUBLE NULL, -- Total base charges
- total_per_attendee DOUBLE NULL, -- Total per-attendee charges
- total_other DOUBLE NULL, -- Total other charges (meals, extras, fees, ...)
- total_taxes DOUBLE NULL, -- Total taxes charged
- total_charges DOUBLE NULL, -- Total charges (sum of all above)
- total_discounts DOUBLE NULL, -- Total discounts of all types (applied payment codes, etc...)
- total_payments DOUBLE NULL, -- Total net payments (total charges - total discounts)
- descr TEXT NULL, -- Optional description field for this time entry
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (event_time),
- INDEX (start_datetime)
-);
-
-----
-
--- Pending Attendees - In carts but not checked out
--- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
--- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
--- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
-CREATE TABLE {prefix}reg_time_pending (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- reg_time INT NULL, -- ID of time record
- registrant INT NULL, -- ID of reg_request_registrant record --
- expire_time DATETIME NULL, -- Time at which this hold expires
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_time)
-);
-
-----
-
--- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
--- One or more for each event
-CREATE TABLE {prefix}reg_class (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- name TINYTEXT NULL, -- Name of this registration type
- descr TEXT NULL, -- Description
- sort_order INT DEFAULT 999, -- Sort order for display in Front-End
- PRIMARY KEY (id),
- INDEX (reg_event)
-);
-
-----
-
--- Rates and dates for a particular reg_class
--- One or more per reg_class - **** Days should not overlap for a particular reg_class
-CREATE TABLE {prefix}reg_rate (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- reg_class INT NULL, -- Pointer to reg_class table
- name TINYTEXT NULL, -- Name of this rate
- start_days INT NULL, -- # of days before event time rate becomes available - may be selected as a date then converted for storage
- end_days INT NULL, -- # of days before event time rate becomes unavailable
- base_rate FLOAT, -- Base rate to register
- per_registrant FLOAT, -- Rate per registrant
- registrant_credits TINYINT NULL, -- Number of registrants included in base rate
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_class)
-);
-
-----
-
--- Notifications
--- None or more for each reg event
-CREATE TABLE {prefix}reg_notification (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- name TINYTEXT NULL, -- Name of this notification
- notification_days INT NULL, -- # of days before or after event that notification takes place (- before, + after)
- message TEXT NULL, -- Content of message (uses template parameters to merge event/attendee data)
- PRIMARY KEY (id),
- INDEX (reg_event)
-);
-
-----
-
--- Notification Queue
-CREATE TABLE {prefix}notification_queue (
- id INT NOT NULL AUTO_INCREMENT,
- reg_notification INT NOT NULL, -- Pointer to the reg_notification table
- account INT NOT NULL, -- Pointer to the account table
- queued_time DATETIME NOT NULL, -- Creation time
- processed_time DATETIME NULL, -- The time this queue was processed. (sent out)
- to_email TINYTEXT NOT NULL, -- The To email address
- from_email TINYTEXT NOT NULL, -- The From email address
- subject TINYTEXT NOT NULL, -- The subject
- html_message TEXT NOT NULL, -- The complete html message
- PRIMARY KEY (id)
-);
-
-----
-
--- An account for a person submitting a registration or a registrant for an event
--- Depending on the use of these entries may not have all data included
--- A single account may be referenced as a person submitting registrations and/or a person registered for an event
-CREATE TABLE {prefix}account (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
- validated BOOLEAN NULL, -- Flag indicating that the account has been validated - Set to false when recovering password
- validation_code TINYTEXT NULL, -- Validation code and timestamp ("{validation code}-{timestamp}) - Clear this after validation
- registered_by INT NULL, -- Account *** THIS FIELD NEEDS TO BE DELETED ***
- member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID - See "contact_member_id" below)
- fname TINYTEXT NULL, -- Account primary address
- lname TINYTEXT NULL,
- org TINYTEXT NULL,
- title TINYTEXT NULL,
- addr1 TINYTEXT NULL,
- addr2 TINYTEXT NULL,
- city TINYTEXT NULL,
- state TINYTEXT NULL,
- zip TINYTEXT NULL,
- country TINYTEXT NULL,
- phone TINYTEXT NULL,
- fax TINYTEXT NULL,
- bill_fname TINYTEXT NULL, -- Last used billing infodeletermation - Also stored in each registration request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- bill_phone TINYTEXT NULL,
- bill_fax TINYTEXT NULL,
- email TINYTEXT NULL,
- password TINYTEXT NULL, -- Crypted password for login back into this account
- email_ok BOOLEAN NULL,
- is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
- customer_profile_id TINYTEXT NULL, -- Stored Credit Card customer profile ID
- payment_profile_id TINYTEXT NULL, -- Stored Credit Card payment profile ID
- payment_profile_card TINYTEXT NULL, -- Stored Credit Card last card digits
- contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
- contact_member_id INT NULL, -- Pointer to GLM Associate Member for this contact
- contact_fname TINYTEXT NULL,
- contact_lname TINYTEXT NULL,
- contact_org TINYTEXT NULL,
- contact_title TINYTEXT NULL,
- contact_addr1 TINYTEXT NULL,
- contact_addr2 TINYTEXT NULL,
- contact_city TINYTEXT NULL,
- contact_state TINYTEXT NULL,
- contact_zip TINYTEXT NULL,
- contact_country TINYTEXT NULL,
- contact_phone TINYTEXT NULL,
- contact_fax TINYTEXT NULL,
- contact_email TINYTEXT NULL,
- contact_email_ok BOOLEAN NULL,
- guardian TINYTEXT NULL,
- emer_contact TINYTEXT NULL,
- emer_phone TINYTEXT NULL,
- med_history TINYTEXT NULL,
- allergy_med TINYTEXT NULL,
- date_created DATE NULL,
- notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
- user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
- PRIMARY KEY (id),
- INDEX (registered_by),
- INDEX (member_id(10)),
- INDEX (fname(10)),
- INDEX (lname(10)),
- INDEX (org(10)),
- INDEX (city(10)),
- INDEX (state(5)),
- INDEX (zip(5)),
- INDEX (email(10)),
- INDEX (contact_id)
-);
-
-----
-
--- A request for registration
--- Has one or more reg_detail records associated with it
-CREATE TABLE {prefix}reg_request (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations. If 0 then guest request (prior to checkout)
- validated BOOLEAN NULL, -- Flag that indicates if request passed last validation with checkRegistrationRequest()
- validation_message TEXT NULL, -- Reasons that request did not pass validation with checkRegistrationRequest() - Serialized array
- bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- bill_phone TINYTEXT NULL,_class
- bill_email TINYTEXT NULL,
- date_submitted DATE NULL, -- Date of final submission (checkout complete)
- pay_method INT NULL, -- See payment_method in plugin.ini
- payment_code TINYTEXT NULL, -- Payment_code text (comp code) - if submitted and validated
- status SMALLINT NULL, -- See submission_status in plugin.ini
- total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
- total_discounts DOUBLE PRECISION NULL, -- Total of all comps and discounts
- registrants SMALLINT NULL, -- Total number of registrants in this cart
- cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
- cc_name TINYTEXT NULL, -- Name on Credit Card or Name on Check
- cc_numb TINYTEXT NULL, -- Credit Card Number or Check Number
- cc_exp TINYTEXT NULL,
- cc_cvv TINYTEXT NULL,
- cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
- cc_proc_mesg TINYTEXT NULL, -- Message received from payment processor
- summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- user_trace_info TEXT NULL, -- IP Address of user computer and timestamp
- date_created DATETIME NULL, -- Date request was first created
- last_update DATETIME NULL, -- Last update date/time - Used for timing out pending carts and attendee counts
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (date_submitted)
-);
-
-----
-
--- Registration for a specific event
--- Has one or more reg_selected_rate records associated with it
-CREATE TABLE {prefix}reg_request_event (
- id INT NOT NULL AUTO_INCREMENT,
- reg_request INT NULL, -- Pointer to reg_request table
- reg_event INT NULL, -- Pointer to reg_event
- event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_request),
- INDEX (reg_event)
-);
-
-----
-
--- A particular reg_class selected
--- Has one or more reg_request_rate records associated with it
-CREATE TABLE {prefix}reg_request_class (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- class INT NULL, -- Pointer to event reg_class table - False (0) if registration class no longer exits
- class_name TINYTEXT NULL, -- Name of event class at the time selected
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_request_event)
-);
-
-----
-
--- A particular reg_rate selected
--- Has one or more reg_request_registrant records associated with it
-CREATE TABLE {prefix}reg_request_rate (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- rate INT NULL, -- Pointer to event reg_rate table - False (0) if registration rate no longer exists
- rate_name TINYTEXT NULL, -- Name of event class rate at the time selected
- base_rate FLOAT, -- Base rate at time of registration
- per_registrant FLOAT, -- Per Registrant Rate at time of registration
- registrant_credits TINYINT NULL, -- Number of registrants included in base rate at time of registration
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_request_event),
- INDEX (reg_request_class)
-);
-
-----
-
--- A specific registrant for a selected registration rate
-CREATE TABLE {prefix}reg_request_registrant (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to the account entry for the person being registered - False (0) if account no longer exists or registrant account not needed
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_time INT NULL, -- Pointer reg_time entry
- event_datetime DATETIME NULL, -- Date and time of event time selected so it will always be in the cart
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
- not_attending BOOLEAN DEFAULT false, -- Flag to say if registrant is not attending - set to true when not attending
- fname TINYTEXT NULL, -- First name of registrant at the time of selection
- lname TINYTEXT NULL, -- Last name of registrant at the time of selection
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (reg_event),
- INDEX (reg_time),
- INDEX (reg_request),
- INDEX (reg_request_event),
- INDEX (reg_request_class),
- INDEX (reg_request_rate)
-);
-
-----
-
--- A specific use of a payment code in this request
-CREATE TABLE {prefix}reg_request_pay_code (
- id INT NOT NULL AUTO_INCREMENT,
- payment_code INT NULL, -- Pointer to payment code
- code TINYTEXT NULL, -- Copy of Payment Code text in case payment code is deleted or changed
- reg_request INT NULL, -- Pointer to the registration request record
- credit DOUBLE PRECISION NULL, -- Total credit for this payment code
- expire_date DATE NULL, -- Expiration Date - NOT USING NOW - Getting from payment_code table always
- PRIMARY KEY (id),
- INDEX (payment_code),
- INDEX (reg_request)
-);
-
-----
-
--- Insert into management table
-INSERT INTO {prefix}management
- (
- canonical_reg_page,
- reg_org_name,
- reg_org_short,
- reg_org_address,
- reg_org_city,
- reg_org_state,
- reg_org_zip,
- reg_org_phone,
- reg_org_toll_free,
- reg_org_internal_email,
- reg_org_from_email,
- reg_payment_methods,
- reg_proc_methods,
- reg_cc_accepts,
- reg_authorize_net_login,
- reg_authorize_net_key,
- reg_authorize_net_test,
- reg_authorize_net_conf,
- reg_authorize_net_merchant_email,
- reg_merchant_solutions_acctid,
- reg_merchant_solutions_merchantpin,
- reg_merchant_solutions_test,
- reg_full_billing_info,
- reg_bill_info_req_no_charge,
- reg_bill_info_req_comp_code,
- reg_bill_info_req_cash,
- reg_bill_info_req_check,
- reg_bill_info_req_credit_card,
- reg_bill_info_req_merchant_call,
- reg_medical_info
- )
- VALUES
- (
- 'registrations', -- reg_canonical_reg_page,
- 'Gaslight Media', -- reg_org_name,
- 'GLM', -- reg_org_short,
- '120 E. Lake St.', -- reg_org_address,
- 'Petoskey', -- reg_org_city,
- 'MI', -- reg_org_state,
- '49770', -- reg_org_zip,
- '231-487-0692', -- reg_org_phone,
- '800-123-1234', -- reg_org_toll_free,
- 'internal@gaslightmedia.com', -- reg_org_internal_email,
- 'info@gaslightmedia.com', -- reg_org_from_email,
- 0, -- reg_payment_methods,
- 0, -- reg_proc_methods,
- 0, -- reg_cc_accepts,
- '', -- reg_authorize_net_login,
- '', -- reg_authorize_net_key,
- 1, -- reg_authorize_net_test,
- true, -- reg_authorize_net_conf
- '', -- reg_authorize_net_merchant_email,
- '', -- reg_merchant_solutions_acctid,
- '', -- reg_merchant_solutions_merchantpin,
- 1, -- reg_merchant_solutions_test,
- true, -- reg_full_billing_info,
- 0, -- reg_bill_info_req_no_charge,
- 0, -- reg_bill_info_req_comp_code,
- 0, -- reg_bill_info_req_cash,
- 0, -- reg_bill_info_req_check,
- 0, -- reg_bill_info_req_credit_card,
- 0, -- reg_bill_info_req_merchant_call,
- true -- reg_medical_info,
- );
-
-----
-
--- Insert into settings_terms table
-INSERT INTO {prefix}settings_terms
- (
- reg_term_registrations_name,
- reg_term_registration,
- reg_term_registration_cap,
- reg_term_registration_plur,
- reg_term_registration_plur_cap,
- reg_term_register,
- reg_term_register_cap,
- reg_term_registers,
- reg_term_registering,
- reg_term_registering_cap,
- reg_term_registered,
- reg_term_registered_cap,
- reg_term_attendee,
- reg_term_attendee_cap,
- reg_term_attendee_plur,
- reg_term_attendee_plur_cap,
- reg_term_attending,
- reg_term_attended,
- reg_term_registered_user,
- reg_term_registered_user_cap,
- reg_term_registered_user_plur,
- reg_term_registered_user_plur_cap,
- reg_term_event,
- reg_term_event_cap,
- reg_term_event_plur,
- reg_term_event_plur_cap,
- reg_term_id,
- reg_term_id_cap,
- reg_term_id_plur,
- reg_term_id_plur_cap,
- reg_term_password,
- reg_term_password_cap,
- reg_term_password_plur,
- reg_term_password_plur_cap,
- reg_term_instructor,
- reg_term_instructor_cap,
- reg_term_instructor_plur,
- reg_term_instructor_plur_cap,
- reg_term_payment_code,
- reg_term_payment_code_cap,
- reg_term_payment_code_plur,
- reg_term_payment_code_plur_cap,
- reg_term_registration_button,
- reg_term_contact_information
- )
- VALUES
- (
- 'Event Registrations', -- reg_term_registrations_name
- 'registration', -- reg_term_registration
- 'Registration', -- reg_term_registration_cap
- 'registrations', -- reg_term_registration_plur
- 'Registrations', -- reg_term_registration_plur_cap
- 'register', -- reg_term_registe
- 'Register', -- reg_term_register_cap
- 'registers', -- reg_term_registers
- 'registering', -- reg_term_registering
- 'Registering', -- reg_term_registering_cap
- 'registered', -- reg_term_registered
- 'Registered', -- reg_term_registered_cap
- 'attendee', -- reg_term_attendee
- 'Attendee', -- reg_term_attendee_cap
- 'attendees', -- reg_term_attendee_plur
- 'Attendees', -- reg_term_attendee_plur_cap
- 'attending', -- reg_term_attending
- 'attended', -- reg_term_attended
- 'user', -- reg_term_registered_user
- 'User', -- reg_term_registered_user_cap
- 'users', -- reg_term_registered_user_plur
- 'Users', -- reg_term_registered_user_plur_cap
- 'event', -- reg_term_event
- 'Event', -- reg_term_event_cap
- 'events', -- reg_term_event_plur
- 'Events', -- reg_term_event_plur_cap
- 'ID', -- reg_term_id
- 'ID', -- reg_term_id_cap
- 'IDs', -- reg_term_id_plur
- 'IDs', -- reg_term_id_plur_cap
- 'password', -- reg_term_password
- 'passwords', -- reg_term_password_cap
- 'Password', -- reg_term_password_plur
- 'Passwords', -- reg_term_password_plur_cap
- 'instructor', -- reg_term_instructor
- 'Instructor', -- reg_term_instructor_cap
- 'instructors', -- reg_term_instructor_plur
- 'Instructors', -- reg_term_instructor_plur_cap
- 'payment code', -- reg_term_payment_code
- 'Payment code', -- reg_term_payment_code_cap
- 'payment codes', -- reg_term_payment_code_plur
- 'Payment codes', -- reg_term_payment_code_plur_cap
- 'Register for Event', -- reg_term_registration_button
- 'Contact Information' -- reg_term_contact_information
- );
-
-----
-
--- Insert into misc table
-INSERT INTO {prefix}misc
- (
- reg_bulletin,
- cart_page_text,
- checkout_page_text,
- summary_page_text,
- reg_terms,
- notify_subject,
- notify_text,
- instr_notify_subject,
- instr_notify_text,
- submission_notify_subject,
- submission_notify_text,
- registrant_notify_subject,
- registrant_notify_text,
- submission_ack_subject,
- submission_ack_text,
- registrant_ack_subject,
- registrant_ack_text
- )
- VALUES
- (
- 'Registration Bulletin Text',
- 'Text for top of Cart Page',
- 'Text for top of Checkout Page',
- 'Text for top of Summary Page',
- 'Terms and Conditions',
- 'Registration Request Submitted',
- 'A registration request has just been submitted to your site.
-
-Sincerely,
-
-{$OrgName}
-{$OrgAddress}
-{$OrgCity}, {$OrgState} {$OrgZip}
-{$OrgPhone}
-{$OrgEmail}
-
-{$Summary}
-
-',
- 'Registration Submitted for {$EventName}',
- 'The following people were just registered for {$EventName}...
-
-{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$a.AttendeeLastName}
-{/foreach}
-',
- 'Registration Request Submitted',
- 'Thank you for submitting your event registration request.
-
-Below is a summary of your submission. Please contact us if you have any questions regarding this request.
-
-{$summary}',
- 'Your Registration for: {$EventName}',
- 'You have been registered for {$EventName} by {$SubmittedByFirstName} {$SubmittedByLastName}.
-
-Please let us know if you have any questions regarding your registration for this event.
-',
- 'Registration Request Updated',
- 'THIS MESSAGE TYPE IS NOT YET FUNCTIONAL
-
-The status of your registration request submitted on {$DateTimeSubmitted} has been updated to "{$Status}".
-
-Below is a copy of the request at the time it was submitted.
-
-{$Summary}',
- 'Your payment status for the event you are attending has been updated',
- 'TTHIS MESSAGE TYPE IS NOT YET FUNCTIONAL'
- );
--- /dev/null
+-- Gaslight Media Registration Database
+-- File Created: 01/18/2017 14:40:00
+-- Database Version: 1.0.1
+-- Database Creation Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+--
+/*
+ * General Database Organization
+ * -----------------------------
+ *
+ * management - General options and configuration - Site manager access only
+ *
+ * misc - Misc settings and text - Site owner may update
+ *
+ * payment codes - Promotional payment codes - Used with various things
+ * --> Event, Submission, Event Registration, Event Registrant, Account or global
+ *
+ * reg_event - Describes registration for that event
+ * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
+ * reg_class - Type of registration for this event (one or more)
+ * reg_rates - Date range / rate for a reg class (one or more)
+ *
+ * reg_account - Describes someone who submits / pays for a registration
+ * Make these two things the same table....
+ * registrant - A person who is registered for an event
+ *
+ * reg_request - Information on a specific request for registrations
+ * reg_request_event - Event selected (one or more)
+ * reg_request_class - Class of registration (one or more)
+ * reg_request_rate - Specific registration date/rate (one or more)
+ * reg_request_registrant - Registrant (one or more)
+ *
+ * NOTE: additional fields and added fields data will be coming from the Custom Fields add-on
+ *
+ * Overall Flow
+ * ------------
+ *
+ * User selects an event
+ * If the event has available registrations
+ * User selects a date for the registration (or if only one that's selected automatically)
+ * User can log back into registrations at this point if they've been there before and have a password, create an ccount, or continue as guest ???
+ * User selects an available rate type and adds one or more registrants for that rate type
+ * User may loop back to select additional rate type(s) and registrants
+ * User may go back to date selection and request additional rate types and registrants for the addional dates
+ * User may go back to select additional dates and do registrations for those dates as above
+ * User may go back to select other events and do registrations for them as above
+ * User may select the "Cart" and deselect something added to it
+ * User may checkout
+ *
+ */
+
+/*
+ * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
+ * Lines commented out are selected for possible deletion.
+ * The INSERT statements are not up-to-date with the tables.
+ * The "config/plugin.ini" file in this plugin is also a work in progress.
+ */
+
+-- Management Options
+-- General configurationm parameters for the Registrations application
+-- Only one entry in this table!
+CREATE TABLE {prefix}management (
+ id INT NOT NULL AUTO_INCREMENT,
+ canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
+ -- System Owner Information
+ reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
+ reg_org_short TINYTEXT NULL,
+ reg_org_address TINYTEXT NULL,
+ reg_org_city TINYTEXT NULL,
+ reg_org_state TINYTEXT NULL,
+ reg_org_zip TINYTEXT NULL,
+ reg_org_phone TINYTEXT NULL,
+ reg_org_toll_free TINYTEXT NULL,
+ reg_org_internal_email TINYTEXT NULL,
+ reg_org_from_email TINYTEXT NULL,
+ reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
+ reg_proc_methods SMALLINT NULL, -- Credit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini
+ reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
+ -- Authorize.net Credentials
+ reg_authorize_net_login TINYTEXT NULL,
+ reg_authorize_net_key TINYTEXT NULL,
+ reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
+ reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
+ reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
+ reg_authorize_net_merchant_seal TEXT NULL, -- Authorize.net Verified Merchant Seal code
+ -- Merchant Solutions Credentials
+ reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
+ reg_merchant_solutions_merchantpin TINYTEXT NULL,
+ reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
+ reg_merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email
+ reg_merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail
+ -- PayPal Credentials
+ reg_paypal_clientid TINYTEXT NULL, -- PayPal Client ID
+ reg_paypal_secret TINYTEXT NULL, -- PayPal Secret
+ reg_paypal_sandbox_clientid TINYTEXT NULL, -- PayPal Client ID
+ reg_paypal_sandbox_secret TINYTEXT NULL, -- PayPal Secret
+ reg_paypal_test TINYINT NULL, -- PayPal test mode - List - see
+ -- Billing settings
+ reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
+ reg_bill_info_requested SMALLINT 32767, -- Billing information fields to display on checkout page
+ reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
+ reg_bill_info_req_comp_code SMALLINT NULL,
+ reg_bill_info_req_cash SMALLINT NULL,
+ reg_bill_info_req_check SMALLINT NULL,
+ reg_bill_info_req_credit_card SMALLINT NULL,
+ reg_bill_info_req_merchant_call SMALLINT NULL,
+ -- Misc Options
+ reg_request_hold_days SMALLINT NULL, -- Number of days past last update that a request will be retained in "CART" status.
+ reg_account_hold_days SMALLINT NULL, -- Number of days past last update that an account will be retained when there are no requests or registrants referring to it.
+ reg_not_submitted_dialog BOOLEAN NULL, -- Flag to show page not submitted dialog boxes
+ reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
+ reg_show_navigation_aids BOOLEAN NULL, -- No, not marine navigational aids, this enables additional text, arrows, etc to direct a user to do something specific that would not normally be required.
+ reg_show_attendees_on_reg_page BOOLEAN NULL, -- Flag to show a list of attendees on the registraitons page for an event
+ reg_show_select_by_code BOOLEAN NULL, -- Flag to show an Event Code entry form on Registrations Event List page
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
+-- Terms in this table should be all self-explanatory
+CREATE TABLE {prefix}settings_terms (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
+ reg_term_registration TINYTEXT NULL,
+ reg_term_registration_cap TINYTEXT NULL,
+ reg_term_registration_plur TINYTEXT NULL,
+ reg_term_registration_plur_cap TINYTEXT NULL,
+ reg_term_register TINYTEXT NULL,
+ reg_term_register_cap TINYTEXT NULL,
+ reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
+ reg_term_registering TINYTEXT NULL,
+ reg_term_registering_cap TINYTEXT NULL,
+ reg_term_registered TINYTEXT NULL,
+ reg_term_registered_cap TINYTEXT NULL,
+ reg_term_attendee TINYTEXT NULL,
+ reg_term_attendee_cap TINYTEXT NULL,
+ reg_term_attendee_plur TINYTEXT NULL,
+ reg_term_attendee_plur_cap TINYTEXT NULL,
+ reg_term_attending TINYTEXT NULL,
+ reg_term_attended TINYTEXT NULL,
+ reg_term_registered_user TINYTEXT NULL,
+ reg_term_registered_user_cap TINYTEXT NULL,
+ reg_term_registered_user_plur TINYTEXT NULL,
+ reg_term_registered_user_plur_cap TINYTEXT NULL,
+ reg_term_event TINYTEXT NULL,
+ reg_term_event_cap TINYTEXT NULL,
+ reg_term_event_plur TINYTEXT NULL,
+ reg_term_event_plur_cap TINYTEXT NULL,
+ reg_term_id TINYTEXT NULL,
+ reg_term_id_cap TINYTEXT NULL,
+ reg_term_id_plur TINYTEXT NULL,
+ reg_term_id_plur_cap TINYTEXT NULL,
+ reg_term_level TINYTEXT NULL,
+ reg_term_level_cap TINYTEXT NULL,
+ reg_term_level_plur TINYTEXT NULL,
+ reg_term_level_plur_cap TINYTEXT NULL,
+ reg_term_rate TINYTEXT NULL,
+ reg_term_rate_cap TINYTEXT NULL,
+ reg_term_rate_plur TINYTEXT NULL,
+ reg_term_rate_plur_cap TINYTEXT NULL,
+ reg_term_password TINYTEXT NULL,
+ reg_term_password_cap TINYTEXT NULL,
+ reg_term_password_plur TINYTEXT NULL,
+ reg_term_password_plur_cap TINYTEXT NULL,
+ reg_term_instructor TINYTEXT NULL,
+ reg_term_instructor_cap TINYTEXT NULL,
+ reg_term_instructor_plur TINYTEXT NULL,
+ reg_term_instructor_plur_cap TINYTEXT NULL,
+ reg_term_payment_code TINYTEXT NULL,
+ reg_term_payment_code_cap TINYTEXT NULL,
+ reg_term_payment_code_plur TINYTEXT NULL,
+ reg_term_payment_code_plur_cap TINYTEXT NULL,
+ reg_term_registration_button TINYTEXT NULL,
+ reg_term_contact_information TINYTEXT NULL,
+ reg_term_button_event_list TINYTEXT NULL,
+ reg_term_button_login_or_create TINYTEXT NULL,
+ reg_term_button_create_account TINYTEXT NULL,
+ reg_term_button_login TINYTEXT NULL,
+ reg_term_button_logout TINYTEXT NULL,
+ reg_term_button_add_attendee TINYTEXT NULL,
+ reg_term_button_save_attendee TINYTEXT NULL,
+ reg_term_button_attendee_page_continue TINYTEXT NULL,
+ reg_term_button_apply_comp_code TINYTEXT NULL,
+ reg_term_button_cart_page_continue TINYTEXT NULL,
+ reg_term_button_checkout_page_submit TINYTEXT NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Misc system-wide customer configurable configuration
+-- Various text and flags to be configured by customer
+-- Only one entry in this table!
+CREATE TABLE {prefix}misc (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_bulletin TEXT NULL, -- Text to display at top of first registration page
+ cart_page_text TEXT NULL, -- Text to display at top of cart page
+ checkout_page_text TEXT NULL, -- Text to display at top of checkout page
+ summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
+ reg_terms TEXT NULL, -- Registration terms and conditions
+ notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
+ notify_text TEXT NULL, -- Notification E-Mail text for site owner
+ instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
+ instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
+ submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
+ submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
+ registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
+ registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
+ submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
+ submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
+ registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
+ registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Payment Codes
+-- Promotional payment codes for free/discounted payment
+CREATE TABLE {prefix}payment_code (
+ id INT NOT NULL AUTO_INCREMENT,
+ code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
+ ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
+ ref_dest INT NULL, -- Pointer to the specific entity of ref_type
+ code TINYTEXT NULL, -- Text code user must enter to use
+ amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
+ expire_date DATE NULL, -- Expiration Date
+ descr TEXT NULL,
+ PRIMARY KEY (id),
+ INDEX (ref_dest),
+ INDEX (code(10))
+);
+
+----
+
+-- Registration event specific information
+-- One record for each event in Events add-on
+-- Only created when an event is selected to offer registrations
+CREATE TABLE {prefix}reg_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ event INT NULL, -- Pointer to event in Events add-on - 0 (false) if stand-alone regsitrations event
+ event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
+ event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for
+ notify_email TINYTEXT NULL, -- E-Mail addresses to receive notification of a registration other than org_internal_email in management, comma separated
+ admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
+ active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations and notifications
+ time_specific BOOLEAN NULL, -- Registration for this event is date/time specific. If not can attend any date/time of event.
+ not_included_in_lists BOOLEAN NULL, -- This registration event is not displayed in lists of registration events.
+ attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
+ attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
+ attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
+ reg_hold_minutes MEDIUMINT NULL, -- Number of minutes hold time for an inactive cart before registrant count hold expires (after which cart attempts to hold again on next access)
+ cart_hold_days MEDIUMINT NULL, -- NO LONGER IN USE - Number of days hold time for inactive cart before cart is purged
+ reg_hours_before MEDIUMINT NULL, -- Number of hours before an event that is the latest a registration may be submitted.
+ registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
+ payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
+ restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
+ descr TEXT NULL, -- Registrations specific description field for this event
+ terms TEXT NULL, -- Terms and Conditions for registration
+ first_datetime DATETIME NULL, -- Start of first listed date/time for this event
+ last_datetime DATETIME NULL, -- Start of last listed date/time for this event
+ reg_file TINYTEXT NULL, -- Name of a downloadable file
+ reg_file_title TINYTEXT NULL, -- Title for downloadable file
+ form_revision SMALLINT NULL, -- Current MagicForm form revision
+ notes TEXT NULL, -- System operator's notes for this event - Not visible to users
+ -- Fields below are for stand-alonge registrations events only.
+ -- If not stand-alone, this data comes from the event.
+ image TINYTEXT NULL, -- Event Image
+ cost TINYTEXT NULL, -- Description of event cost
+ hide_address BOOLEAN NULL, -- Option to hide address on front-end
+ use_member_location BOOLEAN NULL, -- Use location of the member (if provided) rather than location table data
+ member INT NULL, -- Set location of the event to another member
+ location_name TINYTEXT NULL, -- Name of location
+ address TINYTEXT NULL, -- Street Address
+ city INT NULL, -- Pointer to city - references main plugin city table
+ state TINYTEXT NULL, -- Two character state abbreviation
+ zip TINYTEXT NULL, -- ZIP/Postal code
+ country TINYTEXT NULL, -- Country Code
+ lat FLOAT NULL, -- Latitude of location
+ lon FLOAT NULL, -- Longitude of location
+ region INT NULL, -- Pointer to Region - references main plugin region table
+ phone TINYTEXT NULL, -- Location Phone #
+ url TINYTEXT NULL, -- Location URL
+ email TINYTEXT NULL, -- Location E-Mail Address
+ contact_addon_id INT NULL, -- ID of Contact from contact add-on (optional and if available)
+ contact_fname TINYTEXT NULL, -- Contact first name for this location (optional)
+ contact_lname TINYTEXT NULL, -- Contact last name for this location (optional)
+ contact_phone TINYTEXT NULL, -- Contact phone for this location (optional)
+ contact_email TINYTEXT NULL, -- Contact E-Mail address (optional)
+ PRIMARY KEY (id),
+ INDEX (event),
+ INDEX (event_code(10))
+);
+
+----
+
+-- Registration Event Time - Information and summary data for a specific event instance (relates to a particular time record in events)
+-- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
+-- These are created the first time a person tries to register for an event instance (time)
+-- One or more for each event
+CREATE TABLE {prefix}reg_time (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL, -- Flag. True if registrations is available for this time
+ non_time_specific BOOLEAN NULL, -- Flag. True if this is a pseudo time for non-time-specific events - Other informational times for the event will have this flag off
+ reg_event INT NULL, -- Pointer to reg_event table
+ event_time INT NULL, -- ID of events times table entry in Events add-on - If false (0), then this is a pseudo entry to use for all registrations (non-date/time specific)
+ start_datetime DATETIME NULL, -- Date and time when event instance starts
+ end_datetime DATETIME NULL, -- Date and time when event instance ends
+ all_day BOOLEAN NULL, -- All Day flag - Informational
+ attendees BOOLEAN NULL, -- Flag if tracking attendees or if only one per registration submission (registers account submitting) - get from reg_event
+ attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
+ attendee_count MEDIUMINT NULL, -- Current attendee count - calculated on the fly and stored here for reference
+ attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
+ attendees_available MEDIUMINT NULL, -- Currently available attendee count (limit - registered - pending)
+ total_base_charge DOUBLE NULL, -- Total base charges
+ total_per_attendee DOUBLE NULL, -- Total per-attendee charges
+ total_other DOUBLE NULL, -- Total other charges (meals, extras, fees, ...)
+ total_taxes DOUBLE NULL, -- Total taxes charged
+ total_charges DOUBLE NULL, -- Total charges (sum of all above)
+ total_discounts DOUBLE NULL, -- Total discounts of all types (applied payment codes, etc...)
+ total_payments DOUBLE NULL, -- Total net payments (total charges - total discounts)
+ descr TEXT NULL, -- Optional description field for this time entry
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (event_time),
+ INDEX (start_datetime)
+);
+
+----
+
+-- Pending Attendees - In carts but not checked out
+-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
+-- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
+-- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
+CREATE TABLE {prefix}reg_time_pending (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ reg_time INT NULL, -- ID of time record
+ registrant INT NULL, -- ID of reg_request_registrant record --
+ expire_time DATETIME NULL, -- Time at which this hold expires
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_time)
+);
+
+----
+
+-- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
+-- One or more for each event
+CREATE TABLE {prefix}reg_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ name TINYTEXT NULL, -- Name of this registration type
+ descr TEXT NULL, -- Description
+ sort_order INT DEFAULT 999, -- Sort order for display in Front-End
+ PRIMARY KEY (id),
+ INDEX (reg_event)
+);
+
+----
+
+-- Rates and dates for a particular reg_class
+-- One or more per reg_class - **** Days should not overlap for a particular reg_class
+CREATE TABLE {prefix}reg_rate (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ reg_class INT NULL, -- Pointer to reg_class table
+ name TINYTEXT NULL, -- Name of this rate
+ start_days INT NULL, -- # of days before event time rate becomes available - may be selected as a date then converted for storage
+ end_days INT NULL, -- # of days before event time rate becomes unavailable
+ base_rate FLOAT, -- Base rate to register
+ per_registrant FLOAT, -- Rate per registrant
+ registrant_credits TINYINT NULL, -- Number of registrants included in base rate
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_class)
+);
+
+----
+
+-- Notifications
+-- None or more for each reg event
+CREATE TABLE {prefix}reg_notification (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ name TINYTEXT NULL, -- Name of this notification
+ notification_days INT NULL, -- # of days before or after event that notification takes place (- before, + after)
+ message TEXT NULL, -- Content of message (uses template parameters to merge event/attendee data)
+ PRIMARY KEY (id),
+ INDEX (reg_event)
+);
+
+----
+
+-- Notification Queue
+CREATE TABLE {prefix}notification_queue (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_notification INT NOT NULL, -- Pointer to the reg_notification table
+ account INT NOT NULL, -- Pointer to the account table
+ queued_time DATETIME NOT NULL, -- Creation time
+ processed_time DATETIME NULL, -- The time this queue was processed. (sent out)
+ to_email TINYTEXT NOT NULL, -- The To email address
+ from_email TINYTEXT NOT NULL, -- The From email address
+ subject TINYTEXT NOT NULL, -- The subject
+ html_message TEXT NOT NULL, -- The complete html message
+ PRIMARY KEY (id)
+);
+
+----
+
+-- An account for a person submitting a registration or a registrant for an event
+-- Depending on the use of these entries may not have all data included
+-- A single account may be referenced as a person submitting registrations and/or a person registered for an event
+CREATE TABLE {prefix}account (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
+ validated BOOLEAN NULL, -- Flag indicating that the account has been validated - Set to false when recovering password
+ validation_code TINYTEXT NULL, -- Validation code and timestamp ("{validation code}-{timestamp}) - Clear this after validation
+ registered_by INT NULL, -- Account *** THIS FIELD NEEDS TO BE DELETED ***
+ member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID - See "contact_member_id" below)
+ fname TINYTEXT NULL, -- Account primary address
+ lname TINYTEXT NULL,
+ org TINYTEXT NULL,
+ title TINYTEXT NULL,
+ addr1 TINYTEXT NULL,
+ addr2 TINYTEXT NULL,
+ city TINYTEXT NULL,
+ state TINYTEXT NULL,
+ zip TINYTEXT NULL,
+ country TINYTEXT NULL,
+ phone TINYTEXT NULL,
+ fax TINYTEXT NULL,
+ bill_fname TINYTEXT NULL, -- Last used billing infodeletermation - Also stored in each registration request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ bill_phone TINYTEXT NULL,
+ bill_fax TINYTEXT NULL,
+ email TINYTEXT NULL,
+ password TINYTEXT NULL, -- Crypted password for login back into this account
+ email_ok BOOLEAN NULL,
+ is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
+ customer_profile_id TINYTEXT NULL, -- Stored Credit Card customer profile ID
+ payment_profile_id TINYTEXT NULL, -- Stored Credit Card payment profile ID
+ payment_profile_card TINYTEXT NULL, -- Stored Credit Card last card digits
+ contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
+ contact_member_id INT NULL, -- Pointer to GLM Associate Member for this contact
+ contact_fname TINYTEXT NULL,
+ contact_lname TINYTEXT NULL,
+ contact_org TINYTEXT NULL,
+ contact_title TINYTEXT NULL,
+ contact_addr1 TINYTEXT NULL,
+ contact_addr2 TINYTEXT NULL,
+ contact_city TINYTEXT NULL,
+ contact_state TINYTEXT NULL,
+ contact_zip TINYTEXT NULL,
+ contact_country TINYTEXT NULL,
+ contact_phone TINYTEXT NULL,
+ contact_fax TINYTEXT NULL,
+ contact_email TINYTEXT NULL,
+ contact_email_ok BOOLEAN NULL,
+ guardian TINYTEXT NULL,
+ emer_contact TINYTEXT NULL,
+ emer_phone TINYTEXT NULL,
+ med_history TINYTEXT NULL,
+ allergy_med TINYTEXT NULL,
+ date_created DATE NULL,
+ notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
+ user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
+ PRIMARY KEY (id),
+ INDEX (registered_by),
+ INDEX (member_id(10)),
+ INDEX (fname(10)),
+ INDEX (lname(10)),
+ INDEX (org(10)),
+ INDEX (city(10)),
+ INDEX (state(5)),
+ INDEX (zip(5)),
+ INDEX (email(10)),
+ INDEX (contact_id)
+);
+
+----
+
+-- A request for registration
+-- Has one or more reg_detail records associated with it
+CREATE TABLE {prefix}reg_request (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations. If 0 then guest request (prior to checkout)
+ validated BOOLEAN NULL, -- Flag that indicates if request passed last validation with checkRegistrationRequest()
+ validation_message TEXT NULL, -- Reasons that request did not pass validation with checkRegistrationRequest() - Serialized array
+ bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ bill_phone TINYTEXT NULL,_class
+ bill_email TINYTEXT NULL,
+ date_submitted DATE NULL, -- Date of final submission (checkout complete)
+ pay_method INT NULL, -- See payment_method in plugin.ini
+ payment_code TINYTEXT NULL, -- Payment_code text (comp code) - if submitted and validated
+ status SMALLINT NULL, -- See submission_status in plugin.ini
+ total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
+ total_discounts DOUBLE PRECISION NULL, -- Total of all comps and discounts
+ registrants SMALLINT NULL, -- Total number of registrants in this cart
+ cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
+ cc_name TINYTEXT NULL, -- Name on Credit Card or Name on Check
+ cc_numb TINYTEXT NULL, -- Credit Card Number or Check Number
+ cc_exp TINYTEXT NULL,
+ cc_cvv TINYTEXT NULL,
+ cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
+ cc_proc_mesg TINYTEXT NULL, -- Message received from payment processor
+ summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ user_trace_info TEXT NULL, -- IP Address of user computer and timestamp
+ date_created DATETIME NULL, -- Date request was first created
+ last_update DATETIME NULL, -- Last update date/time - Used for timing out pending carts and attendee counts
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (date_submitted)
+);
+
+----
+
+-- Registration for a specific event
+-- Has one or more reg_selected_rate records associated with it
+CREATE TABLE {prefix}reg_request_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_request INT NULL, -- Pointer to reg_request table
+ reg_event INT NULL, -- Pointer to reg_event
+ event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_request),
+ INDEX (reg_event)
+);
+
+----
+
+-- A particular reg_class selected
+-- Has one or more reg_request_rate records associated with it
+CREATE TABLE {prefix}reg_request_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ class INT NULL, -- Pointer to event reg_class table - False (0) if registration class no longer exits
+ class_name TINYTEXT NULL, -- Name of event class at the time selected
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_request_event)
+);
+
+----
+
+-- A particular reg_rate selected
+-- Has one or more reg_request_registrant records associated with it
+CREATE TABLE {prefix}reg_request_rate (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ rate INT NULL, -- Pointer to event reg_rate table - False (0) if registration rate no longer exists
+ rate_name TINYTEXT NULL, -- Name of event class rate at the time selected
+ base_rate FLOAT, -- Base rate at time of registration
+ per_registrant FLOAT, -- Per Registrant Rate at time of registration
+ registrant_credits TINYINT NULL, -- Number of registrants included in base rate at time of registration
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class)
+);
+
+----
+
+-- A specific registrant for a selected registration rate
+CREATE TABLE {prefix}reg_request_registrant (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to the account entry for the person being registered - False (0) if account no longer exists or registrant account not needed
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_time INT NULL, -- Pointer reg_time entry
+ event_datetime DATETIME NULL, -- Date and time of event time selected so it will always be in the cart
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
+ not_attending BOOLEAN DEFAULT false, -- Flag to say if registrant is not attending - set to true when not attending
+ fname TINYTEXT NULL, -- First name of registrant at the time of selection
+ lname TINYTEXT NULL, -- Last name of registrant at the time of selection
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (reg_event),
+ INDEX (reg_time),
+ INDEX (reg_request),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class),
+ INDEX (reg_request_rate)
+);
+
+----
+
+-- A specific use of a payment code in this request
+CREATE TABLE {prefix}reg_request_pay_code (
+ id INT NOT NULL AUTO_INCREMENT,
+ payment_code INT NULL, -- Pointer to payment code
+ code TINYTEXT NULL, -- Copy of Payment Code text in case payment code is deleted or changed
+ reg_request INT NULL, -- Pointer to the registration request record
+ credit DOUBLE PRECISION NULL, -- Total credit for this payment code
+ expire_date DATE NULL, -- Expiration Date - NOT USING NOW - Getting from payment_code table always
+ PRIMARY KEY (id),
+ INDEX (payment_code),
+ INDEX (reg_request)
+);
+
+----
+
+-- Insert into management table
+INSERT INTO {prefix}management
+ (
+ canonical_reg_page,
+ reg_org_name,
+ reg_org_short,
+ reg_org_address,
+ reg_org_city,
+ reg_org_state,
+ reg_org_zip,
+ reg_org_phone,
+ reg_org_toll_free,
+ reg_org_internal_email,
+ reg_org_from_email,
+ reg_payment_methods,
+ reg_proc_methods,
+ reg_cc_accepts,
+ reg_authorize_net_login,
+ reg_authorize_net_key,
+ reg_authorize_net_test,
+ reg_authorize_net_conf,
+ reg_authorize_net_merchant_email,
+ reg_merchant_solutions_acctid,
+ reg_merchant_solutions_merchantpin,
+ reg_merchant_solutions_test,
+ reg_full_billing_info,
+ reg_bill_info_req_no_charge,
+ reg_bill_info_req_comp_code,
+ reg_bill_info_req_cash,
+ reg_bill_info_req_check,
+ reg_bill_info_req_credit_card,
+ reg_bill_info_req_merchant_call,
+ reg_medical_info,
+ reg_show_select_by_code
+ )
+ VALUES
+ (
+ 'registrations', -- reg_canonical_reg_page,
+ 'Gaslight Media', -- reg_org_name,
+ 'GLM', -- reg_org_short,
+ '120 E. Lake St.', -- reg_org_address,
+ 'Petoskey', -- reg_org_city,
+ 'MI', -- reg_org_state,
+ '49770', -- reg_org_zip,
+ '231-487-0692', -- reg_org_phone,
+ '800-123-1234', -- reg_org_toll_free,
+ 'internal@gaslightmedia.com', -- reg_org_internal_email,
+ 'info@gaslightmedia.com', -- reg_org_from_email,
+ 0, -- reg_payment_methods,
+ 0, -- reg_proc_methods,
+ 0, -- reg_cc_accepts,
+ '', -- reg_authorize_net_login,
+ '', -- reg_authorize_net_key,
+ 1, -- reg_authorize_net_test,
+ true, -- reg_authorize_net_conf
+ '', -- reg_authorize_net_merchant_email,
+ '', -- reg_merchant_solutions_acctid,
+ '', -- reg_merchant_solutions_merchantpin,
+ 1, -- reg_merchant_solutions_test,
+ true, -- reg_full_billing_info,
+ 0, -- reg_bill_info_req_no_charge,
+ 0, -- reg_bill_info_req_comp_code,
+ 0, -- reg_bill_info_req_cash,
+ 0, -- reg_bill_info_req_check,
+ 0, -- reg_bill_info_req_credit_card,
+ 0, -- reg_bill_info_req_merchant_call,
+ true, -- reg_medical_info,
+ true -- reg_show_select_by_code
+ );
+
+----
+
+-- Insert into settings_terms table
+INSERT INTO {prefix}settings_terms
+ (
+ reg_term_registrations_name,
+ reg_term_registration,
+ reg_term_registration_cap,
+ reg_term_registration_plur,
+ reg_term_registration_plur_cap,
+ reg_term_register,
+ reg_term_register_cap,
+ reg_term_registers,
+ reg_term_registering,
+ reg_term_registering_cap,
+ reg_term_registered,
+ reg_term_registered_cap,
+ reg_term_attendee,
+ reg_term_attendee_cap,
+ reg_term_attendee_plur,
+ reg_term_attendee_plur_cap,
+ reg_term_attending,
+ reg_term_attended,
+ reg_term_registered_user,
+ reg_term_registered_user_cap,
+ reg_term_registered_user_plur,
+ reg_term_registered_user_plur_cap,
+ reg_term_event,
+ reg_term_event_cap,
+ reg_term_event_plur,
+ reg_term_event_plur_cap,
+ reg_term_id,
+ reg_term_id_cap,
+ reg_term_id_plur,
+ reg_term_id_plur_cap,
+ reg_term_level,
+ reg_term_level_cap,
+ reg_term_level_plur,
+ reg_term_level_plur_cap,
+ reg_term_rate,
+ reg_term_rate_cap,
+ reg_term_rate_plur,
+ reg_term_rate_plur_cap,
+ reg_term_password,
+ reg_term_password_cap,
+ reg_term_password_plur,
+ reg_term_password_plur_cap,
+ reg_term_instructor,
+ reg_term_instructor_cap,
+ reg_term_instructor_plur,
+ reg_term_instructor_plur_cap,
+ reg_term_payment_code,
+ reg_term_payment_code_cap,
+ reg_term_payment_code_plur,
+ reg_term_payment_code_plur_cap,
+ reg_term_registration_button,
+ reg_term_contact_information
+ reg_term_button_event_list,
+ reg_term_button_login_or_create,
+ reg_term_button_create_account,
+ reg_term_button_login,
+ reg_term_button_logout,
+ reg_term_button_add_attendee,
+ reg_term_button_save_attendee,
+ reg_term_button_attendee_page_continue,
+ reg_term_button_apply_comp_code,
+ reg_term_button_cart_page_continue,
+ reg_term_button_checkout_page_submit
+ )
+ VALUES
+ (
+ 'Event Registrations', -- reg_term_registrations_name
+ 'registration', -- reg_term_registration
+ 'Registration', -- reg_term_registration_cap
+ 'registrations', -- reg_term_registration_plur
+ 'Registrations', -- reg_term_registration_plur_cap
+ 'register', -- reg_term_register
+ 'Register', -- reg_term_register_cap
+ 'registers', -- reg_term_registers
+ 'registering', -- reg_term_registering
+ 'Registering', -- reg_term_registering_cap
+ 'registered', -- reg_term_registered
+ 'Registered', -- reg_term_registered_cap
+ 'attendee', -- reg_term_attendee
+ 'Attendee', -- reg_term_attendee_cap
+ 'attendees', -- reg_term_attendee_plur
+ 'Attendees', -- reg_term_attendee_plur_cap
+ 'attending', -- reg_term_attending
+ 'attended', -- reg_term_attended
+ 'user', -- reg_term_registered_user
+ 'User', -- reg_term_registered_user_cap
+ 'users', -- reg_term_registered_user_plur
+ 'Users', -- reg_term_registered_user_plur_cap
+ 'event', -- reg_term_event
+ 'Event', -- reg_term_event_cap
+ 'events', -- reg_term_event_plur
+ 'Events', -- reg_term_event_plur_cap
+ 'ID', -- reg_term_id
+ 'ID', -- reg_term_id_cap
+ 'IDs', -- reg_term_id_plur
+ 'IDs', -- reg_term_id_plur_cap
+ 'level', -- reg_term_level
+ 'Level', -- reg_term_level_cap
+ 'levels', -- reg_term_level_plur
+ 'Levels', -- reg_term_level_plur_cap
+ 'rate', -- reg_term_rate
+ 'Rate', -- reg_term_rate_cap
+ 'rates', -- reg_term_rate_plur
+ 'Rates', -- reg_term_rate_plur_cap
+ 'password', -- reg_term_password
+ 'passwords', -- reg_term_password_cap
+ 'Password', -- reg_term_password_plur
+ 'Passwords', -- reg_term_password_plur_cap
+ 'instructor', -- reg_term_instructor
+ 'Instructor', -- reg_term_instructor_cap
+ 'instructors', -- reg_term_instructor_plur
+ 'Instructors', -- reg_term_instructor_plur_cap
+ 'payment code', -- reg_term_payment_code
+ 'Payment code', -- reg_term_payment_code_cap
+ 'payment codes', -- reg_term_payment_code_plur
+ 'Payment codes', -- reg_term_payment_code_plur_cap
+ 'Register for Event', -- reg_term_registration_button
+ 'Contact Information', -- reg_term_contact_information
+ 'Event Registration List', -- reg_term_button_event_list
+ 'Login or Create Account', -- reg_term_button_login_or_create
+ 'Create an Account', -- reg_term_button_create_account
+ 'Login'. -- reg_term_button_login
+ 'Logout', -- reg_term_button_logout
+ 'Add New Attendee', -- reg_term_button_add_attendee
+ 'Save Attendee', -- reg_term_button_save_attendee
+ 'Continue', -- reg_term_button_attendee_page_continue
+ 'Apply Comp Code', -- reg_term_button_apply_comp_code
+ 'Proceed to Checkout', -- reg_term_button_cart_page_continue
+ 'Submit Registration Request' -- reg_term_button_checkout_page_submit
+
+
+
+
+
+
+
+
+ );
+
+----
+
+-- Insert into misc table
+INSERT INTO {prefix}misc
+ (
+ reg_bulletin,
+ cart_page_text,
+ checkout_page_text,
+ summary_page_text,
+ reg_terms,
+ notify_subject,
+ notify_text,
+ instr_notify_subject,
+ instr_notify_text,
+ submission_notify_subject,
+ submission_notify_text,
+ registrant_notify_subject,
+ registrant_notify_text,
+ submission_ack_subject,
+ submission_ack_text,
+ registrant_ack_subject,
+ registrant_ack_text
+ )
+ VALUES
+ (
+ 'Registration Bulletin Text',
+ 'Text for top of Cart Page',
+ 'Text for top of Checkout Page',
+ 'Text for top of Summary Page',
+ 'Terms and Conditions',
+ 'Registration Request Submitted',
+ 'A registration request has just been submitted to your site.
+
+$OrgName: {$OrgName}
+$OrgAddress: {$OrgAddress}
+$OrgCity: {$OrgCity}
+$OrgState: {$OrgState}
+$OrgZip: {$OrgZip}
+$OrgPhone: {$OrgPhone}
+$OrgEmail: {$OrgEmail}
+$SubmittedByFirstName: {$SubmittedByFirstName}
+$SubmittedByLastName: {$SubmittedByLastName}
+$SubmittedByTitle: {$SubmittedByTitle}
+$SubmittedByOrganization: {$SubmittedByOrganization}
+$BillingFirstname: {$BillingFirstname}
+$BillingLastname: {$BillingLastname}
+$BillingAddrLine1: {$BillingAddrLine1}
+$BillingAddrLine2 {$BillingAddrLine2}
+$BillingCity: {$BillingCity}
+$BillingState: {$BillingState}
+$BillingCountry: {$BillingCountry}
+$BillingPhone: {$BillingPhone}
+$BillingEmailAddress: {$BillingEmailAddress}
+$DateTimeSubmitted: {$DateTimeSubmitted}
+$PaymentMethod: {$PaymentMethod}
+$Status: {$Status}
+$NumberAttendees: {$NumberAttendees}
+$Summary: {$Summary}
+',
+ 'Registration Submitted for {$EventName}',
+ 'The following people were just registered for {$EventName}...
+
+{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$a.AttendeeLastName}
+{/foreach}
+',
+ 'Registration Request Submitted',
+ 'Thank you for submitting your registration request.
+
+Here is a summary of your submission:
+
+{$Summary}',
+ 'Your Registration for: {$EventName}',
+ '{$DateTimeSubmitted}
+
+{$SubmittedByFirstName} {$SubmittedByLastName} has registered you for the {$EventName}.
+
+Here is your registration confirmation:
+Event: {$EventName}
+Registration Type: {$LevelName}
+Rate Name: {$RateName}
+Attendee Name Submitted: {$AttendeeFirstName} {$AttendeeLastName}
+
+Please let us know if you have any questions regarding your registration for this event.
+',
+ 'Registration Request Updated',
+ 'THIS MESSAGE TYPE IS NOT YET FUNCTIONAL
+
+The status of your registration request submitted on {$DateTimeSubmitted} has been updated to "{$Status}".
+
+Below is a copy of the request at the time it was submitted.
+
+{$Summary}',
+ 'Your payment status for the event you are attending has been updated',
+ 'TTHIS MESSAGE TYPE IS NOT YET FUNCTIONAL'
+ );
'0.0.32' => array('version' => '0.0.32', 'tables' => 18, 'date' => '05/22/2018'),
'1.0.0' => array('version' => '1.0.0', 'tables' => 18, 'date' => '06/04/2018'),
'1.0.1' => array('version' => '1.0.1', 'tables' => 18, 'date' => '06/12/2018'),
- '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018')
+ '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018'),
+ '1.0.3' => array('version' => '1.0.3', 'tables' => 18, 'date' => '12/11/2018')
);
+++ /dev/null
--- Gaslight Media Members Database
--- File Created: 12/09/14 15:27:15
--- Database Version: 0.0.19
--- Database Deletion Script
--- Note: Tables with DELETE CASCADE must appear before referenced table
-
-DROP TABLE IF EXISTS
- {prefix}management,
- {prefix}settings_terms,
- {prefix}misc,
- {prefix}payment_code,
- {prefix}reg_event,
- {prefix}reg_time,
- {prefix}reg_time_pending,
- {prefix}reg_class,
- {prefix}reg_rate,
- {prefix}reg_notification,
- {prefix}account,
- {prefix}reg_request,
- {prefix}reg_request_event,
- {prefix}reg_request_class,
- {prefix}reg_request_rate,
- {prefix}reg_request_registrant,
- {prefix}reg_request_pay_code
-;
-
--- /dev/null
+-- Gaslight Media Members Database
+-- File Created: 12/09/14 15:27:15
+-- Database Version: 0.0.19
+-- Database Deletion Script
+-- Note: Tables with DELETE CASCADE must appear before referenced table
+
+DROP TABLE IF EXISTS
+ {prefix}management,
+ {prefix}settings_terms,
+ {prefix}misc,
+ {prefix}payment_code,
+ {prefix}reg_event,
+ {prefix}reg_time,
+ {prefix}reg_time_pending,
+ {prefix}reg_class,
+ {prefix}reg_rate,
+ {prefix}reg_notification,
+ {prefix}account,
+ {prefix}reg_request,
+ {prefix}reg_request_event,
+ {prefix}reg_request_class,
+ {prefix}reg_request_rate,
+ {prefix}reg_request_registrant,
+ {prefix}reg_request_pay_code
+;
+
-- all queries must be separated by a line with four dashes
-- Pending Attendees - In carts but not checked out
--- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
+-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
-- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
-- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
CREATE TABLE {prefix}reg_time_pending (
--- /dev/null
+-- Gaslight Media Members Database - Registratiuons Add-On
+-- File Updated: 2018-10-08
+-- Database Version: 1.0.2
+-- Database Update From Previous Version Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+ALTER TABLE {prefix}management ADD COLUMN reg_bill_info_requested SMALLINT DEFAULT 32767;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_cap TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur_cap TINYTEXT DEFAULT NULL;
+
+----
+
+UPDATE {prefix}settings_terms SET reg_term_rate = 'rate', reg_term_rate_cap = 'Rate', reg_term_rate_plur = 'rates', reg_term_rate_plur_cap = 'Rates' where id = 1;
+
+----
+
+ALTER TABLE {prefix}management ADD COLUMN reg_show_select_by_code BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN not_included_in_lists BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN image TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN cost TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN hide_address BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN use_member_location BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN member INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN location_name TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN address TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN city INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN state TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN zip TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN country TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN lat FLOAT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN lon FLOAT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN region INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN phone TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN url TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN email TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_addon_id INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_fname TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_lname TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_phone TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_email TINYTEXT DEFAULT NULL;
+
<tr>
{if $select.exportId}<th align="left">ID</th>{/if}
{if $select.exportRegistrant}<th align="left">{$terms.reg_term_attendee_cap} Name</th>{/if}
+ {if $select.exportOrg}<th align="left">Org</th>{/if}
+ {if $select.exportTitle}<th align="left">Title</th>{/if}
{if $select.exportAddr1}<th align="left">Address</th>{/if}
{if $select.exportAddr2}<th align="left">Addr Line #2</th>{/if}
{if $select.exportCity}<th align="left">City</th>{/if}
<tr>
{if $select.exportId}<td>{$m.id}</td>{/if}
{if $select.exportRegistrant}<td>{$m.fname} {$m.lname}</td>{/if}
+ {if $select.exportOrg}<td>{$m.account.org}</td>{/if}
+ {if $select.exportTitle}<td>{$m.account.title}</td>{/if}
{if $select.exportAddr1}<td>{$m.account.addr1}</td>{/if}
{if $select.exportAddr2}<td>{$m.account.addr2}</td>{/if}
{if $select.exportCity}<td>{$m.account.city}</td>{/if}
{if $haveRegistrants}
{if $select.exportId}"ID",{/if}
{if $select.exportRegistrant}"{$terms.reg_term_attendee_cap} Name",{/if}
+{if $select.exportOrg}"Organization",{/if}
+{if $select.exportTitle}"Title/Dept",{/if}
{if $select.exportAddr1}"Address",{/if}
{if $select.exportAddr2}"Addr Line #2",{/if}
{if $select.exportCity}"City",{/if}
{foreach $registrants as $m}
{if $select.exportId}"{$m.id}",{/if}
{if $select.exportRegistrant}"{$m.fname} {$m.lname}",{/if}
+{if $select.exportOrg}"{$m.account.org}",{/if}
+{if $select.exportTitle}"{$m.account.title}",{/if}
{if $select.exportAddr1}"{$m.account.addr1}",{/if}
{if $select.exportAddr2}"{$m.account.addr2}",{/if}
{if $select.exportCity}"{$m.account.city}",{/if}
<td {if $regSettings.fieldFail.reg_payment_methods}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-payment-methods"{/if}>
{foreach from=$regSettings.fieldData.reg_payment_methods.bitmap item=v}
<input type="checkbox" name="reg_payment_methods[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}<br>
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_payment_methods}<p>{$regSettings.fieldFail.reg_payment_methods}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_cc_accepts}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-cc-accepts"{/if}>
{foreach from=$regSettings.fieldData.reg_cc_accepts.bitmap item=v}
<input type="checkbox" name="reg_cc_accepts[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}<br>
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_cc_accepts}<p>{$regSettings.fieldFail.reg_cc_accepts}</p>{/if}
</td>
</tr>
</select>
</td>
</tr>
-
+
<!-- Authorize.net -->
-
+
<tr class="authorize-net">
<td></td>
<th><p>Authorize.net</p></th>
</td>
</tr>
<tr class="authorize-net">
- <th></th>
+ <th></th>
<td>See Authorize.net Merchant Portal for notifications sent by Authorize.net.</td>
</tr>
-<!--
+<!--
<tr class="authorize-net">
- <th>Send Confirmation E-Mail</th>
+ <th>Send Confirmation E-Mail</th>
<td>
<input type="checkbox" name="reg_authorize_net_conf"{if $regSettings.fieldData.reg_authorize_net_conf.value} checked="checked"{/if}>
</td>
{if $regSettings.fieldFail.reg_authorize_net_merchant_email}<p>{$regSettings.fieldFail.reg_authorize_net_merchant_email}</p>{/if}
</td>
</tr>
--->
+-->
<tr class="authorize-net">
- <th></th>
+ <th></th>
<tr class="authorize-net">
<th class="glm-nowrap-left-align{if $regSettings.fieldRequired.reg_authorize_net_merchant_seal} glm-required{/if}">Verified Merchant Seal HTML:</th>
<td {if $regSettings.fieldFail.reg_authorize_net_merchant_seal}class="glm-form-bad-input"{/if}>
</td>
</tr>
</tr>
-
+
<!-- Merchant Solutions -->
<tr class="merchant-solutions">
{if $regSettings.fieldFail.reg_merchant_solutions_merchant_email}<p>{$regSettings.fieldFail.reg_merchant_solutions_merchant_email}</p>{/if}
</td>
</tr>
-
+
<!-- PayPal -->
-
+
<tr class="paypal">
<td></td>
<th><p>PayPal</p></th>
</select>
</td>
</tr>
-
- <!-- General Options -->
-
+
+ <!-- General Options -->
+
<tr>
<td></td>
<th><p>Other General Options</p></th>
<input type="checkbox" name="reg_show_attendees_on_reg_page"{if $regSettings.fieldData.reg_show_attendees_on_reg_page.value} checked="checked"{/if}>
</td>
</tr>
+ <tr>
+ <th>Show Select Event by Code Form on Registration Events list</th>
+ <td>
+ <input type="checkbox" name="reg_show_select_by_code"{if $regSettings.fieldData.reg_show_select_by_code.value} checked="checked"{/if}>
+ </td>
+ </tr>
<tr>
<td></td>
<th><p>Billing Information Fields</p></th>
</tr>
+<!-- {*
</tr>
<th>Always Use Full Billing Info</th>
<td>
<input type="checkbox" name="reg_full_billing_info"{if $regSettings.fieldData.reg_full_billing_info.value} checked="checked"{/if}>
</td>
</tr>
+*} -->
+ <tr>
+ <th class="glm-nowrap-left-align{if $regSettings.fieldRequired.reg_bill_info_requested} glmÂ-required{/if}">Billing Info Fields for Checkout:</th>
+ <td {if $regSettings.fieldFail.reg_bill_info_requested}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-no-charge"{/if}>
+ {foreach from=$regSettings.fieldData.reg_bill_info_requested.bitmap item=v}
+ <input type="checkbox" name="reg_bill_info_requested[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}<br>
+ {/foreach}
+ {if $regSettings.fieldFail.reg_bill_info_requested}<p>{$regSettings.fieldFail.reg_bill_info_requested}</p>{/if}
+ </td>
+ </tr>
+<!-- {*
<tr>
<th class="glm-nowrap-left-align{if $regSettings.fieldRequired.reg_bill_info_req_no_charge} glmÂ-required{/if}">Billing Info used for No Charge:</th>
<td {if $regSettings.fieldFail.reg_bill_info_req_no_charge}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-no-charge"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_no_charge.bitmap item=v}
<input type="checkbox" name="reg_bill_info_req_no_charge[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_no_charge}<p>{$regSettings.fieldFail.reg_bill_info_req_no_charge}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_bill_info_req_comp_code}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-comp-code"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_comp_code.bitmap item=v}
<input type="checkbox" name="reg_bill_info_req_comp_code[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_comp_code}<p>{$regSettings.fieldFail.reg_bill_info_req_comp_code}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_bill_info_req_cash}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-cash"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_cash.bitmap item=v}
<input type="checkbox" name="reg_bill_info_req_cash[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_cash}<p>{$regSettings.fieldFail.reg_bill_info_req_cash}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_bill_info_req_check}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-check"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_check.bitmap item=v}
<input type="checkbox" name="reg_bill_info_req_check[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_check}<p>{$regSettings.fieldFail.reg_bill_info_req_check}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_bill_info_req_credit_card}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-credit-card"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_credit_card.bitmap item=v}
<input type="checkbox" name="reg_bill_info_req_credit_card[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_credit_card}<p>{$regSettings.fieldFail.reg_bill_info_req_credit_card}</p>{/if}
</td>
</tr>
<td {if $regSettings.fieldFail.reg_bill_info_req_merchant_call}class="glmÂformÂbadÂinput" dataÂtabid="glm-reg-bill-info-req-merchant-call"{/if}>
{foreach from=$regSettings.fieldData.reg_bill_info_req_merchant_call.bitmap item=v}
<span style="white-space: nowrap;"><input type="checkbox" name="reg_bill_info_req_merchant_call[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}>{$v.name}</span>
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_bill_info_req_merchant_call}<p>{$regSettings.fieldFail.reg_bill_info_req_merchant_call}</p>{/if}
</td>
</tr>
<input type="checkbox" name="reg_medical_info"{if $regSettings.fieldData.reg_medical_info.value} checked="checked"{/if}>
</td>
</tr>
+ *} -->
</table>
<input type="submit" value="Update Settings" class="button-primary">
</form>
-
+
</td>
</tr>
</table>
// Get the value from the selected Payment Method
var processor = $('#reg_proc_methods').val();
-
+
// This is a hack, we should be looking at the plugin.ini for these numbers but I'm just too lazy today
if (processor == 2) {
$('.authorize-net').removeClass('glm-hidden');
}
}
-
+
// When payment method selection changes
$('#reg_proc_methods').on('change', function() {
showSelectedCardProcessor();
window.open(sealUrl, '_blank', "width=300,height=200,menubar=no,scrollbars=no,location=no");
return false;
});
-
+
});
</script>
{if $settingsUpdated}<h2 class="glm-notice glm-flash-updated glm-right">Settings Updated</h2>{/if}
{if $settingsUpdateError}<span class="glm-error glm-flash-updated glm-right">Settings Update Error</span>{/if}
<h3>{$terms.reg_term_registrations_name} Terms and Phrases</h3>
-
+
</td>
</tr>
<tr>
{if $termSettings.fieldFail.reg_term_registrations_name}<p>{$termSettings.fieldFail.reg_term_registrations_name}</p>{/if}
</td>
</tr>
-
+
<!-- ATTENDEE -->
<tr>
<th>Attendee:</th>
{if $termSettings.fieldFail.reg_term_attendee_plur_cap}<p>{$termSettings.fieldFail.reg_term_attendee_plur_cap}</p>{/if}
</td>
</tr>
-
+
<!-- ATTENDED -->
<tr>
<th>Attended:</th>
{if $termSettings.fieldFail.reg_term_attended}<p>{$termSettings.fieldFail.reg_term_attended}</p>{/if}
</td>
</tr>
-
+
<!-- ATTENDING -->
<tr>
<th>Attending:</th>
{if $termSettings.fieldFail.reg_term_attending}<p>{$termSettings.fieldFail.reg_term_attending}</p>{/if}
</td>
</tr>
-
+
<!-- CONTACT INFOMRATION -->
<tr>
<th>Contact Information:</th>
{if $termSettings.fieldFail.reg_term_contact_information}<p>{$termSettings.fieldFail.reg_term_contact_information}</p>{/if}
</td>
</tr>
-
+
<!-- EVENT -->
<tr>
<th>Event:</th>
{if $termSettings.fieldFail.reg_term_event_plur_cap}<p>{$termSettings.fieldFail.reg_term_event_plur_cap}</p>{/if}
</td>
</tr>
-
+
<!-- ID -->
<tr>
<th>ID:</th>
</td>
</tr>
+ <!-- (registration) RATE -->
+ <tr>
+ <th>Rate:</th>
+ <th {if $termSettings.fieldRequired.reg_term_rate}class="glm-required"{/if}>Normal:</th>
+ <td {if $termSettings.fieldFail.reg_term_rate}class="glm-form-bad-input"{/if}>
+ <input type="text" name="reg_term_rate" value="{$termSettings.fieldData.reg_term_rate}" class="glm-form-text-input-medium">
+ {if $termSettings.fieldFail.reg_term_rate}<p>{$termSettings.fieldFail.reg_term_rate}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th> </th>
+ <th {if $termSettings.fieldRequired.reg_term_rate_cap}class="glm-required"{/if}>Capitalized:</th>
+ <td {if $termSettings.fieldFail.reg_term_rate_cap}class="glm-form-bad-input"{/if}>
+ <input type="text" name="reg_term_rate_cap" value="{$termSettings.fieldData.reg_term_rate_cap}" class="glm-form-text-input-medium">
+ {if $termSettings.fieldFail.reg_term_rate_cap}<p>{$termSettings.fieldFail.reg_term_rate_cap}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th> </th>
+ <th {if $termSettings.fieldRequired.reg_term_rate_plur}class="glm-required"{/if}>Plural:</th>
+ <td {if $termSettings.fieldFail.reg_term_rate_plur}class="glm-form-bad-input"{/if}>
+ <input type="text" name="reg_term_rate_plur" value="{$termSettings.fieldData.reg_term_rate_plur}" class="glm-form-text-input-medium">
+ {if $termSettings.fieldFail.reg_term_rate_plur}<p>{$termSettings.fieldFail.reg_term_rate_plur}</p>{/if}
+ </td>
+ </tr>
+ <tr>
+ <th> </th>
+ <th {if $termSettings.fieldRequired.reg_term_rate_plur_cap}class="glm-required"{/if}>Plural Capitalized:</th>
+ <td {if $termSettings.fieldFail.reg_term_rate_plur_cap}class="glm-form-bad-input"{/if}>
+ <input type="text" name="reg_term_rate_plur_cap" value="{$termSettings.fieldData.reg_term_rate_plur_cap}" class="glm-form-text-input-medium">
+ {if $termSettings.fieldFail.reg_term_rate_plur_cap}<p>{$termSettings.fieldFail.reg_term_rate_plur_cap}</p>{/if}
+ </td>
+ </tr>
+
<!-- PASSWORD -->
<tr>
<th>Password:</th>
{if $termSettings.fieldFail.reg_term_register_cap}<p>{$termSettings.fieldFail.reg_term_register_cap}</p>{/if}
</td>
</tr>
-
+
<!-- REGISTER FOR EVENT -->
<tr>
- <th>Register for Event</th>
+ <th>Register for Event:</th>
<th {if $termSettings.fieldRequired.reg_term_registration_button}class="glm-required"{/if}>Normal:</th>
<td {if $termSettings.fieldFail.reg_term_registration_button}class="glm-form-bad-input"{/if}>
<input type="text" name="reg_term_registration_button" value="{$termSettings.fieldData.reg_term_registration_button}" class="glm-form-text-input-medium">
</td>
</tr>
- <!-- REGISTERED -->
+ <!-- REGISTERED -->
<tr>
- <th>Registered;</th>
+ <th>Registered:</th>
<th {if $termSettings.fieldRequired.reg_term_registered}class="glm-required"{/if}>Normal:</th>
<td {if $termSettings.fieldFail.reg_term_registered}class="glm-form-bad-input"{/if}>
<input type="text" name="reg_term_registered" value="{$termSettings.fieldData.reg_term_registered}" class="glm-form-text-input-medium">
{if $termSettings.fieldFail.reg_term_registered_cap}<p>{$termSettings.fieldFail.reg_term_registered_cap}</p>{/if}
</td>
</tr>
-
+
<!-- REGISTERED USER -->
<tr>
<th>Registered User:</th>
{if $termSettings.fieldFail.reg_term_registered_user_plur_cap}<p>{$termSettings.fieldFail.reg_term_registered_user_plur_cap}</p>{/if}
</td>
</tr>
-
+
<!-- REGISTERING -->
<tr>
<th>Registering</th>
<th {if $termSettings.fieldRequired.reg_term_registers}class="glm-required"{/if}>Normal:</th>
<td {if $termSettings.fieldFail.reg_term_registers}class="glm-form-bad-input"{/if}>
<input type="text" name="reg_term_registers" value="{$termSettings.fieldData.reg_term_registers}" class="glm-form-text-input-medium">
- {if $termSettings.fieldFail.reg_term_registers}<p>{$termSettings.fieldFail.reg_term_registers}</p>{/if}
- (Intransitive Verb)
+ {if $termSettings.fieldFail.reg_term_registers}<p>{$termSettings.fieldFail.reg_term_registers}</p>{/if} (Verb)
</td>
</tr>
-
+
<!-- REGISTRATION -->
<tr>
<th>Registration:</th>
{if $termSettings.fieldFail.reg_term_registration_plur_cap}<p>{$termSettings.fieldFail.reg_term_registration_plur_cap}</p>{/if}
</td>
</tr>
-
+
</table>
</td>
<td>
<table>
<!-- Button Text -->
- <tr><td colspan="2"><p>NOTE: Please try to keep text for the buttons below very short and verify how they look when you're done!</p></td></tr>
+ <tr><td colspan="2"><p class="glm-notice"><b>NOTE:</b> Please try to keep text for the buttons below very short and verify how they look when you're done!</p></td></tr>
<tr><td> </td><th><h2>Buttons at top of all pages</h2></th></tr>
<tr>
<th {if $termSettings.fieldRequired.reg_term_button_event_list}class="glm-required"{/if}>List Events:</th>
{if $termSettings.fieldFail.reg_term_button_checkout_page_submit}<p>{$termSettings.fieldFail.reg_term_button_checkout_page_submit}</p>{/if}
</td>
</tr>
- </table>
+ </table>
</td>
-
+
</tr>
</table>
<input type="submit" value="Update Settings" class="button button-primary">
<td style="padding-right: 1em;">Status</td>
<td>{$terms.reg_term_attendee_plur_cap}</td>
</tr>
- {foreach $account.requests as $request}
+ {foreach $account.requests as $request}
<tr>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$request.id}">{$request.id}</a></td>
<td>{$request.date_submitted.datetime}</td>
<td>{$request.pay_method.name}</td>
<td>{$request.status.name}</td>
<td>{$request.registrants}</td>
- </tr>
+ </tr>
{/foreach}
</table>
<td style="padding-right: 1em;">Name</td>
<td style="padding-right: 1em;">{$terms.reg_term_event_cap}</td>
<td style="padding-right: 1em;">Level</td>
- <td style="padding-right: 1em;">Rate</td>
+ <td style="padding-right: 1em;">{$terms.reg_term_rate_cap}</td>
<td style="padding-right: 1em;">Request Status</td>
<td>Attending</td>
</tr>
- {foreach $account.registrants as $registrant}
+ {foreach $account.registrants as $registrant}
<tr>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$request.id}">{$registrant.id}</a></td>
<td>{$registrant.fname} {$registrant.lname}</td>
<td>{$registrant.rate_name}</td>
<td>{$registrant.request_status_name}</td>
<td>{if $registrant.not_attending.value}No{else}Yes{/if}</td>
- </tr>
+ </tr>
{/foreach}
</table>
</div>
<span class="glm-nowrap"><input type="checkbox" name="inactive"{if $inputData.inactive} checked="checked"{/if}> Inactive Accounts</span>
<input type="submit" value="Submit">
</p>
-
+
</div>
<br clear="all">
<th>Phone</th>
<th>Requests</th>
<th>{$terms.reg_term_registered_cap}</th>
- <th>Created</th>
+ <th>Created</th>
</tr>
</thead>
<tbody>
{foreach $accounts as $account}
-
+
<tr id="glmRegAccountLine_{$account.id}" data-account="{$account.id}" class="glm-account-line"{if $i++ is odd by 1} alternate{/if}>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&accountID={$account.id}">{$account.id}</a></td>
<td>{$account.member_id}</td>
{$account.lname}, {$account.fname}{if $account.title}{if $account.lname != '' || $account.fname != ''} - {/if}{$account.title}{/if}
{/if}<br>
{if $account.org != ''}{$account.org}<br>{/if}
- {if $account.add1 != ''}{$account.addr1}<br>{/if}
- {if $account.add2 != ''}{$account.addr2}<br>{/if}
+ {if $account.addr1 != ''}{$account.addr1}<br>{/if}
+ {if $account.addr2 != ''}{$account.addr2}<br>{/if}
{if $account.city != ''}{$account.city}{/if}
{if $account.state.value != ''}{if $account.city != ''},ddd {/if}{$account.state.name}{/if}
{if $account.country.value}{$account.country.name}{/if}
{if $account.phone != ''}{$account.phone}<br>{/if}
{if $account.email != ''}{$account.email}<br>{/if}
</p>
-
+
</div>
{if $account.numb_requests}
<div style="float: left; margin-right: 2em;">
<td style="padding-right: 1em;">Status</td>
<td>{$terms.reg_term_attendee_plur_cap}</td>
</tr>
- {foreach $account.requests as $request}
+ {foreach $account.requests as $request}
<tr>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$request.id}">{$request.id}</a></td>
<td>{$request.date_submitted.datetime}</td>
<td>{$request.pay_method.name}</td>
<td>{$request.status.name}</td>
<td>{$request.registrants}</td>
- </tr>
+ </tr>
{/foreach}
</table>
</div>
<td style="padding-right: 1em;">Name</td>
<td style="padding-right: 1em;">{$terms.reg_term_event_cap}</td>
<td style="padding-right: 1em;">Level</td>
- <td style="padding-right: 1em;">Rate</td>
+ <td style="padding-right: 1em;">{$terms.reg_term_rate_cap}</td>
<td style="padding-right: 1em;">Requeest Status</td>
<td>Attending</td>
</tr>
- {foreach $account.registrants as $registrant}
+ {foreach $account.registrants as $registrant}
<tr>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$request.id}">{$registrant.id}</a></td>
<td>{$registrant.fname} {$registrant.lname}</td>
<td>{$registrant.rate_name}</td>
<td>{$registrant.request_status_name}</td>
<td>{if $registrant.not_attending.value}No{else}Yes{/if}</td>
- </tr>
+ </tr>
{/foreach}
</table>
</div>
return;
}
});
-
+
});
</script>
{$regEventLastTime.datetime}
</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>
</div>
<div class="glm-small-12 glm-medium-4 glm-left">
<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}
+ {$regEvent.curAvailCalc}
+ {if $regEvent.curAvailError}<br>(discrepancy in stored quantity corrected) {/if}
</div>
</div>
{/if}
</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
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 href="{$thisUrl}">
+ <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}">
possible to search for these requests by {$terms.reg_term_event}.
</p>
{/if}
- <form href="{$thisUrl}">
+ <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}">
<div class="glm-admin-table-inner glm-admin-table">
{if $haveRegEvent}
<p><h3>Dates and Availability</h3></p>
- <p>{$terms.reg_term_event_cap} occurs every day from first day to last day at the times shown.</p>
- <table>
{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>
- {if $rt.attendee_max == 0}
- <tr><th colspan="2">Unlimited {$terms.reg_term_registration} - Set maximum {$terms.reg_term_attendee_plur} quantity below to limit {$terms.reg_term_registration_plur}.</th></tr>
- {else}
- <tr><td colspan="2">Limited availability for this {$terms.reg_term_event} - the below numbers are for all days.</td></tr>
- {/if}
<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"> <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}
- </table>
{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>
<table id="glm-table-calendar" class="glm-admin-table glm-event-table">
<tr>
<td>
+ <center>
+ <h3>
+ <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>
<script type="text/javascript">
jQuery(document).ready(function($) {
+ var initialDisplay = true;
+
+ $('#regEventFrontEndButton').on('click', function() {
+ window.open("{$siteBaseUrl}{$settings.canonical_reg_page}/?event={$regEvent.event_code}", 'Registrations');
+ })
+
// Add registration dates from event dialog box
$("#regEventAddTimesDialog").dialog({
autoOpen: false,
$('#eventCalendar').fullCalendar({
timezone: 'local',
- {if $haveRegEventTimes}
- defaultDate : '{$regEvent.first_datetime.datetime}',
- {else}
defaultDate : '{$defaultCalendarDate}',
- {/if}
+
{if $regEvent}
- {if $haveRegEventTimes}
+ {if $haveRegEventTimes}
+
// Add existing registration dates/times
events: [
- {$sep = ''}
- {if $haveRegEventTimes}
- {foreach $regEvent.reg_time as $t}
+ {$sep = ''}
+ {foreach $regEvent.reg_time as $t}
{if $t.non_time_specific.value == false}
{$sep}{
{if $regEvent.time_specific.value}
- {if $t.attendee_max == 0}
+ {if $t.attendee_max == 0}
title: 'unlimited',
- {else}
+ {else}
title: '{$t.attendee_max}-{$t.attendee_count}-{$t.attendees_pending}-{$t.attendees_available}',
- {/if}
+ {/if}
{else}
title: '',
- {/if}
+ {/if} {* is time_specific event *}
start: '{$t.start_datetime.datetime}',
end: '{$t.end_datetime.datetime}',
active: {if $t.active.value}true{else}false{/if},
{$sep = ','}
{/if}
{/foreach}
- {/if}
],
- {/if}
+ {/if} {* $haveRegEventTimes *}
+
+ // Clear any initial message above calendar when there's a month change
+ viewRender: function(view, element) {
+ if (initialDisplay) {
+ initialDisplay = false;
+ } else {
+ $('#initialCalendarMessage').hide();
+ }
+ },
// Clicking on a date cell (not an existing event time) Brings up the new date dialog
dayClick: function(date, allDay, jsEvent, view) {
$('#dialogStartTime').val('00:00:00');
$('#dialogEndTime').val('23:59:59');
}
-
+
if ($('#dialogStartTime').val() == '' || $('#dialogEndTime').val() == '') {
alert('Both start and end times are required!');
} else {
datetime: startTime,
timeId: false
};
-
+
{if $regEvent.time_specific.value}
// If max or active is set, override the defaults
if (newEvent.max > 0 ) {
}
- {/if}
+ {/if} {* $regEvent *}
});
}
initFullCalendar();
- {if $regEvent.first_datetime.datetime == ''}
- alert('No dates have been added yet. Click on a date to add a date and time for this {$terms.reg_term_event} or click the "Add {$terms.reg_term_registration_plur_cap} Dates/Times from {$terms.reg_term_event_cap}" button to copy from the {$terms.reg_term_event}.');
- {/if}
- // If not date/time specific then we need to add the data for the non-date-specific time entry.
- if (!{$regEvent.time_specific.value}) {
+ // If not date/time specific then we need to add the data for the non-date-specific time entry. (this test allows it to be null and not match)
+ if ('{$regEvent.time_specific.value}' == '0') {
// Not date specific so do one counts update form
$('#maxAtt').on('change', function() {
$('#availSubmit').on('click', function() {
var max = $('#maxAtt').val();
var time = $('#availSubmit').attr('data-timeid');
-
+ checkUnlimited();
$.ajax({
url: "{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=updateAvailability&newTime=false&active=true&max=" + max + "®_time=" + time
});
+
$("#submit-flash").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
});
+ function checkUnlimited() {
+ var max = $('#maxAtt').val();
+ if (max == 0) {
+ $('#unlimitedEvent').show();
+ } else {
+ $('#unlimitedEvent').hide();
+ }
+ }
+ checkUnlimited();
}
{if $regEventAdded}<span class="glm-notice glm-flash-updated">{$terms.reg_term_registration_cap} {$terms.reg_term_event_cap} Added</span>{/if}
</h1>
+ <!-- Add New City Dialog Box -->
+ <div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
+ <table class="glm-admin-table">
+ <tr>
+ <th class="glm-required">City Name:</th>
+ <td id="newCityNameTD">
+ <input id="newCityName" type="text" name="newCityName" class="glm-form-text-input">
+ <div id="newCityNameRequired"></div>
+ </td>
+ </tr>
+ </table>
+ <p><span class="glm-required">*</span> Required</p>
+ <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
+ <input class="newCitySubmit" type="submit" value="Add new City">
+ </div>
+ <!-- New city hidden input fields go here -->
+ <span id="newCityNames"></span>
+
<p class="glm-required">(Items in red are required)</p>
- <form action="{$thisUrl}?page={$thisPage}" method="post" id="regEventForm">
+ <form action="{$thisUrl}?page={$thisPage}" method="post" id="regEventForm" enctype="multipart/form-data">
<input type="hidden" name="glm_action" value="events">
<input type="hidden" name="option" value="update">
<input type="hidden" name="regEventID" value="{$regEventID}">
+ <input type="hidden" name="event" value="{$regEvent.fieldData.event}">
+ {if !isset($regEvent.fieldData.event)}
+ {* Non-Stand-Alone events don't have member field. This keeps our Data Abstract Happy. *}
+ <input type="hidden" name="member" value="0">
+ {/if}
<table id="glm-table-settings" class="glm-registrations-table">
<tr>
<th {if $regEvent.fieldRequired.event_name}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>{$terms.reg_term_event_cap} Name:</th>
<td {if $regEvent.fieldFail.event_name}class="glm-form-bad-input" data-tabid="glm-event_name"{/if}>
<input type="text" name="event_name" value="{$regEvent.fieldData.event_name}" class="glm-form-text-input-medium">
- {if $regEvent.fieldFail.event_name}<p>{$regEvent.fieldFail.event_name}</p>{/if}<br>
+ {if $regEvent.fieldFail.event_name}<p>{$regEvent.fieldFail.event_name}</p>{/if}<br>
This name will only be used by the {$terms.reg_term_registrations_name} add-on (only for {$terms.reg_term_registration_plur}). This will not change the name of an {$terms.reg_term_event}
in the Events Calendar add-on.
</td>
{if $regEvent.fieldFail.event_code}<p>{$regEvent.fieldFail.event_code}</p>{/if}<br>
</td>
</tr>
+ <tr>
+ <th {if $regEvent.fieldRequired.time_specific}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Date/Time Specific {$terms.reg_term_registration_plur_cap}:</th>
+ <td {if $regEvent.fieldFail.time_specific}class="glm-form-bad-input" data-tabid="glm-time_specific"{/if}>
+ {if $regEvent.fieldData.time_specific.value == null}
+ <input type="radio" name="time_specific" value="0" required {if $regEvent.fieldData.time_specific.value === 0} checked{/if}> <b>NO</b> - There is only one date/time for this {$terms.reg_term_event} or {$terms.reg_term_attendee_plur} may attend at any time during this {$terms.reg_term_event}.<br>
+ <input type="radio" name="time_specific" value="1" required {if $regEvent.fieldData.time_specific.value === 1} checked{/if}> <b>YES</b> - The {$terms.reg_term_event} has more than one date/time and {$terms.reg_term_attendee_plur} attend at a specific date/time.<br>
+ <b>NOTE:</b> This setting cannot be changed. Once set, if you want to change this, you will need to delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event} and start over.
+ {else}
+ <input type="hidden" name="time_specific" value="{$regEvent.fieldData.time_specific.value}">
+ {if !$regEvent.fieldData.time_specific.value}
+ <b>NO</b> - There is only one date/time for this {$terms.reg_term_event} or {$terms.reg_term_attendee_plur} may attend at any time during this {$terms.reg_term_event}.
+ {else}
+ <b>YES</b> - The {$terms.reg_term_event} has more than one date/time and {$terms.reg_term_attendee_plur} attend at a specific date/time.
+ {/if}
+ <br><b>NOTE:</b> This setting cannot be changed. If you want this set differently, you will need to delete {$terms.reg_term_registration_plur} for this {$terms.reg_term_event} and start over.
+ {/if}
+<!--
+ <input type="checkbox" name="time_specific" {if $regEvent.fieldData.time_specific.value} checked{/if}>
+ Check this box for {$terms.reg_term_event_plur} where {$terms.reg_term_registration_plur} are for specific dates and times.
+-->
+ {if $regEvent.fieldFail.time_specific}<p>{$regEvent.fieldFail.time_specific}</p>{/if}<br>
+ </td>
+ </tr>
+
+
+ <tr><th colspan="2" class="reg-event-edit-section"><h2>General</h2></th></tr>
<tr>
<th {if $regEvent.fieldRequired.notify_email}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Notify E-Mail Address:</th>
<td {if $regEvent.fieldFail.notify_email}class="glm-form-bad-input" data-tabid="glm-notify_email"{/if}>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.time_specific}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Date/Time Specific {$terms.reg_term_registration_plur_cap}:</th>
- <td {if $regEvent.fieldFail.time_specific}class="glm-form-bad-input" data-tabid="glm-time_specific"{/if}>
- <input type="checkbox" name="time_specific" {if $regEvent.fieldData.time_specific.value} checked{/if}>
- Check this box for {$terms.reg_term_event_plur} where {$terms.reg_term_registration_plur} are for specific dates and times.
- {if $regEvent.fieldFail.time_specific}<p>{$regEvent.fieldFail.time_specific}</p>{/if}<br>
+ <th {if $regEvent.fieldRequired.not_included_in_lists}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Not Displayed in Lists:</th>
+ <td {if $regEvent.fieldFail.not_included_in_lists}class="glm-form-bad-input" data-tabid="glm-not_included_in_lists"{/if}>
+ <input type="checkbox" name="not_included_in_lists" {if $regEvent.fieldData.not_included_in_lists.value} checked{/if}> Do not display in {$terms.reg_term_registration} lists on the front-end.
+ {if $regEvent.fieldFail.not_included_in_lists}<p>{$regEvent.fieldFail.not_included_in_lists}</p>{/if}<br>
</td>
</tr>
<tr>
{if $regEvent.fieldFail.reg_hours_before}<p>{$regEvent.fieldFail.reg_hours_before}</p>{/if}<br>
</td>
</tr>
+
+ {if !$regEvent.fieldData.event}
+ <tr>
+ <th {if $regEvent.fieldRequired.cost}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Description of Cost:</th>
+ <td {if $regEvent.fieldFail.cost}class="glm-form-bad-input" data-tabid="glm-cost"{/if}>
+ <input type="text" name="cost" value="{$regEvent.fieldData.cost}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.cost}<p>{$regEvent.fieldFail.cost}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr>
+ <th {if $regEvent.fieldRequired.contact_fname}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Contact Name:</th>
+ <td {if $regEvent.fieldFail.contact_fname || $regEvent.fieldFail.contact_lname}class="glm-form-bad-input" data-tabid="glm-contact-name"{/if}>
+ First name: <input type="text" name="contact_fname" value="{$regEvent.fieldData.contact_fname}" class="glm-form-text-input-small">
+ Last name: <input type="text" name="contact_lname" value="{$regEvent.fieldData.contact_lname}" class="glm-form-text-input-small">
+ {if $regEvent.fieldFail.fname}<p>{$regEvent.fieldFail.fname}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr>
+ <th {if $regEvent.fieldRequired.contact_phone}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Contact Phone:</th>
+ <td {if $regEvent.fieldFail.contact_phone}class="glm-form-bad-input" data-tabid="glm-contact_phone"{/if}>
+ <input type="text" name="contact_phone" value="{$regEvent.fieldData.contact_phone}" class="glm-form-text-input-small">
+ {if $regEvent.fieldFail.contact_phone}<p>{$regEvent.fieldFail.contact_phone}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr>
+ <th {if $regEvent.fieldRequired.contact_email}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Contact Email:</th>
+ <td {if $regEvent.fieldFail.contact_email}class="glm-form-bad-input" data-tabid="glm-contact_email"{/if}>
+ <input type="text" name="contact_email" value="{$regEvent.fieldData.contact_email}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.contact_email}<p>{$regEvent.fieldFail.contact_email}</p>{/if}<br>
+ </td>
+ </tr>
+ {/if}
+
+ <tr><th colspan="2" class="reg-event-edit-section"><h2>{$terms.reg_term_event_cap} Location{if $regEvent.fieldData.event} - Using location from {$terms.reg_term_event}{/if}</h2></th></tr>
+
+ {if !$regEvent.fieldData.event}
+ <tr>
+ <th class="glm-nowrap-left-align">Hide Location Address:</th>
+ <td>
+ <input type="checkbox" name="hide_address" {if $regEvent.fieldData.hide_address.value} checked{/if}>
+ Don't show address to site visitors.
+ </td>
+ </tr>
+ <tr>
+ <th class="glm-nowrap-left-align">Use {$terms.term_member_cap} location:</th>
+ <td>
+ <input id="useMemberLocationCheckbox" type="checkbox" name="use_member_location" {if $regEvent.fieldData.use_member_location.value} checked{/if}>
+ <span id="useMemberMessage">Uses location data from the selected {$terms.term_member} rather than location data from here.</span>
+ <span id="notUseMemberMessage" class="glm-hidden">(To use {$terms.term_member} information instead of this location data, select a {$terms.term_member} for the event in the "Event Description" tab.)</span>
+
+
+ </td>
+ </tr>
+ <tr class="glm-member-location">
+ <th>Member to use for Location</th>
+ <td>
+ <select id="member" name="member">
+ {foreach $regEvent.fieldData.member.list as $v}
+ <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.location_name}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Location Name:</th>
+ <td {if $regEvent.fieldFail.location_name}class="glm-form-bad-input"{/if}>
+ <input type="text" name="location_name" value="{$regEvent.fieldData.location_name}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.location_name}<p>{$regEvent.fieldFail.location_name}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.address}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Street Address:</th>
+ <td {if $regEvent.fieldFail.address}class="glm-form-bad-input"{/if}>
+ <input id="address" type="text" name="address" value="{$regEvent.fieldData.address}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.address}<p>{$regEvent.fieldFail.address}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $settings.michigan_org_requirements && $lockedToMember}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>City</th>
+ <td class="glm-item-container">
+ <!-- Add new city dialog -->
+ <div class="button button-secondary glm-right new-city-button">Add a new City</div>
+ <!-- City Selection -->
+ <select id="city" class="city-picklist" name="city">
+ <option value="0"></option>
+ {foreach from=$regEvent.fieldData.city.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $settings.michigan_org_requirements && $lockedToMember}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>State:</th>
+ <td>
+ <select id="state" class="" name="state">
+ <option value=""></option>
+ {foreach from=$regEvent.fieldData.state.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.zip}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>ZIP / Postal Code:</th>
+ <td {if $regEvent.fieldFail.zip}class="glm-form-bad-input"{/if}>
+ <input id="zip" type="text" name="zip" value="{$regEvent.fieldData.zip}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.zip}<p>{$regEvent.fieldFail.zip}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th class="glm-nowrap-left-align">Country:</th>
+ <td>
+ <select id="country" name="country">
+ {foreach from=$regEvent.fieldData.country.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
+ {$v.name} {$v.value}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ {if isset($regEvent.fieldData.region) && is_array($regEvent.fieldData.region.list)}
+ <tr class="glm-reg-location">
+ <th>Region:</th>
+ <td>
+ <select name="region">
+ <option value="0"></option>
+ {foreach from=$regEvent.fieldData.region.list item=v}
+ <option value="{$v.value}"{if $v.default} selected="selected"{/if}>{$v.name}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ {/if}
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.phone}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Phone:</th>
+ <td {if $regEvent.fieldFail.phone}class="glm-form-bad-input"{/if}>
+ <input type="text" name="phone" value="{$regEvent.fieldData.phone}" class="glm-form-text-input-medium glm-phone-input">
+ {if $regEvent.fieldFail.phone}<p>{$regEvent.fieldFail.phone}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.url}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Web Address::</th>
+ <td {if $regEvent.fieldFail.url}class="glm-form-bad-input"{/if}>
+ <input type="text" name="url" value="{$regEvent.fieldData.url}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.url}<p>{$regEvent.fieldFail.url}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th {if $regEvent.fieldRequired.email}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Email Address:</th>
+ <td {if $regEvent.fieldFail.email}class="glm-form-bad-input"{/if}>
+ <input type="text" name="email" value="{$regEvent.fieldData.email}" class="glm-form-text-input-medium">
+ {if $regEvent.fieldFail.email}<p>{$regEvent.fieldFail.email}</p>{/if}<br>
+ </td>
+ </tr>
+ <tr class="glm-reg-location">
+ <th class="glm-nowrap-left-align">Location:</th>
+ <td>
+ {if $settings.selected_map_interface == 1}
+ <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.3/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
+ <script src="https://unpkg.com/leaflet@1.3.3/dist/leaflet.js" integrity="sha512-tAGcCfR4Sc5ZP5ZoVz0quoZDYX5aCtEm/eu1KhSLj2c9eFrylXZknQYmxUssFaVJKvvc0dJQixhGjG2yXWiV9Q==" crossorigin=""></script>
+ {/if}
+ {if $settings.selected_map_interface == 2}
+ <script src="//maps.googleapis.com/maps/api/js?&key={$settings.google_maps_api_key}"></script>
+ <script type="text/javascript">var enableDraggable = true;</script>
+ {/if}
+
+ <div id="glm-estimate-location" class="button button-secondary">Map Location Using Above Address</div>
+ <p>
+ {if $settings.selected_map_interface == 1}
+ <!-- Leaflet Map -->
+ <div id="locationMap" style="height: 400px; width: 100%;"></div>
+ {/if}
+
+ {if $settings.selected_map_interface == 2}
+ <!-- Google Map -->
+ <div id="locationMap" class="glm-map-edit-small" style="height: 400; width: 600px;">(map loads here)</div>
+ {/if}
+ <p>
+ <b>Position:</b>
+ Lat <input id="glmLat" name="lat" type="text" value="{$regEvent.fieldData.lat}" class="glm-form-text-input-veryshort">
+ Lon <input id="glmLng" name="lon" type="text" value="{$regEvent.fieldData.lon}" class="glm-form-text-input-veryshort">
+ <span id="..." class="button button-secondary latLonRecenter">Update pointer</span><br>
+ You may drag the map marker to the exact location desired. Also consider selecting "Satellite" view to better locate the marker.
+ </p>
+ </p>
+ </td>
+ </tr>
+ {/if} {* stand-alone registration *}
+
+ <tr><th colspan="2" class="reg-event-edit-section"><h2>Payment</h2></th></tr>
<tr>
<th {if $regEvent.fieldRequired.registration_account_options}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>{$terms.reg_term_registration_plur_cap} By:</th>
<td {if $regEvent.fieldFail.registration_account_options}class="glm-form-bad-input" data-tabid="glm-registration_account_options"{/if}>
{if $regEvent.fieldFail.restricted_payment_methods}<p>{$regEvent.fieldFail.restricted_payment_methods}</p>{/if}<br>
</td>
</tr>
+ <tr><th colspan="2" class="reg-event-edit-section"><h2>Misc</h2></th></tr>
<tr>
<th {if $regEvent.fieldRequired.descr}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>{$terms.reg_term_registration_cap} Description:</th>
- <td {if $regEvent.fieldFail.descr}class="glm-form-bad-input" data-tabid="glm-descr"{/if}>
- This will be displayed in addition to any description text from the {$terms.reg_term_event}
- {php}
- wp_editor('{$regEvent.fieldData.descr|escape:quotes}', 'glm_descr', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont use. Problem when numerous spaces before text.
- 'textarea_name' => 'descr',
- 'editor_height' => 200, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ <td {if $regEvent.fieldFail.descr}class="glm-form-bad-input" data-tabid="glm-descr"{/if}> This will be displayed in addition to any description text from the {$terms.reg_term_event}.
+ {wp_editor(
+ $regEvent.fieldData.descr,
+ 'glm_descr',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "descr",
+ "editor_height": 200
+ }', true)
+ )}
{if $regEvent.fieldFail.descr}<p>{$regEvent.fieldFail.descr}</p>{/if}
</td>
</tr>
<tr>
<th {if $regEvent.fieldRequired.terms}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Terms and Conditions <br> for {$terms.reg_term_registration_cap}:</th>
- <td {if $regEvent.fieldFail.terms}class="glm-form-bad-input" data-tabid="glm-terms"{/if}>
- the user will be required to acknowledge this at checkout.
- {php}
- wp_editor('{$regEvent.fieldData.terms|escape:quotes}', 'glm_terms', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont use. Problem when numerous spaces before text.
- 'textarea_name' => 'terms',
- 'editor_height' => 200, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ <td {if $regEvent.fieldFail.terms}class="glm-form-bad-input" data-tabid="glm-terms"{/if}> The user will be required to acknowledge this at checkout.
+ {wp_editor(
+ $regEvent.fieldData.terms,
+ 'glm_terms',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "terms",
+ "editor_height": 200
+ }', true)
+ )}
{if $regEvent.fieldFail.terms}<p>{$regEvent.fieldFail.terms}</p>{/if}
</td>
</tr>
<tr>
<th {if $regEvent.fieldRequired.reg_file}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>File:</th>
<td {if $regEvent.fieldFail.reg_file}class="glm-form-bad-input"{/if}>
+ This is a file that users may download. Depending on site design, a link to this file may be displayed to the user.<br>
{if $regEvent.fieldData.reg_file}
- <span class="glm-right">Replace this file:</b> <input type="file" name="reg_file_new"></span>
<a href="{$glmPluginMediaUrl}/files/{$regEvent.fieldData.reg_file}" target="event_file">{$regEvent.fieldData.reg_file}</a>
<input type="checkbox" name="reg_file_delete"> Delete File<br>
+ Replace this file:</b> <input type="file" name="reg_file_new">
{else}
New file:</b> <input type="file" name="reg_file_new">
{/if}
<tr>
<th {if $regEvent.fieldRequired.notes}class="glm-required-nowrap-left-align"{else}class="glm-nowrap-left-align"{/if}>Notes:</th>
<td {if $regEvent.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-notes"{/if}>
+ This field is for general notes you may want to keep regarding this {$terms.reg_term_registration} {$terms.reg_term_event}. <br>
+ These notes are only displayed here and are not displayed to Website users.<br>
<textarea name="notes" class="glm-form-textarea">{$regEvent.fieldData.notes}</textarea>
{if $regEvent.fieldFail.notes}
<p>{$regEvent.fieldFail.notes}</p>
<script type="text/javascript">
jQuery(document).ready(function($) {
+ // Function to initialize actions related to a specific location
+ var mapLocationAuto = false; // Flags for each location indicating whether the location should be doing auto map updates when entering the address
+ function initLocation() {
+
+ // Get lat and lon from the input fields
+ var glmLat = $('#glmLat').val();
+ var glmLng = $('#glmLng').val();
+
+ initMap();
+ initNewCity();
+
+ }
+
+ /*
+ * Initialize the Member Location Checkbox
+ */
+ function initMemberLocationCheckbox() {
+ // Check Use Member Location checkbox
+ memberID = $('#memberSelect').val();
+ otherMemberID = $('#useOtherRefDest').val();
+ if (memberID == '') {
+
+ // No member selected - Clear checkbox, Disable checkbox, Show location
+ $('#useMemberLocationCheckbox').prop('checked', false);
+ $('#useMemberLocationCheckbox').prop('disabled', true);
+ $('#useMemberMessage').addClass('glm-hidden');
+ $('#notUseMemberMessage').removeClass('glm-hidden');
+ if ( otherMemberID == '' ) {
+ $('#locationContainer').removeClass('glm-hidden');
+ }
+
+ } else {
+
+ // Member set - Enable checkbox
+ $('#useMemberLocationCheckbox').prop('disabled', false);
+ $('#useMemberMessage').removeClass('glm-hidden');
+ $('#notUseMemberMessage').addClass('glm-hidden');
+
+ }
+ }
+
+
+ /*
+ * Map operations
+ */
+
+ //show error if location can't be found
+ function showError() {
+ alert("Location can't be found");
+ }
+
+ /*
+ * Mapping
+ */
+ var map = new Object();
+ var geocoder = new Object();
+ var location = new Object();
+ var marker = new Object();
+
+ {if $settings.selected_map_interface == 1}
+
+ var nominatimAPI = "https://nominatim.openstreetmap.org/search/";
+
+ /*
+ * Leaflet Map
+ * API reference: https://leafletjs.com/reference-1.3.2.html
+ */
+ function initMap() {
+
+ // Set default - Need to make this configurable
+ var startLat = $('#glmLat').val();
+ var startLon = $('#glmLng').val();
+ var defZoom = Number({$settings.maps_default_zoom});
+
+ map = L.map('locationMap').setView([startLat, startLon], defZoom);
+ //var leafletTileServer = '{$settings.leaflet_tile_server}' + {literal}'{z}/{x}/{y}.png'{/literal};
+ var leafletTileServer = '{$settings.leaflet_tile_server}/{$settings.leaflet_tile_server_key}/' + {literal}'{z}/{x}/{y}.png'{/literal};
+ var leafletMinZoom = 5;
+ var leafletMaxZoom = 18;
+
+ // Tile server
+ L.tileLayer(leafletTileServer, {
+ attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.gaslightmedia.com/">Gaslight Media</a>',
+ minZoom: leafletMinZoom,
+ maxZoom: leafletMaxZoom,
+ id: 'nothot'
+ }).addTo(map);
+
+ // Marker
+ var leafletMarker = L.marker([startLat, startLon], {
+ draggable: true
+ }).addTo(map);
+
+ // Marker Drag/Drop action
+ leafletMarker.on('dragend', function(event){
+ var marker = event.target;
+ var position = marker.getLatLng();
+
+ marker.setLatLng(new L.LatLng(position.lat, position.lng),{ draggable:'true' });
+ map.panTo(new L.LatLng(position.lat, position.lng))
+
+ // Assign it to the lat/lon fields for submission
+ $('#glmLat').val(position.lat.toFixed(6));
+ $('#glmLng').val(position.lng.toFixed(6));
+ });
+
+ // When estimate location button is clicked, geocode using address
+ var addressMapFail = 'Sorry, we were unable to get a map position from the address provided.';
+
+ // Do address lookup if "Map Location" button clicked
+ $('#glm-estimate-location').on('click', function() {
+ lookupAddress();
+ });
+
+ // Do address lookup if ZIP is changed and the lat/lon is still the default
+ $('#zip').on('change', function() {
+ var addrZip = $('#zip').val();
+ var lat = $('#glmLat').val();
+ var lng = $('#glmLng').val();
+ if ({$settings.maps_default_lat} == lat && {$settings.maps_default_lon} == lng ) {
+ alert("The map location for this address has not yet been set.\n\nWe'll try to find it, but if the map location isn't correct,\nyou can drag to pointer to the correct location.");
+ lookupAddress();
+ }
+ });
+
+ // Do address lookup using Nominatim
+ function lookupAddress() {
+ var addrStreet = $('#address').val();
+ var addrCity = $('#city' + ' option:selected').text().trim();
+ var addrState = $('#state').val();
+ var addrCountry = $('#country').val();
+ var addrZip = $('#zip').val();
+
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip,
+ result: 1
+ })
+ .fail(function(data) {
+ alert('Sorry, we had a communications failure. 2');
+ })
+ .done(function( data ) {
+
+ if( !data[0] || !data[0].lat || !data[0].lon || data[0].type == 'unclassified') {
+
+ // Not found, try again without city name
+ // Nominatim doesn't always find with the US ZIP preferred city name
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ // city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip,
+ result: 1
+ })
+ .fail(function(data) {
+ alert('Sorry, we had a communications failure. 2');
+ })
+ .done(function( data ) {
+ if( !data[0] || !data[0].lat || !data[0].lon ) {
+ alert(addressMapFail);
+ } else {
+ // console.log(data[0]);
+ assignNewPosition(data);
+ alert('We were unable to match all of your address data but did find this location.\n\n' + data[0].display_name + '\n\nPlease check that it is correct and adjust as needed by dragging the map pointer.\nYou may also want to check the city selected in the address.');
+ }
+ });
+ } else {
+ assignNewPosition(data);
+ }
+
+ });
+
+ }
+
+ // Assign a position found by the Nominatim search above
+ function assignNewPosition(data) {
+
+ // Assign the new position to the hidden fields for submission
+ glmLat = Number(data[0].lat);
+ glmLng = Number(data[0].lon);
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
+
+ setPointerLatLon(glmLat, glmLng);
+ }
+
+ // Move map pointer to specified lat/lon location
+ function setPointerLatLon(lat, lon) {
+ leafletMarker.setLatLng(new L.LatLng(lat, lon),{ draggable:'true' });
+ map.panTo(new L.LatLng(lat, lon));
+ }
+
+ // Adjust pointer position when "Update Pointer" is clicked
+ $('.latLonRecenter').on('click', function() {
+
+ // Stop any automatic updates
+ mapLocationAuto = false;
+
+ // Get lat and lon from the input fields
+ var glmLat = $('#glmLat').val();
+ var glmLng = $('#glmLng').val();
+
+ setPointerLatLon(glmLat, glmLng);
+// initMap();
+
+ return false;
+
+ });
+
+ }
+ {/if}
+
+
+ {if $settings.selected_map_interface == 2}
+ function initMap() {
+
+ // Set default - Need to make this configurable
+ var startLat = $('#glmLat').val();
+ var startLon = $('#glmLng').val();
+
+ location = new google.maps.LatLng(startLat, startLon);
+ map = new google.maps.Map(document.getElementById('locationMap'), {
+ zoom: 15,
+ disableDefaultUI: false,
+ mapTypeId: google.maps.MapTypeId.MAP,
+ });
+
+ geocoder = new google.maps.Geocoder();
+ marker = new google.maps.Marker({
+ map: map,
+ position: location,
+ draggable: enableDraggable,
+ animation: google.maps.Animation.DROP,
+ title: "This is your location"
+ });
+ map.setCenter(location);
+
+ // Listen for an end of drag event for the map marker
+ google.maps.event.addListener(marker,'dragend',function(event) {
+
+ // Stop any automatic updates
+ mapLocationAuto = false;
+
+ // Get the end postion
+ glmLat = this.position.lat();
+ glmLng = this.position.lng();
+
+ // Assign it to the hidden fields for submission
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
+
+ // Also display it to the user
+ $('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
+ });
+
+ // When estimate location button is clicked, geocode using address
+ $('#glm-estimate-location').on('click', function() {
+
+ // Stop any automatic updates
+ mapLocationAuto = false;
+
+ glmGeocode();
+ });
+
+ // When an address is updated and mapLocationAuto is set, geocode using address
+ $('.location-address').on('change', function() {
+ if (mapLocationAuto) {
+ glmGeocode();
+ }
+ });
+
+ }
+
+ function glmGeocode() {
+
+ // Get all address parts
+ var geoAddr1 = $('#address' ).val().trim();
+ var geoAddr2 = ''; // $('#addr2').val().trim();
+ var geoCity = $('#city').find('option:selected').text().trim();
+ var geoState = $('#state').val();
+ var geoZIP = $('#zip').val().trim();
+ var geoCountry = $('#country').find('option:selected').text().trim();
+
+ // Assemble address string for
+ var geoAddress = geoAddr1 + ', ' + geoAddr2 + ', ' + geoCity + ', ' + geoState + ' ' + geoZIP + ', ' + geoCountry;
+
+ // Send to Google Geocoder
+ geocoder.geocode( { 'address': geoAddress }, function(results, status) {
+
+ // If we have a geocode solution
+ if (status == google.maps.GeocoderStatus.OK) {
+
+ // Center the map and locate the marger to the new location
+ map.setCenter(results[0].geometry.location);
+ marker.setPosition( results[0].geometry.location );
+
+ // Assign the new position to the hidden fields for submission
+ glmLat = results[0].geometry.location.lat();
+ glmLng = results[0].geometry.location.lng();
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
+
+ // Also display it to the user
+ $('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
+
+ // Otherwise tell the user.
+ } else {
+ alert('Not able to estimate map position from the current address.');
+ }
+ });
+
+
+ }
+
+ {/if}
+
+
+ /*
+ * New City Dialog
+ */
+
+ var newCityLocation = false;
+ function initNewCity() {
+
+ // Setup dialog box for adding a new city
+ $("#newCityDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#newCityCancel').click( function() {
+ $("#newCityDialog").dialog("close");
+ $('#newCityNameTD').removeClass('glm-form-bad-input');
+ $('#newCityNameRequired').text('');
+ $('#newCityName').val('');
+ });
+
+ // Add a new city button action - pop-up dialog
+ $('.new-city-button').click( function() {
+ newCityLocation = $(this).attr('data-id');
+ $("#newCityDialog").dialog("open");
+ });
+
+ }
+
+ // Submit new city
+ var newCityCount = 0
+ var listedCities = new Object();
+
+ // Add list of existing cities for duplicate check
+ {if isset($locations)}
+ {foreach $locations as $loc}
+ {foreach $loc.city.list as $v}
+ listedCities["{$v.name}"] = true;
+ {/foreach}
+ {/foreach}
+ {/if}
+ $('.newCitySubmit').click( function() {
+
+ // Get new city name
+ var newCityName = $('#newCityName').val();
+
+ // If no name is supplied, notify used it's required
+ if (newCityName == '') {
+ $('#newCityNameTD').addClass('glm-form-bad-input');
+ $('#newCityNameRequired').text('A city name is required!');
+ return false;
+ } else {
+ $('#newCityNameTD').removeClass('glm-form-bad-input');
+ $('#newCityNameRequired').text('');
+ }
+
+ // Check list of new cities added to make sure we don't add a duplicate
+ if (typeof listedCities[newCityName] !== "undefined") {
+ $('#newCityNameTD').addClass('glm-form-bad-input');
+ $('#newCityNameRequired').text('This city is already listed!');
+ return false;
+ }
+
+ // Add new city name to the hidden field that will pass the new name to PHP.
+ newCityCount++;
+ $('#newCityNames').append('<input type="hidden" name="newCity[n_' + newCityCount + ']" value="' + newCityName + '">');
+
+ // Remember this city to check for duplicates being added
+ listedCities[newCityName] = true;
+
+ $('.city-picklist').append('<option value="n_' + newCityCount + '">' + newCityName + '</option>');
+ $('#city_' + newCityLocation).val("n_" + newCityCount);
+
+ // Clear new city name from form
+ $('#newCityName').val('');
+
+ $('#newCityDialog').dialog("close");
+
+ });
+
+
+ {* if there iss no event ID then will be using the location in the reg_event record. *}
+ {if !$regEvent.fieldData.event}
+ initLocation();
+ {/if}
+
+ // Hide Address Code
+ var addressHidden = false;
+ $('#useMemberLocationCheckbox').on('change', function() {
+ checkMemberLocation();
+ })
+ function checkMemberLocation() {
+ if ($('#useMemberLocationCheckbox').is(':checked')) {
+ $('.glm-reg-location').hide();
+ $('.glm-member-location').show();
+ } else {
+ $('.glm-reg-location').show();
+ $('.glm-member-location').hide();
+ }
+ }
+ checkMemberLocation();
+
// Flash certain elements for a short time after display
$(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
<div class="glm-right">
<a data-option="editLevel" data-id="{$level.id}" class="reg-level-edit-button button button-secondary glm-button-small">Edit</a>
<a data-option="deleteLevel" data-id="{$level.id}" class="reg-level-delete-button button button-secondary glm-button-small">Delete</a>
- <a data-option="addRate" data-id="{$level.id}" class="reg-level-add-rate-button button button-secondary glm-button-small">Add Rate</a>
+ <a data-option="addRate" data-id="{$level.id}" class="reg-level-add-rate-button button button-secondary glm-button-small">Add {$terms.reg_term_rate_cap}</a>
</div>
<div class="reg-level-label">
<h3 id="regLevelName_{$level.id}">{$level.name}</h3>
<div class="glm-rate-header">
<div class="glm-right">
<a data-option="editRate" data-id="{$rate.id}" data-level="{$level.id}" class="reg-rate-edit-button button button-secondary glm-button-small">Edit</a>
- <a data-option="deleteRate" data-id="{$rate.id}" data-level="{$level.id}" class="reg-rate-delete-button button button-secondary glm-button-small">Delete Rate</a>
+ <a data-option="deleteRate" data-id="{$rate.id}" data-level="{$level.id}" class="reg-rate-delete-button button button-secondary glm-button-small">Delete {$terms.reg_term_rate_cap}</a>
</div>
<div class="reg-rate-label-container">
<h3 id="regRateName_{$rate.id}">{$rate.name}</h3>
<a data-option="cancelEditRate" data-id="{$rate.id}" class="reg-rate-edit-cancel-button button glm-button-small">Cancel</a>
<a data-option="updateEditRate" data-id="{$rate.id}" class="reg-rate-edit-update-button button glm-button-small-highlighted">Update</a>
</div>
- <h3>Rate Days and Costs</h3>
+ <h3>{$terms.reg_term_rate_cap} Days and Costs</h3>
<div class="glm-rate-label" style="padding-bottom: .3em;">
<table class="glm-admin-table">
<tr>
<th></th>
<td>
<p>
- "Rates" are a schedule of what is paid to {$terms.reg_term_register} for an {$terms.reg_term_event}. Rates can change based on the number of days until the {$terms.reg_term_event}.
+ "{$terms.reg_term_rate_plur_cap}" are a schedule of what is paid to {$terms.reg_term_register} for an {$terms.reg_term_event}. {$terms.reg_term_rate_plur_cap} can change based on the number of days until the {$terms.reg_term_event}.
For example, an earier {$terms.reg_term_registration} may be less expensive than a last minute {$terms.reg_term_registration}.
- The start and end days for a rate must not overlap that of another rate for the same {$terms.reg_term_registration} level.
+ The start and end days for a {$terms.reg_term_rate} must not overlap that of another {$terms.reg_term_rate} for the same {$terms.reg_term_registration} level.
The earliest "Start Days" determines the earliest date on which {$terms.reg_term_registration} is available and the last "End Days" closest to the {$terms.reg_term_event} determines the last date on which {$terms.reg_term_registration} is available.
</p>
</td>
</tr>
<tr><td> </td><td class="glm-required">Required fields are in red.</td></tr>
<tr>
- <th style="white-space: nowrap;" class="glm-required">Rate Name:</th>
+ <th style="white-space: nowrap;" class="glm-required">{$terms.reg_term_rate_cap} Name:</th>
<td>
<input id="rateName_{$rate.id}" class="rate-name glm-form-text-input" type="text" name="name_{$rate.id}" value="{$rate.name}">
</td>
<th style="white-space: nowrap;" class="glm-required">Start Days</th>
<td>
<input id="rateStartDays_{$rate.id}" class="rate-start-days glm-form-text-input-veryshort" type="text" name="start_days_{$rate.id}" value="{$rate.start_days}">
- Number of days before {$terms.reg_term_event} that this rate starts. Must not overlap other rates.
+ Number of days before {$terms.reg_term_event} that this {$terms.reg_term_rate} starts. Must not overlap other {$terms.reg_term_rate_plur}.
</td>
</tr>
<tr>
<th style="white-space: nowrap;" class="glm-required">End Days:</th>
<td>
<input id="rateEndDays_{$rate.id}" class="rate-end-days glm-form-text-input-veryshort" type="text" name="end_days_{$rate.id}" value="{$rate.end_days}">
- Number of days before {$terms.reg_term_event} that this rate ends. Must not overlap other rates.
+ Number of days before {$terms.reg_term_event} that this {$terms.reg_term_rate} ends. Must not overlap other {$terms.reg_term_rate_plur}.
</td>
</tr>
<tr>
<th style="white-space: nowrap;">Cost:</th>
<td>
- <span class="glm-nowrap"><span class="glm-required"><b>Base Rate</b></span> $<input id="rateBaseRate_{$rate.id}" class="rate-base-rate glm-form-text-input-veryshort" type="text" name="base_rate_{$rate.id}" value="{$rate.base_rate|string_format:"%.2f"}"></span>
+ <span class="glm-nowrap"><span class="glm-required"><b>Base {$terms.reg_term_rate_cap}</b></span> $<input id="rateBaseRate_{$rate.id}" class="rate-base-rate glm-form-text-input-veryshort" type="text" name="base_rate_{$rate.id}" value="{$rate.base_rate|string_format:"%.2f"}"></span>
<span class="glm-nowrap"><span class="glm-required"><b>Rate Per-Registrant</b></span> $<input id="ratePerRegistrant_{$rate.id}" class="rate-per-registrant glm-form-text-input-veryshort" type="text" name="per_registrant_{$rate.id}" value="{$rate.per_registrant|string_format:"%.2f"}"></span>
- <span class="glm-nowrap"><span class="glm-required"><b>Registrants included in Base Rate</b></span> <input id="rateRegistrantCredits_{$rate.id}" class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_{$rate.id}" value="{$rate.registrant_credits}"></span>
+ <span class="glm-nowrap"><span class="glm-required"><b>Registrants included in Base {$terms.reg_term_rate_cap}</b></span> <input id="rateRegistrantCredits_{$rate.id}" class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_{$rate.id}" value="{$rate.registrant_credits}"></span>
<br>
</td>
</tr>
<div class="glm-right ">
<a data-option="editLevel" data-id="{ id }" class="reg-level-edit-button button button-secondary glm-button-small">Edit</a>
<a data-option="deleteLevel" data-id="{ id }" class="reg-level-delete-button button button-secondary glm-button-small">Delete</a>
- <a data-option="addRate" data-id="{ id }" class="reg-level-add-rate-button button button-secondary glm-button-small">Add Rate</a>
+ <a data-option="addRate" data-id="{ id }" class="reg-level-add-rate-button button button-secondary glm-button-small">Add {$terms.reg_term_rate_cap}</a>
</div>
<div class="reg-level-label">
<h3 id="regLevelName_{ id }">{ pendingName }</h3>
<div class="glm-rate-header">
<div class="glm-right">
<a data-option="editRate" data-id="{ id }" data-level="{ levelId }" class="reg-rate-edit-button button button-secondary glm-button-small">Edit</a>
- <a data-option="deleteRate" data-id="{ id }" data-level="{ levelId }" class="reg-rate-delete-button button button-secondary glm-button-small">Delete Rate</a>
+ <a data-option="deleteRate" data-id="{ id }" data-level="{ levelId }" class="reg-rate-delete-button button button-secondary glm-button-small">Delete {$terms.reg_term_rate_cap}</a>
</div>
<div class="reg-rate-label-container">
<h3 id="regRateName_{ id }">{ pendingRateName }</h3>
<a data-option="cancelEditRate" data-id="{ id }" class="reg-rate-edit-cancel-button button glm-button-small">Cancel</a>
<a data-option="updateEditRate" data-id="{ id }" class="reg-rate-edit-update-button button glm-button-small-highlighted">Update</a>
</div>
- <h3>Rate Days and Costs</h3>
+ <h3>{$terms.reg_term_rate_cap} Days and Costs</h3>
<div class="glm-rate-label" style="padding-bottom: .3em;">
<table class="glm-admin-table">
<tr>
<th></th>
<td>
<p>
- "Rates" are a schedule of what is paid to {$terms.reg_term_register} for an {$terms.reg_term_event}. Rates can change based on the number of days until the {$terms.reg_term_event}.
+ "{$terms.reg_term_rate_cap}" are a schedule of what is paid to {$terms.reg_term_register} for an {$terms.reg_term_event}. {$terms.reg_term_rate_plur_cap} can change based on the number of days until the {$terms.reg_term_event}.
For example, an earier {$terms.reg_term_registration} may be less expensive than a last minute {$terms.reg_term_registration}.
- The start and end days for a rate must not overlap that of another rate for the same {$terms.reg_term_registration} level.
+ The start and end days for a {$terms.reg_term_rate} must not overlap that of another {$terms.reg_term_rate} for the same {$terms.reg_term_registration} level.
The earliest "Start Days" determines the earliest date on which {$terms.reg_term_registration} is available and the last "End Days" closest to the {$terms.reg_term_event} determines the last date on which {$terms.reg_term_registration} is available.
</p>
</td>
</tr>
<tr><td> </td><td class="glm-required">Required fields are in red.</td></tr>
<tr>
- <th style="white-space: nowrap;" class="glm-required">Rate Name:</th>
+ <th style="white-space: nowrap;" class="glm-required">{$terms.reg_term_rate_cap} Name:</th>
<td>
<input id="rateName_{ id }" class="rate-name glm-form-text-input" type="text" name="name_{ id }" value="{ pendingRateName }">
</td>
<th style="white-space: nowrap;" class="glm-required">Start Days</th>
<td>
<input id="rateStartDays_{ id }" class="rate-start-days glm-form-text-input-veryshort" type="text" name="start_days_{ id }" value="{ pendingRateStartDays }">
- Number of days before {$terms.reg_term_event} that this rate starts. Must not overlap other rates.
+ Number of days before {$terms.reg_term_event} that this {$terms.reg_term_rate} starts. Must not overlap other {$terms.reg_term_rate}s.
</td>
</tr>
<tr>
<th style="white-space: nowrap;" class="glm-required">End Days:</th>
<td>
<input id="rateEndDays_{ id }" class="rate-end-days glm-form-text-input-veryshort" type="text" name="end_days_{ id }" value="{ pendingRateEndDays }">
- Number of days before {$terms.reg_term_event} that this rate ends. Must not overlap other rates.
+ Number of days before {$terms.reg_term_event} that this {$terms.reg_term_rate} ends. Must not overlap other {$terms.reg_term_rate_plur}.
</td>
</tr>
<tr>
<th style="white-space: nowrap;">Cost:</th>
<td>
- <span class="glm-nowrap"><span class="glm-required"><b>Base Rate</b></span> $<input id="rateBaseRate_{ id }" class="rate-base-rate glm-form-text-input-veryshort" type="text" name="base_rate_{ id }" value="{ pendingRateBaseRate }"></span>
- <span class="glm-nowrap"><span class="glm-required"><b>Rate Per-Registrant</b></span> $<input id="ratePerRegistrant_{ id }" class="rate-per-registrant glm-form-text-input-veryshort" type="text" name="per_registrant_{ id }" value="{ pendingRatePerRegistrant }"></span>
- <span class="glm-nowrap"><span class="glm-required"><b>Registrants included in Base Rate</b></span> <input id="rateRegistrantCredits_{ id }" class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_{ id }" value="{ pendingRateRegistrantCredits }"></span>
+ <span class="glm-nowrap"><span class="glm-required"><b>Base {$terms.reg_term_rate_cap}</b></span> $<input id="rateBaseRate_{ id }" class="rate-base-rate glm-form-text-input-veryshort" type="text" name="base_rate_{ id }" value="{ pendingRateBaseRate }"></span>
+ <span class="glm-nowrap"><span class="glm-required"><b>{$terms.reg_term_rate_cap} Per-Registrant</b></span> $<input id="ratePerRegistrant_{ id }" class="rate-per-registrant glm-form-text-input-veryshort" type="text" name="per_registrant_{ id }" value="{ pendingRatePerRegistrant }"></span>
+ <span class="glm-nowrap"><span class="glm-required"><b>Registrants included in Base {$terms.reg_term_rate_cap}</b></span> <input id="rateRegistrantCredits_{ id }" class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_{ id }" value="{ pendingRateRegistrantCredits }"></span>
<br>
</td>
</tr>
case 'deleteLevel':
levelId = $(this).data('id');
- if (!checkEditActive() && levelId && confirm('Are you sure you want to delete this {$terms.reg_term_level} and all rates under it?')) {
+ if (!checkEditActive() && levelId && confirm('Are you sure you want to delete this {$terms.reg_term_level} and all {$terms.reg_term_rate_plur} under it?')) {
// Send delete request via AJAX
var formData = {
case 'deleteRate':
rateId = $(this).data('id');
- if (!checkEditActive() && rateId && confirm('Are you sure you want to delete this rate?')) {
+ if (!checkEditActive() && rateId && confirm('Are you sure you want to delete this {$terms.reg_term_rate}?')) {
// Send delete request via AJAX
var formData = {
</div>
<div class="glm-row">
<div class="glm-small-12 glm-column">
- {php}
- wp_editor(
- '{if !$newEntry}{$regNotifications.fieldData.message|escape:quotes}{/if}',
- 'message',
- array(
- 'media_buttons' => false,
- 'textarea_name' => 'message[{if $newEntry}-1{else}{$regNotifications.fieldData.id}{/if}]',
- 'editor_height' => 300,
- )
- );
- {/php}
+ {if isset($regNotifications)}
+ {$messageID = $regNotifications.fieldData.id}
+ {else}
+ {$messageID = "new"}
+ {/if}
+ {$wpArgs = "{
+ \"media_buttons\": false,
+ \"quicktags\": false,
+ \"textarea_name\": \"message[`$messageID`]\",
+ \"editor_height\": 250
+ }"}
+ {wp_editor(
+ $regNotifications.fieldData.message|stripslashes,
+ "glm-message",
+ json_decode($wpArgs, true)
+ )}
+
</div>
</div>
</div>
});
// console.log( 'cal:', calendar );
}
-
+/*
initFullCalendar();
getSendDate();
$('#notificationDays').click(function(){
// Flash certain elements for a short time after display
$(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
-
+*/
});
</script>
<tr><td colspan="2">
<!-- Add Registration Payment Code Button and Dialog Box -->
<div id="newPaymentCodeDialog" class="glm-dialog-box" title="Enter a New {$terms.reg_term_payment_code_cap}" stye="">
- <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <form action="{$thisUrl}?page={$thisPage}®EventID={$regEventId}" method="post" enctype="multipart/form-data">
{if $option == 'globalCodes'}
<input type="hidden" name="option" value="globalCodes">
{else}
<input type="hidden" name="option" value="paymentCodes">
{/if}
<input type="hidden" name="option2" value="new">
+
<table class="glm-admin-table">
<tr>
<th class="glm-required">{$terms.reg_term_payment_code_cap}:</th>
<tr>
<td>
<input type="hidden" value="{$eventPaycodeType}" name="ref_type">
-{if $option == 'globalCodes'}
+{if $option == 'globalCodes'}
<input type="hidden" value="0" name="ref_dest">
{else}
<input type="hidden" value="{$regEventID}" name="ref_dest">
-{/if}
+{/if}
</td>
</tr>
<tr>
</tr>
</table>
<p><span class="glm-required">*</span> Required</p>
- <a id="newPaymentCodeCancel" class="button button-primary glm-right">Cancel</a>
- <input type="submit" value="Add new {$terms.reg_term_payment_code_cap}" class="button button-primary">
+ <a id="newPaymentCodeCancel" class="button button-secondary glm-right">Cancel</a>
+ <input type="submit" value="Add new {$terms.reg_term_payment_code_cap}" class="button button-secondary">
</form>
</div>
<!-- Edit Registration Payment Code Dialog Box -->
<div id="editPaymentCodeDialog" class="glm-dialog-box" title="Edit this {$terms.reg_term_payment_code_cap}">
- <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <form action="{$thisUrl}?page={$thisPage}®EventID={$regEventId}" method="post" enctype="multipart/form-data">
{if $option == 'globalCodes'}
<input type="hidden" name="option" value="globalCodes">
{else}
</tr>
</table>
<p><span class="glm-required">*</span> Required</p>
- <a id="editPaymentCodeCancel" class="button button-primary glm-right">Cancel</a>
+ <a id="editPaymentCodeCancel" class="button button-secondary glm-right">Cancel</a>
<input type="submit" value="Update this {$terms.reg_term_payment_code_cap}">
</form>
<tr>
{if $option == 'globalCodes'}
<th colspan="5"><h3>{$terms.reg_term_payment_code_plur_cap} that apply to any {$terms.reg_term_event}</h3></th>
- <td><a id="newPaymentCodeButton" class="button button-primary glm-button glm-right" onClick="return;">Add Global {$terms.reg_term_payment_code_cap}</a></td>
+ <td><a id="newPaymentCodeButton" class="button button-secondary glm-button glm-right" onClick="return;">Add Global {$terms.reg_term_payment_code_cap}</a></td>
{else}
<th colspan="5"><h3>{$terms.reg_term_payment_code_plur_cap} that apply to any {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}</h3></th>
- <td><a id="newPaymentCodeButton" class="button button-primary glm-button glm-right" onClick="return;">Add {$terms.reg_term_event_cap} {$terms.reg_term_payment_code_cap}</a></td>
+ <td><a id="newPaymentCodeButton" class="button button-secondary glm-button glm-right" onClick="return;">Add {$terms.reg_term_event_cap} {$terms.reg_term_payment_code_cap}</a></td>
{/if}
</tr>
{if $havePayCodes}
<td><div id="paymentCode_{$p.id}">{$p.code}</div></td>
<td><div id="paymentType_{$p.id}" data-value="{$p.code_type.value}">{$p.code_type.name}</div></td>
<td>
- {if $p.code_type.value==20}
+ {if $p.code_type.value==20}
${$p.amount|number_format:2}
{elseif $p.code_type.value==30}
{$p.amount|number_format:2}%
<script type="text/javascript">
jQuery(document).ready(function($) {
+ // Payment Dialog Box actions
$("#newPaymentCodeDialog").dialog({
autoOpen: false,
minWidth: 500,
minWidth: 500,
dialogClass: "glm-dialog-no-close"
});
-
$('#newPaymentCodeButton').click( function() {
$("#newPaymentCodeDialog").dialog("open");
});
$('.editPaymentCode').click( function() {
- var paycodeID = $(this).attr('data-paycodeID');
+ var paycodeID = $(this).attr('data-paycodeID');
var paycode = $('#paymentCode_' + paycodeID).html();
var paycodeType = $('#paymentType_' + paycodeID).html();
var paycodeTypeValue = $('#paymentType_' + paycodeID).data('value');
$('#edit-amount').val(paycodeAmount);
$('#edit-expire').val(paycodeExpire);
$('#edit-descr').val(paycodeDescr);
-
+
$("#edit-code-type option").filter(function() {
- return parseInt($(this).val()) === parseInt(paycodeTypeValue);
+ return parseInt($(this).val()) === parseInt(paycodeTypeValue);
}).prop('selected', true);
-
-
$("#editPaymentCodeDialog").dialog("open");
});
$('#editPaymentCodeCancel').click( function() {
$('#deletePaymentCodeConfirm').click( function() {
$("#deletePaymentCodeDialog").dialog("close");
{if $option == 'globalCodes'}
- window.location.href = "{$thisUrl}?page={$thisPage}&option=globalCodes&option2=delete&payCodeId=" + id;
+ window.location.href = "{$thisUrl}?page={$thisPage}&option=globalCodes&option2=delete&payCodeId=" + id + "®EventID={$regEventId}";
{else}
- window.location.href = "{$thisUrl}?page={$thisPage}&option=paymentCodes&option2=delete&payCodeId=" + id;
+ window.location.href = "{$thisUrl}?page={$thisPage}&option=paymentCodes&option2=delete&payCodeId=" + id + "®EventID={$regEventId}";
{/if}
});
$('#deletePaymentCodeCancel').click( function() {
// Various input masks for credit card input
$(".date-input-mask").mask("00/00/0000");
-
+
});
</script>
<input type="hidden" name="limit" value="{$limit}">
<div>
<p>
-<!--
+<!--
<span class="glm-nowrap">
<b>Don't show attendees in pending or invalid carts:</b>
<input type="checkbox" name="complete" value="1"{if $completed} checked{/if}>
</span>
--->
+-->
<span class="glm-nowrap">
<b>Text Search:<input type="text" name="textSearch" value="{if $textSearch}{$textSearch}{/if}"></b>
</span>
</div>
<div class="glm-admin-table-inner glm-admin-table">
-
+
<p><b>Total found:</b> {if $haveRegistrants}{$registrantCount}{else}(none){/if} </p>
-
+
{if $paging}
<input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.reg_term_attendee_plur_cap}" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
<input type="Submit" name="pageSelect" value="Next {$limit} {$terms.reg_term_attendee_plur_cap}" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
{/if}
-
+
{* Attendee Listing Table *}
{* Showing the results from reg_request_registrant table *}
<table class="wp-list-table striped glm-admin-table-single" style="width: 100%;">
<thead>
<tr>
<th>Name</th>
+ <th>Organization</th>
<th>Level</th>
<th>Event Date/Time</th>
- <th>Rate</th>
+ <th>{$terms.reg_term_rate_cap}</th>
<th>Status</th>
<th>Submitted</th>
<th>Not Attending</th>
<span class="glm-attendee-fullname-{$r.id}">{$r.fname} {$r.lname}</span>
</span>
</td>
+ <td>{$r.account.org}</td>
<td>{$r.class_name}</td>
<td>{$r.event_time_reformatted}</td>
<td>{$r.rate_name}</td>
<a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.reg_request}">View Request</a> |
</span>
<span class="attendee-edit-link">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&accountID={$r.account.id}">View Account</a>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&accountID={$r.account.id}">View Account</a>
</span>
{if $r.request_status == 0}
|
<span class="attendee-edit-link">
<a href="{$regUrl}?page=cart&cartId={$r.reg_request}&cartCheck={$r.cartCheck}" target="_cart">Access Cart</a>
</span>
- {/if}
-
+ {/if}
+
</td>
</tr>
<tr class="glm-edit-form glm-edit-form-{$r.id}{if $r@iteration is div by 2} alternate{/if}" style="display:none; background-color: #fff;">
- <td colspan="5" style="border: 1px #ccc solid;">
+ <td colspan="7" style="border: 1px #ccc solid;">
<div class="glm-row" style="margin-bottom: 0px !important; margin-top: .5rem;">
<div id="glm-attendee-{$r.id}" class="glm-columns glm-small-{if apply_filters('glm-members-customfields-plugin-active', false)}6{else}12{/if}">
- <b>{$r.account.email}</b>
+ <h3>{$terms.reg_term_attendee_cap} Quick Edit Form</h3>
<p>
<input id="glmRegNotAttending_{$r.id}" type="checkbox" name="not_attending" value="1"{if $r.not_attending.value} checked{/if}> Not Attending<br>
If checked this inventory will be returned to permit another {$terms.reg_term_attendee} to {$terms.reg_term_register}.
{if apply_filters('glm-members-customfields-plugin-active', false)}
<form action="#" id="glm-attendee-form-{$r.id}">
<div class="glm-columns glm-small-5">
+ <h3>Additional Data</h3>
+ <br>
<div class="customfields-attendee-{$r.id}">
</div>
</div>
{/if}
</tbody>
</table>
-
-
+
+
{if $paging}
<input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.reg_term_attendee_plur_cap}" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
<input type="Submit" name="pageSelect" value="Next {$limit} {$terms.reg_term_attendee_plur_cap}" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
{/if}
-
+
</div>
</form>
<td class="exportFieldsTd">
<input class="exportField" type="checkbox" name="exportId"> {$terms.reg_term_attendee_cap} ID<br>
<input class="exportField" type="checkbox" name="exportRegistrant" checked> {$terms.reg_term_attendee_cap} Name<br>
+ <input class="exportField" type="checkbox" name="exportOrg" checked> Organization<br>
+ <input class="exportField" type="checkbox" name="exportTitle" checked> Title/Department<br>
<input class="exportField" type="checkbox" name="exportAddr1" checked> Address Line #1<br>
<input class="exportField" type="checkbox" name="exportAddr2" checked> Address Line #2<br>
<input class="exportField" type="checkbox" name="exportCity" checked> City<br>
<input class="exportField" type="checkbox" name="exportCounty" checked> County <br>
<input class="exportField" type="checkbox" name="exportLevel" checked> Level <br>
<input class="exportField" type="checkbox" name="exportTime" checked> Date/Time <br>
- <input class="exportField" type="checkbox" name="exportRate" checked> Rate <br>
+ <input class="exportField" type="checkbox" name="exportRate" checked> {$terms.reg_term_rate_cap} <br>
<input class="exportField" type="checkbox" name="exportStatus" checked> Status <br>
{if apply_filters('glm-members-customfields-plugin-active', false)}
<input class="exportField" type="checkbox" name="exportCustom" checked> Custom Fields <br>
<option value="name" selected="selected">{$terms.reg_term_attendee_cap} Name</opion>
<option value="registeredBy">{$terms.reg_term_registered_cap} By</option>
<option value="status">Submission Status</opion>
+ <option value="org">Organization</opion>
+ <option value="title">Title/Department</opion>
<option value="city">City</opion>
<option value="state">State</opion>
<option value="zip">ZIP/Postal Code</option>
<option value="level">{$terms.reg_term_registration_cap} Level</option>
- <option value="rate">{$terms.reg_term_registration_cap} Rate</option>
+ <option value="rate">{$terms.reg_term_registration_cap} {$terms.reg_term_rate_cap}</option>
<option value="dateTime">{$terms.reg_term_event_cap} Date/Time</option>
</select>
</td>
});
// Edit registrant
- $('.glm-edit').click(function(e){
+ $('.glm-edit').click(function(e) {
e.preventDefault();
attendeeLinksEditSelected();
$('.glm-edit-form-' + $(this).data('registrant')).show();
var classId = $(this).data('class');
var fieldsHtml = '';
+ $('.customfields-attendee-' + refId).html('<span class="glm-notice">Loading additional fields ...</span>');
+
// Get event attendee custom fields
$.ajax({
cache: false,
// Add custom fields to form
$('.customfields-attendee-' + refId).html( fieldsHtml);
- }).fail();
+ }).fail( function() {
+ $('.customfields-attendee-' + refId).html('(Unable to get additional field data.)');
+ });
- }).fail();
+ }).fail( function() {
+ $('.customfields-attendee-' + refId).html('(Unable to get additional field data.)');
+ });
{/if}
$('.glm-admin-table-inner').mouseleave( function() {
$('#attendeeLinks_' + attendeeHoverId).addClass('glm-hidden');
})
-
+
$('#statusFieldsSelect').multiselect();
});
</script>
</h2>
{if $haveMessages}
- <div class="glm-error" style="font-size: 1rem; line-height: 1rem; margin-top: 1rem;">
+ <div class="glm-error" style="font-size: 1rem; line-height: 1rem; margin: 1rem 0 2rem 1rem;">
<i>Please Note:</i>
- <UL>
+ <ul>
{foreach $messages as $m}
<li>{$m}</li>
{/foreach}
- </UL>
+ </li>
</div>
{/if}
{include file='admin/registrations/eventHeader.html'}
-
+<div class="glm-right">
+ <p><a id="addRegEvent" class="button button-secondary glm-button">Add a {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}</a><br></p>
+ <div id="newRegEventDialog" style="display: none;">
+ <form action="{$adminUrl}">
+ <input type="hidden" name="page" value="glm-members-admin-menu-registrations-events">
+ <input type="hidden" name="option" value="add">
+ <input type="hidden" name="event" value="0">
+ {if apply_filters('glm-members-events-plugin-active', false)}
+ <center><h3>Please Read</h3></center>
+ <p>
+ You are creating a stand-alone {$terms.reg_term_registration} {$terms.reg_term_event}. This will not be associated with an event under the GLM Associate "Events" menu and will not show up in any list of those events.
+ Instead it will only show in a list of availble {$terms.reg_term_registration_plur}.
+ </p>
+ <p>
+ If this is not what you want, select "Cancel" below, use the "Events" menu to create an event, then add registrations to that event.
+ </p>
+ {/if}
+ <center>
+ <p>
+ <p><input id="createRegEventButton" type="submit" name="Submit" value="Create {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}"></p>
+ <p><a id="cancelAddRegistrationEvent" class="button button-secondary glm-button">Cancel adding {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}</a></p>
+ </p>
+ </center>
+ </form>
+ </div>
+ <p><a href="{$adminUrl}?page=glm-members-admin-menu-registrations-events&option=notificationDisplay" class="button button-secondary glm-button" target="notifyEmail">Display Notification E-Mails sent today</a></p>
+</div>
<h1 class="glm-admin-table-header">{$terms.reg_term_registration_plur_cap} Dashboard</h1>
-
-<div class="glm-admin-table-inner glm-admin-table">
+<div class="glm-admin-table glm-admin-table">
<form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
<input type="hidden" name="prevStart" value="{$prevStart}">
<input type="hidden" name="nextStart" value="{$nextStart}">
<input type="hidden" name="limit" value="{$limit}">
<input type="hidden" name="savedAlpha" value="{$alphaSelected}">
-
- <p>
- <a href="{$adminUrl}?page=glm-members-admin-menu-registrations-events&option=notificationDisplay" class="button button-secondary glm-button glm-right" target="notifyEmail">Display Notification E-Mails sent today</a>
- <h2 class="glm-admin-table-header">List of {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}</h2>
- </p>
-
- <div class="glm-row">
- <b>Text Search: </b><input class="glmRegEventsSearch" type="text" name="text_search" id="autoTest" value="{$textSearch}">
- <input type="submit" value="Submit" style="margin-right: 2em;">
+ <div class="glm-left">
+ <p> <h2 class="glm-admin-table-header">List of {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}</h2></p>
+ <p>
+ <b>Text Search: </b>
+ <input class="glmRegEventsSearch" type="text" name="text_search" id="autoTest" value="{$textSearch}"> <input type="submit" value="Submit" style="margin-right: 2em;">
+ </p>
+ </div>
+ <br clear="all">
+ <p><b>Total found:</b> {$regEventsCount} </p>
+ <div class="glm-alpha-links glm-right">
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&text_search={$textSearch}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
+ {foreach $alphaList as $a}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&alpha={$a.alpha}&text_search={$textSearch}" class="glm-alpha-link{if $a.default} glm-alpha-link-selected{/if}">{$a.alpha}</a>
+ {/foreach}
</div>
-
-
- <p><b>Total found:</b> {$regEventsCount} </p>
-
- <br clear="all">
-
- <!-- Add Reg Event Type Button and Dialog Box -->
-
{if $paging}
<input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
<input type="Submit" name="pageSelect" value="Next {$limit} {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
{/if}
-
- <div class="glm-alpha-links">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&text_search={$textSearch}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
- {foreach $alphaList as $a}
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&alpha={$a.alpha}&text_search={$textSearch}" class="glm-alpha-link{if $a.default} glm-alpha-link-selected{/if}">{$a.alpha}</a>
- {/foreach}
- </div>
-
- <table class="wp-list-table striped glm-admin-table-single">
- <thead>
- <tr>
- <th>ID</th>
- <th>{$terms.reg_term_event_cap} Name</th>
- <th>Date Specific?</th>
- <th>Maximum<br>{$terms.reg_term_attendee_plur_cap}</th>
- <th>{$terms.reg_term_registered_cap}</th>
- <th>Cart<br>Hold</th>
- <th>Currently<br>Available</th>
- <th>Total<br>Available</th>
- <th>First Date</th>
- <th>Last Date</th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
-{if $haveRegEvents}
- {assign var="i" value="0"}
- {foreach $regEvents as $r}
- {if $i++ is odd by 1}
- <tr>
- {else}
- <tr class="alternate">
- {/if}
- <td style="width: 50px;">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.id}</a>
- </td>
- <td>
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.event_name}</a>
- </td>
- <td>{if $r.time_specific.value}Yes{/if}</td>
- <td>{$r.total}</td>
- <td>{$r.registered}</td>
- <td>{$r.cartHold}</td>
- <td>{$r.curAvail}</td>
- <td>{$r.totalAvail}</td>
- <td>{$r.first_datetime.datetime}</td>
- <td>{$r.last_datetime.datetime}</td>
- <td>
- {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $r.event)}
- {if is_array($r_link)}
- <a class="button button-secondary glm-button-small" href="{$r_link.url|escape:'string'}">{$r_link.title}</a>
- {/if}
- </td>
- </tr>
- {/foreach}
-{else}
- <tr class="alternate"><td colspan="2">(no {$terms.reg_term_registration} {$terms.reg_term_event} listed)</td></tr>
-{/if}
- </tbody>
- </table>
-
+ <table class="wp-list-table striped glm-admin-table-single">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>{$terms.reg_term_event_cap} Name</th>
+ <th>Date Specific?</th>
+ <th>Maximum<br>{$terms.reg_term_attendee_plur_cap}</th>
+ <th>{$terms.reg_term_registered_cap}</th>
+ <th>Cart<br>Hold</th>
+ <th>Currently<br>Available</th>
+ <th>Total<br>Available</th>
+ <th>First Date</th>
+ <th>Last Date</th>
+ <th> </th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $haveRegEvents}
+ {assign var="i" value="0"}
+ {foreach $regEvents as $r}
+ {if $i++ is odd by 1}
+ <tr>
+ {else}
+ <tr class="alternate">
+ {/if}
+ <td style="width: 50px;"><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.id}</a></td>
+ <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.event_name}</a></td>
+ <td>{if $r.time_specific.value}Yes{/if}</td>
+ <td>{$r.total}</td>
+ <td>{$r.registered}</td>
+ <td>{$r.cartHold}</td>
+ <td>{$r.curAvail}</td>
+ <td>{$r.totalAvail}</td>
+ <td>{$r.first_datetime.datetime}</td>
+ <td>{$r.last_datetime.datetime}</td>
+ <td>
+ {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $r.event)}
+ {if is_array($r_link)}
+ <a class="button button-secondary glm-button-small" href="{$r_link.url|escape:'string'}">{$r_link.title}</a>
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ {else}
+ <tr class="alternate">
+ <td colspan="2">(no {$terms.reg_term_registration} {$terms.reg_term_event} listed)</td>
+ </tr>
+ {/if}
+ </tbody>
+ </table>
{if $paging}
<input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
<input type="Submit" name="pageSelect" value="Next {$limit} {$terms.reg_term_registration_cap} {$terms.reg_term_event_plur_cap}" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
{/if}
</form>
-
</div>
-
-<div class="glm-admin-table-inner glm-admin-table">
- <p>
- <h2 class="glm-admin-table-header">List of {$terms.reg_term_registration_cap} Requests Needing Attention</h2>
- </p>
+<hr style="margin: 2em;">
+<div class="glm-admin-table glm-admin-table">
+ <p><h2 class="glm-admin-table-header">List of {$terms.reg_term_registration_cap} Requests Needing Attention</h2></p>
<form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
- <div class="glm-row">
+ <div class="glm-row">
<b>Selected Status:</b>
{foreach $requestStatusSelect as $s}
- <input type="radio" value="{$s.id}" name="request_status_select" value="{$s.id}" onChange="this.form.submit();"{if $s.id == $statusSelected}checked{/if}> {$s.descr}
+ <input type="radio" value="{$s.id}" name="request_status_select" value="{$s.id}" onChange="this.form.submit();" {if $s.id==$statusSelected}checked{/if}> {$s.descr}
{/foreach}
</div>
</form>
</tr>
</thead>
<tbody>
-{if $haveRequests}
- {assign var="i" value="0"}
- {foreach $requests as $r}
- {if $i++ is odd by 1}
+ {if $haveRequests}
+ {assign var="i" value="0"}
+ {foreach $requests as $r}
+ {if $i++ is odd by 1}
<tr id="glmRegRequestLine_{$r.id}" data-request="{$r.id}" class="glm-request-line">
- {else}
+ {else}
<tr id="glmRegRequestLine_{$r.id}" data-request="{$r.id}" class="glm-request-line alternate">
- {/if}
- <td style="width: 50px;">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">{$r.id}</a>
- </td>
+ {/if}
+ <td style="width: 50px;"><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">{$r.id}</a></td>
<td>{$r.account_fname} {$r.account_lname}</td>
<td>{$r.status.nameEsc}</td>
- <td>{$r.total}
+ <td>{$r.total}</td>
<td>{$r.date_created.datetime}</td>
<td>{$r.last_update.datetime}</td>
</tr>
<tr id="requestLinks_{$r.id}" class="glm-hidden glm-request-links">
<td colspan="6" style="padding: .8rem; background-color: #fff;">
<span>
- <a href="#" data-request="{$r.id}" class="glm-request-link">Edit Request Status</a> |
+ <a href="#" data-request="{$r.id}" class="glm-request-link">Edit Request Status</a>
+ |
<a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">View Request Detail</a>
</span>
- <br>
</td>
</tr>
<tr id="requestEdit_{$r.id}" class="glm-hidden glm-request-detail">
<td colspan="6" style="padding: .8rem; background-color: #f8ffff; border: 1px solid black;">
<div>
<h2>Edit This Request</h2>
- <b>Set Status To:</b>
- {foreach $requestStatusEditSelect as $s}
- <input type="radio" value="{$s.id}" name="glm_request_status_{$r.id}" value="{$s.id}" onChange="this.form.submit();"{if $s.id == $statusSelected}checked{/if}> {$s.descr}
- {/foreach}
- <br>
- <span class="button button-small glm-request-edit-save">Save</span>
- <span class="button button-small glm-cancel-link">Cancel Edit</span>
- <p />
+ <p>
+ <b>Set Status To:</b>
+ {foreach $requestStatusEditSelect as $s}
+ <input type="radio" value="{$s.id}" name="glm_request_status_{$r.id}" value="{$s.id}" onChange="this.form.submit();" {if $s.id==$statusSelected}checked{/if}> {$s.descr}
+ {/foreach}
+ </p>
+ <p>
+ <span class="button button-small glm-request-edit-save">Save</span>
+ <span class="button button-small glm-cancel-link">Cancel Edit</span>
+ </p>
</div>
<div>
- <b>NOTE:</b> The summary below is a copy from when the request was submitted. Any changes to {$terms.reg_term_attendee_plur} after that are not shown here.<br>
- {$r.summary}
+ <p>
+ <b>NOTE:</b> The summary below is a copy from
+ when the request was submitted. Any changes to
+ {$terms.reg_term_attendee_plur} after that are
+ not shown here.<br>
+ </p>
+ <p>{$r.summary}</p>
</div>
</td>
</tr>
- {/foreach}
-{else}
- <tr class="alternate"><td colspan="2">(no requests with selected status)</td></tr>
-{/if}
+ {/foreach} {else}
+ <tr class="alternate">
+ <td colspan="2">(no requests with selected status)</td>
+ </tr>
+ {/if}
</tbody>
</table>
</div>
<script type="text/javascript">
+
jQuery(document).ready(function($) {
// Filter triggers
* id: Member id added so we can go to the member while showing what was selected
* Also note that autocomplete does not properly render HTML codes, so we
* "unescape" them for HTML in Smarty.
- */
+ */
- var availableTags = [
+ var availableTags = [
{foreach $namesList as $m}
- { label: "{$m.event_name|unescape:'html'|replace:'"':''}", value: "{$m.event_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
+ { label: "{$m.event_name|unescape:'html'|replace:'"':''}", value: "{$m.event_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
{/foreach}
- ];
+ ];
+
+ // Autocomplete for list Text Search
+ $( ".glmRegEventsSearch" ).autocomplete({
+
+ source: availableTags,
+ html: true,
+ position: { my : "right top", at: "right bottom" },
+ select: function( event, ui ) {
+ var regEventID = ui.item.id;
+ window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-event®EventID=" + regEventID );
+ },
+ response: function(event, ui) {
+ if (!ui.content.length) {
+ var noResult = { value:"",label:"No results found" };
+ ui.content.push(noResult);
+ }
+ }
+ });
- // Autocomplete for list Text Search
- $( ".glmRegEventsSearch" ).autocomplete({
+ // Restrict autocomplete list to a certain height with scrollbar
+ $('.ui-autocomplete').css('height','200px').css('overflow-y','scroll');
- source: availableTags,
- html: true,
- position: { my : "right top", at: "right bottom" },
- select: function( event, ui ) {
- var regEventID = ui.item.id;
- window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-event®EventID=" + regEventID );
- },
- response: function(event, ui) {
- if (!ui.content.length) {
- var noResult = { value:"",label:"No results found" };
- ui.content.push(noResult);
- }
- }
- });
+ // Expand multi-select on hover
+ $('#filterCategories').multiselect();
+ $('#exportFilterCategories').multiselect();
- // Restrict autocomplete list to a certain height with scrollbar
- $('.ui-autocomplete').css('height','200px').css('overflow-y','scroll');
-
- // Expand multi-select on hover
- $('#filterCategories').multiselect();
- $('#exportFilterCategories').multiselect();
+ // Request Line Hover Action
+ var requestEditId = false;
+ var requestHoverId = false;
+ $('.glm-request-line').mouseenter( function() {
+ if (requestEditId) {
+ return;
+ }
+ requestHoverId = $(this).attr('data-request');
+ $('.glm-request-links').addClass('glm-hidden');
+ $('#requestLinks_' + requestHoverId).removeClass('glm-hidden');
+ });
- // Request Line Hover Action
- var requestEditId = false;
- var requestHoverId = false;
- $('.glm-request-line').mouseenter( function() {
- if (requestEditId) {
- return;
- }
- requestHoverId = $(this).attr('data-request');
- $('.glm-request-links').addClass('glm-hidden');
- $('#requestLinks_' + requestHoverId).removeClass('glm-hidden');
- });
+ // Request Edit Action - Clicking with edit open will close it
+ $('.glm-request-link').on('click', function() {
+ if (requestEditId) {
+ $('.glm-request-detail').addClass('glm-hidden');
+ requestEditId = false;
+ return;
+ }
+ requestEditId = $(this).attr('data-request');
+ $('#requestEdit_' + requestEditId).removeClass('glm-hidden');
+ });
- // Request Edit Action - Clicking with edit open will close it
- $('.glm-request-link').on('click', function() {
- if (requestEditId) {
- $('.glm-request-detail').addClass('glm-hidden');
- requestEditId = false;
- return;
- }
- requestEditId = $(this).attr('data-request');
- $('#requestEdit_' + requestEditId).removeClass('glm-hidden');
- });
+ // Cancel Edit Action
+ $('.glm-cancel-link').on('click', function() {
+ if (!requestEditId) {
+ return;
+ }
+ $('#glm-request-link_' + requestEditId).focus();
+ $('.glm-request-detail').addClass('glm-hidden');
+ requestEditId = false;
+ });
- // Cancel Edit Action
- $('.glm-cancel-link').on('click', function() {
- if (!requestEditId) {
- return;
- }
- $('#glm-request-link_' + requestEditId).focus();
- $('.glm-request-detail').addClass('glm-hidden');
- requestEditId = false;
- });
+ // Request Edit Save Action
+ $('.glm-request-edit-save').on('click', function() {
+ var statusSelected = $('input[name=glm_request_status_' + requestEditId + ']:checked').val();
+ window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-events&option=dashboard&option2=updateStatus&requestId=" + requestEditId + "&status=" + statusSelected );
+ });
- // Request Edit Save Action
- $('.glm-request-edit-save').on('click', function() {
- var statusSelected = $('input[name=glm_request_status_' + requestEditId + ']:checked').val();
- window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-events&option=dashboard&option2=updateStatus&requestId=" + requestEditId + "&status=" + statusSelected );
- });
+ // Add registration event
+ $('#newRegEventDialog').dialog({
+ title: 'Adding a New {$terms.reg_term_registration_cap} {$terms.reg_term_event_cap}',
+ autoOpen: false,
+ modal: true,
+ resizable: false,
+ dragable: false,
+ closeOnEscape: true,
+ width: 'auto'
+ });
+ $('#addRegEvent').on('click', function() {
+ $('#newRegEventDialog').dialog('open');
+ });
+ $('#cancelAddRegistrationEvent').on('click', function() {
+ $('#newRegEventDialog').dialog('close');
+ return false;
+ });
});
</script>
+<style>
+ .ui-dialog{
+ max-width: 600px;
+ }
+</style>
{include file='admin/footer.html'}
{else}
<a href="" class="button button-secondary glm-button glm-right" id="glm-admin-reg_delete-request">Delete Request</a>
{/if}
-
+
<h1>Request</h1>
-
+
<div id="glm-admin-member-registrations-request-overview" class="glm-admin-table">
<div class="glm-row">
<div class="glm-small-4 glm-left">
<div class="glm-admin-table">
-
+
<div class="glm-row">
<div class="glm-small-12 glm-column">
<h3>Request ID:</h3>
{$cart.accounts.$acct.email}
</div>
</div>
-
+
<div class="glm-row">
<div class="glm-small-12 glm-column">
<h3>Billing Information:</h3>
<div class="glm-small-4 glm-left">
<div class="glm-admin-table">
<div class="glm-row">
- {if $cart.request.status.name != 'In Cart'}
+ {if $cart.request.status.name != 'In Cart'}
<div class="glm-small-12 glm-column">
<h3>Submitted:</h3>
</div>
<div class="glm-row">
<div class="glm-small-12 glm-left">
<div class="glm-admin-table">
-
+
<div class="glm-row">
<div class="glm-small-12 glm-column">
<h3>Notes:</h3>
</div>
</div>
</div>
-
+
</div>
</div>
<td style="padding-right: 1em;">Name</td>
<td style="padding-right: 1em;">{$terms.reg_term_event_cap}</td>
<td style="padding-right: 1em;">Level</td>
- <td style="padding-right: 1em;">Rate</td>
+ <td style="padding-right: 1em;">{$terms.reg_term_rate_cap}</td>
<td>Attending</td>
</tr>
{foreach $cart.events as $event}
{foreach $event.classes as $class}
{foreach $class.rates as $rate}
- {foreach $rate.registrants as $registrant}
+ {foreach $rate.registrants as $registrant}
<tr>
<td>{$registrant.fname} {$registrant.lname}</td>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard&option=registrants®EventID={$event.reg_event}">{$event.event_name}</a></td>
</tr>
{/foreach}
{/foreach}
- {/foreach}
+ {/foreach}
{/foreach}
</table>
</div>
-
+
<div class="glm-admin-table-inner glm-admin-table">
-
+
{if $cart.request.status.name != 'In Cart'}
<h1>Cart Contents When Submitted</h1>
<p class="glm-notice" style="font-size: 1.2em;">
NOTE: This is the current contents of the cart for this request. This request has not yet been submitted.
</p>
{/if}
-
+
<div>
-
+
{if $cart.request.summary}
{$cart.request.summary}
{else}
-
+
{if $haveCart}
{assign var="summaryType" value="adminRequest"}
{include file='front/registrations/cartSummary.html'}
{/if} {* / if have cart *}
-
+
{/if}
</div>
</div>
</div>
{if $option == 'edit' || $option == 'update'}
-*** Edit or Update ***<!--
+*** Edit or Update ***<!--
<a id="deleteAccountButton" class="button button-secondary glm-button glm-right">Delete this Account</a>
<div id="deleteAccountDialog" class="glm-dialog-box" title="Delete Account">
<center>
</div>
</div>
<h2>Edit Account
--->
+-->
{else}
{$req = $cart.request}
-
+
<table class="glm-admin-table">
<tr>
<td>
<tr><th>Card Type: </th><td>{$req.cc_type.value}</td></tr>
<tr><th>Card Number: </th><td>{$req.cc_numb}</td></tr>
<tr><th>Confirmation: </th><td>{$req.cc_conf}</td></tr>
- {/if}
+ {/if}
</table>
</td>
</tr>
<table class="glm-admin-table glm-account-table glm-admin-table-border glm-admin-table-close-spaced">
<tr><th><center>Notes</center></th></tr>
<tr><td>{$req.notes}</td></tr>
- </table>
+ </table>
</td>
- {/if}
+ {/if}
</tr>
</table>
<table class="glm-admin-table glm-account-table glm-admin-table-border glm-admin-table-close-spaced">
<tr>
<td>
<table>
- <tr><th>{$terms.reg_term_event_cap}</th><th>Start Date/Time</th><th>Class</th><th>Rate</th><th>Credits<th>Registrants</th><th>Charge</th></tr>
+ <tr><th>{$terms.reg_term_event_cap}</th><th>Start Date/Time</th><th>Class</th><th>{$terms.reg_term_rate_cap}</th><th>Credits<th>Registrants</th><th>Charge</th></tr>
{foreach $cart.events as $event}
<tr>
<td>{$event.event_name}</td><td>{$event.event_datetime.datetime}</td>
{/foreach}
{/foreach}
</tr>
- {/foreach}
+ {/foreach}
</table>
</td>
</tr>
- </table>
-
+ </table>
+
{/if}
</div>
{include file='admin/settings/header.html'}
-<!--
+<!--
<h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
<a href="{$thisUrl}?page=glm-members-admin-menu-settings&glm_action=registrationsPaymentCode" class="glm-settings-tab nav-tab">Global {$terms.reg_term_payment_code_plur_cap}</a>
<a href="{$thisUrl}?page=glm-members-admin-menu-settings&glm_action=registrationsMisc" class="glm-settings-tab nav-tab nav-tab-active">Misc. Settings</a>
<tr>
<th class="glm-reg-message-prompt{if $regMisc.fieldRequired.reg_terms} glm-required{/if}">Global Terms & Conditions:</th>
<td {if $regMisc.fieldFail.reg_terms}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$regMisc.fieldData.reg_terms|escape:quotes}', 'glm_reg_reg_terms', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'reg_terms',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.reg_terms,
+ 'glm_reg_reg_terms',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "reg_terms",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.reg_terms}<p>{$regMisc.fieldFail.reg_terms}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt{if $regMisc.fieldRequired.reg_bulletin} glm-required{/if}">List & {$terms.reg_term_registration_cap} Pages :</th>
<td {if $regMisc.fieldFail.reg_bulletin}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$regMisc.fieldData.reg_bulletin|escape:quotes}', 'glm_reg_bulletin', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'reg_bulletin',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.reg_bulletin,
+ 'glm_reg_bulletin',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "reg_bulletin",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.reg_bulletin}<p>{$regMisc.fieldFail.reg_bulletin}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt{if $regMisc.fieldRequired.cart_page_text} glm-required{/if}">Cart Page:</th>
<td {if $regMisc.fieldFail.cart_page_text}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$regMisc.fieldData.cart_page_text|escape:quotes}', 'glm_reg_cart_page_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'cart_page_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.cart_page_text,
+ 'glm_reg_cart_page_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "cart_page_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.cart_page_text}<p>{$regMisc.fieldFail.cart_page_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt{if $regMisc.fieldRequired.checkout_page_text} glm-required{/if}">Checkout Page:</th>
<td {if $regMisc.fieldFail.checkout_page_text}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$regMisc.fieldData.checkout_page_text|escape:quotes}', 'glm_reg_checkout_page_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'checkout_page_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.checkout_page_text,
+ 'glm_reg_checkout_page_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "checkout_page_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.checkout_page_text}<p>{$regMisc.fieldFail.checkout_page_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt{if $regMisc.fieldRequired.summary_page_text} glm-required{/if}">Summary Page:</th>
<td {if $regMisc.fieldFail.summary_page_text}class="glm-form-bad-input"{/if}>
- {php}
- wp_editor('{$regMisc.fieldData.summary_page_text|escape:quotes}', 'glm_reg_summary_page_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'summary_page_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.summary_page_text,
+ 'glm_reg_summary_page_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "summary_page_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.summary_page_text}<p>{$regMisc.fieldFail.summary_page_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.notify_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.notify_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.notify_text|escape:quotes}', 'glm_reg_notify_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'notify_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.notify_text,
+ 'glm_reg_notify_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "notify_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.notify_text}<p>{$regMisc.fieldFail.notify_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.instr_notify_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.instr_notify_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.instr_notify_text|escape:quotes}', 'glm_reg_instr_notify_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'instr_notify_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.instr_notify_text,
+ 'glm_reg_instr_notify_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "instr_notify_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.instr_notify_text}<p>{$regMisc.fieldFail.instr_notify_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.submission_notify_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.submission_notify_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.submission_notify_text|escape:quotes}', 'glm_reg_submission_notify_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'submission_notify_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.submission_notify_text,
+ 'glm_reg_submission_notify_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "submission_notify_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.submission_notify_text}<p>{$regMisc.fieldFail.submission_notify_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.registrant_notify_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.registrant_notify_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.registrant_notify_text|escape:quotes}', 'glm_reg_registrant_notify_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'registrant_notify_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.registrant_notify_text,
+ 'glm_reg_registrant_notify_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "registrant_notify_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.registrant_notify_text}<p>{$regMisc.fieldFail.registrant_notify_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.submission_ack_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.submission_ack_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.submission_ack_text|escape:quotes}', 'glm_reg_submission_ack_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'submission_ack_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.submission_ack_text,
+ 'glm_reg_submission_ack_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "submission_ack_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.submission_ack_text}<p>{$regMisc.fieldFail.submission_ack_text}</p>{/if}
</td>
</tr>
<tr>
<th class="glm-reg-message-prompt-email-text{if $regMisc.fieldRequired.registrant_ack_text} glm-required{/if}">E-Mail Text</th>
<td {if $regMisc.fieldFail.registrant_ack_text}class="glm-form-bad-input"{/if} class="glm-reg-message-body">
- {php}
- wp_editor('{$regMisc.fieldData.registrant_ack_text|escape:quotes}', 'glm_reg_registrant_ack_text', array(
- 'media_buttons' => false,
- // 'quicktags' => false,
- // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text.
- 'textarea_name' => 'registrant_ack_text',
- 'editor_height' => 150, // Height in px, overrides editor_rows
- // 'textarea_rows' => 8
- ));
- {/php}
+ {wp_editor(
+ $regMisc.fieldData.registrant_ack_text,
+ 'glm_reg_registrant_ack_text',
+ json_decode('{
+ "media_buttons": false,
+ "quicktags": false,
+ "textarea_name": "registrant_ack_text",
+ "editor_height": 150
+ }', true)
+ )}
{if $regMisc.fieldFail.registrant_ack_text}<p>{$regMisc.fieldFail.registrant_ack_text}</p>{/if}
</td>
</tr>
<input type="submit" value="Update Settings" class="button-primary">
</form>
-
+
</td>
</tr>
</table>
<div id="mergeTagsPrintArea" class="PrintArea" style="padding: 10px;">
{literal}
<h2 style="margin-bottom: 1em">Merge Tags useable in E-Mail Notifications</h2>
-<p>
- The tags below may be used in the E-Mail Notifications above to include information from the submission.
- This is equivelent to doing "Mail Merge" with a word processor. When including these tags include the
- "{", "}", and "$" characters shown with each tag.
+<p>
+ The tags below may be used in the E-Mail Notifications above to include information from the submission.
+ This is equivelent to doing "Mail Merge" with a word processor. When including these tags include the
+ "{", "}", and "$" characters shown with each tag.
The first set of tags may be used in the "Subject" and "E-Mail Text" of any of the E-Mail Notifications above.
Below those are addtional tags that may be used in certain notifications.
- Be sure to use the "Curly Braces" symbols '{' and '}' rather than paranthesis for these tags.
+ Be sure to use the "Curly Braces" symbols '{' and '}' rather than paranthesis for these tags.
</p>
<style>
.merge-tag-section-title {
- text-align: left;
- text-decoration: underline;"
+ text-align: left;
+ text-decoration: underline;"
}
.merge-tag-title {
- text-align: left;
+ text-align: left;
padding-right: 4em;
}
</style>
Example for listing {/literal}{$terms.reg_term_attendee_plur_cap}{literal}<br>
{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$r.AttendeeLastName}<br>
{/foreach}
- </td></tr>
+ </td></tr>
<tr><td> </td><th class="merge-tag-title"> </th><td>{$RegistrantFirstName}</td></tr>
- <tr><td> </td><th class="merge-tag-title"> </th><td>{$RegistrantLastName}</td></tr>
+ <tr><td> </td><th class="merge-tag-title"> </th><td>{$RegistrantLastName}</td></tr>
<tr><td colspan="3"><th> </th>
<tr><th colspan="3" style="text-align: left; text-decoration: underline;" >Also available in "Notification to Person Submitting the {/literal}{$terms.reg_term_registration_plur_cap}{literal}"</th></tr>
<tr><td colspan="3"><th> </th>
-
+
<tr><th colspan="3" style="text-align: left; text-decoration: underline;" >Also available in "Notification to {/literal}{$terms.reg_term_attendee_plur_cap}{literal}"</th></tr>
<tr><td> </td><th class="merge-tag-title">{$EventName}</th><td>Name of {/literal}{$terms.reg_term_event_cap}{literal}</td></tr>
<tr><td> </td><th class="merge-tag-title">{$EventTerms}</th><td>{/literal}{$terms.reg_term_event_cap}{literal} Terms and Conditions</td></tr>
<tr><td> </td><th class="merge-tag-title">{$AttendeeFirstName}</th><td>{/literal}{$terms.reg_term_attendee_cap}{literal} first name</td></tr>
<tr><td> </td><th class="merge-tag-title">{$AttendeeLastName}</th><td>{/literal}{$terms.reg_term_attendee_cap}{literal} last name</td></tr>
<tr><td colspan="3"><th> </th>
-
+
<tr><th colspan="3" style="text-align: left; text-decoration: underline;" >Also available in "Acknowledgement to Person Submitting the {/literal}{$terms.reg_term_registration_plur_cap}{literal}"</th></tr>
<tr><td colspan="3"><th> </th>
-
+
<tr><th colspan="3" style="text-align: left; text-decoration: underline;" >Also available in "Acknowledgement to {/literal}{$terms.reg_term_attendee_plur_cap}{literal}"</th></tr>
<tr><td colspan="3"><th> </th>
</table>
Edit/create Account
- <form href="{$regUrl}?page=account">
+ <form action="{$regUrl}?page=account">
{* Hidden fields go here *}
<div id="glm-reg-account-form">
<div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_lname} glm-reg-required{/if}">Last Name:</div>
<div class="glm-large-9 glm-columns{if $regAccount.fieldFail.bill_lname} glm-reg-fail{/if}"><input type="text" name="bill_lname" value="{$regAccount.fieldData.bill_lname}"{if $regAccount.fieldRequired.bill_lname} required{/if}></div>
</div>
+ <div class="glm-reg-row">
+ <div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_org} glm-reg-required{/if}">Organization:</div>
+ <div class="glm-large-9 glm-columns{if $regAccount.fieldFail.bill_org} glm-reg-fail{/if}"><input type="text" name="bill_org" value="{$regAccount.fieldData.bill_org}"{if $regAccount.fieldRequired.bill_org} required{/if}></div>
+ </div>
<div class="glm-reg-row">
<div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_addr1} glm-reg-required{/if}">Address:</div>
<div class="glm-large-9 glm-columns{if $regAccount.fieldFail.bill_addr1} glm-reg-fail{/if}"><input type="text" name="bill_addr1" value="{$regAccount.fieldData.bill_addr1}"{if $regAccount.fieldRequired.bill_addr1} required{/if}></div>
</div>
<div id="glm-cart-comp-codes" class="glm-row" style="white-space: nowrap; line-height: 1rem;">
- <form href="{$regUrl}?page=cart" method="post">
+ <form action="{$regUrl}?page=cart" method="post">
If you have a "Comp Code", please enter it here:
<input type="text" name="regPaymentCode" style="width: 10rem; display: inline;">
<input type="submit" class="button button-secondary glm-button" style="font-size: .8rem;" name="applyPaymentCode" value="{$terms.reg_term_button_apply_comp_code}">
notSubmittedTimer = setInterval( function() {
$( "#regNotSubmittedDialog" ).dialog( "open" );
clearInterval(notSubmittedTimer);
- }, 30000);
+ }, 300000);
}
function resetNotSubmittedTimer() {
if (notSubmittedTimer) {
</div>
{/if}
- <form id="checkoutForm" href="{$regUrl}" method="post" class="glm-row">
+ <form id="checkoutForm" action="{$regUrl}" method="post" class="glm-row">
<input type="hidden" name="page" value="checkoutProcess">
<input type="hidden" name="active" value="{$regAccount.fieldData.active.value}">
<input type="hidden" name="glm_reg_cart_id" value="{$cartId}">
<h4>Billing Information</h4>
{else}
<h4>Contact Information</h4>
- {/if}
-
-
+ {/if}
</div>
<div class="columns medium-4 small-12 glm-reg-required glm-reg-required-guide">
* Required Fields
</div>
</div>
+ {if $billingFields.FirstName.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_fname = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_fname} glm-reg-required{/if}">First Name{if $regAccount.fieldRequired.bill_fname} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_fname} glm-reg-fail{/if}"><input type="text" name="bill_fname" value="{$regAccount.fieldData.bill_fname}"{if $regAccount.fieldRequired.bill_fname} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.LastName.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_lname = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_lname} glm-reg-required{/if}">Last Name{if $regAccount.fieldRequired.bill_lname} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_lname} glm-reg-fail{/if}"><input type="text" name="bill_lname" value="{$regAccount.fieldData.bill_lname}"{if $regAccount.fieldRequired.bill_lname} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.Organization.selected}
+ <div class="glm-reg-row glm-reg-bill-field">
+ {$regAccount.fieldRequired.bill_org = true}
+ <div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_org} glm-reg-required{/if}">Organization{if $regAccount.fieldRequired.bill_org} *{/if}</div>
+ <div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_org} glm-reg-fail{/if}"><input type="text" name="bill_org" value="{$regAccount.fieldData.bill_org}"{if $regAccount.fieldRequired.bill_org} required{/if}></div>
+ </div>
+ {/if}
+ {if $billingFields.TitleDepartment.selected}
+ <div class="glm-reg-row glm-reg-bill-field">
+ {$regAccount.fieldRequired.bill_title = true}
+ <div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_title} glm-reg-required{/if}">Title / Dept{if $regAccount.fieldRequired.bill_title} *{/if}</div>
+ <div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_title} glm-reg-fail{/if}"><input type="text" name="bill_title" value="{$regAccount.fieldData.bill_title}"{if $regAccount.fieldRequired.bill_title} required{/if}></div>
+ </div>
+ {/if}
+ {if $billingFields.AddressLine1.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_addr1 = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_addr1} glm-reg-required{/if}">Address{if $regAccount.fieldRequired.bill_addr1} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_addr1} glm-reg-fail{/if}"><input type="text" name="bill_addr1" value="{$regAccount.fieldData.bill_addr1}"{if $regAccount.fieldRequired.bill_addr1} required{/if}></div>
</div>
- <div class="glm-reg-row glm-reg-bill-field">
+ {/if}
+ {if $billingFields.AddressLine2.selected}
+ <div class="glm-reg-row glm-reg-bill-field">
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_addr2} glm-reg-required{/if}"> {if $regAccount.fieldRequired.bill_addr2} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_addr2} glm-reg-fail{/if}"><input type="text" name="bill_addr2" value="{$regAccount.fieldData.bill_addr2}"{if $regAccount.fieldRequired.bill_addr2} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.City.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_city = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_city} glm-reg-required{/if}">City{if $regAccount.fieldRequired.bill_city} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_city} glm-reg-fail{/if}"><input type="text" name="bill_city" value="{$regAccount.fieldData.bill_city}"{if $regAccount.fieldRequired.bill_city} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.State.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_state = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_state} glm-reg-required{/if}">State{if $regAccount.fieldRequired.bill_state} *{/if}</div>
</select>
</div>
</div>
+ {/if}
+ {if $billingFields.ZIPPostalCode.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_zip = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_zip} glm-reg-required{/if}">Zip/Postal Code{if $regAccount.fieldRequired.bill_zip} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_zip} glm-reg-fail{/if}"><input type="text" name="bill_zip" value="{$regAccount.fieldData.bill_zip}"{if $regAccount.fieldRequired.bill_zip} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.Country.selected}
<div class="glm-reg-row glm-reg-bill-field">
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_country} glm-reg-required{/if}">Country{if $regAccount.fieldRequired.bill_country} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_country} glm-reg-fail{/if}">
</select>
</div>
</div>
+ {/if}
+ {if $billingFields.Phone.selected}
<div class="glm-reg-row glm-reg-bill-field">
{$regAccount.fieldRequired.bill_phone = true}
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_phone} glm-reg-required{/if}">Phone{if $regAccount.fieldRequired.bill_phone} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_phone} glm-reg-fail{/if}"><input type="text" name="bill_phone" value="{$regAccount.fieldData.bill_phone}"{if $regAccount.fieldRequired.bill_phone} required{/if}></div>
</div>
+ {/if}
+ {if $billingFields.FAX.selected}
<div class="glm-reg-row glm-reg-bill-field">
<div class="glm-reg-checkout-field-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_fax} glm-reg-required{/if}">FAX{if $regAccount.fieldRequired.bill_fax} *{/if}</div>
<div class="glm-reg-checkout-field-data glm-small-12 glm-large-9 glm-columns{if $regAccount.fieldFail.bill_fax} glm-reg-fail{/if}"><input type="text" name="bill_fax" value="{$regAccount.fieldData.bill_fax}"{if $regAccount.fieldRequired.bill_fax} required{/if}></div>
</div>
+ {/if}
<div class="glm-reg-row glm-reg-bill-field">
<p class="glm-reg-required">Please provide your E-Mail address. Without this we will be unable to contact you reqarding updates to this registration request.</p>
</div>
</div>
{/if}
{if $cart.totalCharges > 0}
- <div style="text-align: right;"><h2>Total Charge: ${$cart.totalCharges|number_format:2}</h2></div>
+ <div style="text-align: right;"><h2>Total Charge: ${$cart.grandTotal|number_format:2}</h2></div>
{else}
<div style="text-align: right;">(There is no charge for your request.)</div>
{/if}
// Display our PayPal payment dialog box and fix some CSS
$( "#payPalPaymentDialog" ).dialog("open");
- $( "#payPalPaymentDialog" ).css({
- "width": "100%"
- });
// Display the Pay by PayPal button in our dialog box
displayPayPalButton();
notSubmittedTimer = setInterval( function() {
$( "#regNotSubmittedDialog" ).dialog( "open" );
clearInterval(notSubmittedTimer);
- }, 30000);
+ }, 300000);
}
function resetNotSubmittedTimer() {
if (notSubmittedTimer) {
$('#payPalPaymentWarningMessage').html('<br>You canceled the PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you don\'t wish to pay with PayPal, click the button below and select another payment method.');
},
onError: function(err) {
-console.log(err);
$('#payPalPaymentWarningMessage').html('<br>There was a problem with your PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you\'re unable to pay with PayPal, click the button below and select another payment method.');
},
// Wait for the payment to be authorized by the customer
<div id="glm-reg-list" class="glm-reg-row">
- {if $reg_bulletin}
+{if $reg_bulletin}
<div id="reg_bulletin">
{$reg_bulletin}
</div>
- {/if}
+{/if}
+{if $settings.reg_show_select_by_code}
+ <form action="{$thisUrl}?page={$thisPage}" method="get" id="regEventByCode">
+ <label>If you know the code for your desired {$terms.reg_term_event}, enter it here.</label><input type="text" name="event" value="" class="glm-form-text-input-short">
+ </form>
+{/if}
{if $haveRegEvents}
{foreach $regEvents as $event}
<!-- START EVENT REG TIMES -->
<div class="glm-reg-list-details-wrapper">
<div class="glm-row">
-
+
<div class="glm-columns glm-small-12 glm-reg-list-details">
{* If there's a starting timestamp for this event. Why wouldn't there be? *}
<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}
+ {if $event.first_datetime.timestamp != $event.last_datetime.timestamp}
<div class="small-12 columns glm-reg-event-profile-details"> (see other dates and times below)</div>
{/if}
<!-- EVENT REG ITEM END -->
{/foreach}
{else}
- <h2>Sorry, no {$terms.reg_term_event_plur} are available for {$terms.reg_term_registration} at this time.</h2>
+ <center><h3>Sorry, no {$terms.reg_term_event_plur} listed for {$terms.reg_term_registration} at this time.</h3></center>
{/if}
</div>
<input name="lname" value="{$reg.lname}" required>
</div>
</div>
+ <div class="row">
+ <div class="small-12 large-12 columns">
+ <label class="">
+ <span style="color:red;">Organization</span>
+ <input name="org" value="{$reg.org}" required>
+ </label>
+ </div>
+ </div>
<div class="row">
<div class="small-12 large-6 columns">
<label class="">
</script>
{/literal}
-{assign var=time_specific value = $regEvent.time_specific.value}
+{if $haveRegEvent}
+ {assign var=time_specific value = $regEvent.time_specific.value}
-{* Template for the regEvent *}{literal}
+ {* Template for the regEvent *}{literal}
<script type="text/template" id="regEvent-template">
<div class="row">
<div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$regEvent.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 $regEvent.first_date.timestamp != $regEvent.last_date.timestamp}
+ {if $regEvent.first_datetime.timestamp != $regEvent.last_datetime.timestamp}
<div class="small-12 columns glm-reg-event-profile-details"> (see other dates and times below)</div>
{/if}
{if $regEvent.locations.address}
<br>{$regEvent.locations.address}
{/if}
- <br> {if $regEvent.locations.city.name}{$regEvent.locations.city.name},{/if}{$regEvent.locations.state.name} {$regEvent.locations.zip}
+ <br> {if $regEvent.locations.city.name}{$regEvent.locations.city.name}{/if}, {$regEvent.locations.state.name} {$regEvent.locations.zip}
</div>
{/if}
- {if $regEvent.contact_name || $regEvent.contact_email || $regEvent.contact_phone}
+ {if ($standAlone && $regEvent.contact_name) || (!$standAlone && $regEvent.lname) || $regEvent.contact_email || $regEvent.contact_phone}
<div class="glm-reg-contact-container glm-row">
<div class="small-12 columns glm-reg-event-profile-details glm-reg-contact-name glm-reg-contact-details glm-reg-has-icon"> <b>Contact & More Info</b></div>
+ {if $standAlone}
+ {if $regEvent.contact_fname || $regEvent.contact_lname}<div class="small-12 columns glm-reg-event-profile-details glm-reg-contact-name glm-reg-contact-details"> Contact: {$regEvent.contact_fname} {$regEvent.contact_lname}</div>{/if}
+ {else}
{if $regEvent.contact_name}<div class="small-12 columns glm-reg-event-profile-details glm-reg-contact-name glm-reg-contact-details"> Contact: {$regEvent.contact_name}</div>{/if}
+ {/if}
{if $regEvent.contact_phone}<div class="small-12 columns glm-reg-event-profile-details glm-reg-contact-phone glm-reg-contact-details">Phone: {$regEvent.contact_phone}</div>{/if}
{if $regEvent.contact_email}<div class="small-12 columns glm-reg-event-profile-details glm-reg-contact-email glm-reg-contact-details"> Email: {$regEvent.contact_email}</div>{/if}
</div>
<div class="columns large-4 small-12 text-right glm-reg-required">Last Name *</div>
<div class="columns large-8 small-12"><input class="add_reg_lname" value="<%- lname %>"></div>
</div>
+ <div class="row">
+ <div class="columns large-4 small-12 text-right">Organization</div>
+ <div class="columns large-8 small-12"><input class="add_reg_org" value="<%- org %>"></div>
+ </div>
+ <div class="row">
+ <div class="columns large-4 small-12 text-right">Title/Department</div>
+ <div class="columns large-8 small-12"><input class="add_reg_title" value="<%- title %>"></div>
+ </div>
<div class="row ereg-addr">
<a class="show-hide-address">Address (show/hide)</a>
</div>
<div class="columns large-4 small-12 text-right glm-reg-required">Last Name *</div>
<div class="columns large-8 small-12"><input class="reg_lname" value="<%- lname %>"></div>
</div>
+ <div class="row">
+ <div class="columns large-4 small-12 text-right glm-reg-required">Organization *</div>
+ <div class="columns large-8 small-12"><input class="reg_org" value="<%- org %>"></div>
+ </div>
+ <div class="row">
+ <div class="columns large-4 small-12 text-right">Title/Department</div>
+ <div class="columns large-8 small-12"><input class="reg_title" value="<%- title %>"></div>
+ </div>
<div class="row ereg-addr">
<a class="show-hide-address">Address (show/hide)</a>
</div>
<% } %>
</script>
{/literal}
+
+{/if} {* Have Reg Event *}
+
<div id="glm-reg-detail">
{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
</div>
{/if}
+{if $haveRegEvent}
{if $settings.reg_not_submitted_dialog}
<div id="regNotSubmittedDialog" title="PLEASE NOTE!">
<p class="glm-reg-warning">
</div>
</div>
{/if}
+
+{else} {* Have Reg Event *}
+ <div>
+ <center>
+ <h3>{$terms.reg_term_registration_cap} {$terms.reg_term_event} not found.</h3>
+ <a href="{$thisUrl}" class="button glm-reg-header-btn">Return to {$terms.reg_term_registration_plur_cap} List</a>
+ </center>
+ </div>
+{/if}
</div>
{* Bootstrap the models needed on page load *}
{* Need to have RegEvent model created *}
{* And create the RegClasses collection *}
+
+{if $haveRegEvent} {* Ignoring all code below if event doesn't exist. *}
+
<script>
var appLoginUrl = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=login';
var appAccountUrl = '{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=account';
{/if}
{/if}
- {if $settings.elected_map_interface == 2}
+ {if $settings.selected_map_interface == 2}
// Set default - Need to make this configurable
var map = new google.maps.Map(document.getElementById('glm-reg-map'), {
zoom: {$settings.maps_default_zoom},
});
$('.glm-reg-read-more').on("click", function(){
var id = $(this).data('descr');
- var descr = $('body').find( $('#' + id) );
- var descr_length = descr.text().length;
- if( descr.height() < 47 && descr_length > 150 ){
- $(descr).animate({
+ var descrDiv = $('body').find( $('#' + id));
+ var descrHeight = descrDiv.height();
+ var descr = descrDiv.text();
+ var descrLength = descr.length;
+ if( descrHeight < 47 && descrLength > 150 ){
+ $(descrDiv).animate({
height: '100%',
}, function(){
- $(descr).css("overflow", "visible");
+ $(descrDiv).css("overflow", "visible");
})
} else {
- $(descr).animate({
+ $(descrDiv).animate({
height: '46px',
}, function(){
- $(descr).css("overflow", "hidden");
+ $(descrDiv).css("overflow", "hidden");
})
}
});
-
// Registration not submitted Dialog actions
{if $settings.reg_not_submitted_dialog}
notSubmittedTimer = setInterval( function() {
$( "#regNotSubmittedDialog" ).dialog( "open" );
clearInterval(notSubmittedTimer);
- }, 30000);
+ }, 300000); // 5 Minutes
}
function resetNotSubmittedTimer() {
if (notSubmittedTimer) {
{/if}
});
+
</script>
+
+{/if} {* Ignoring code if event not found. *}
\ No newline at end of file
</label>
<input name="lname" value="{$regAccount.fieldData.lname}" required>
</div>
+ </div>
+ <div class="row">
+ <div class="small-12 large-12 columns">
+ <label class="error">
+ Organization
+ <input name="org" value="{$regAccount.fieldData.org}" required>
+ </label>
+ </div>
</div>
<div class="row">
<div class="small-12 large-6 columns">
-<html>
+<html>
<head>
<style>
.container-table {
background-color: white;
border: 1px black solid;
- border-collapse: collapse;
- width: 98%;
+ border-collapse: collapse;
+ width: 98%;
}
.container-table-td{
padding: 2px;
.summary-table {
background-color: white;
border: 1px black solid;
- border-collapse: collapse;
+ border-collapse: collapse;
}
thead {
background-color: #eee;
.glm-reg-text-right {
text-align: right;
}
-
+
</style>
</head>
<body>
-
+
<h3>Checkout Summary</h3>
<table class="container-table">
<tr>
{if $account.fax}
<tr><th class="glm-reg-c1">title:</th><td>{$account.title}</td></tr>
{/if}
- <tr><th class="glm-reg-c1">E-Mail Address:</th><td>{$account.email}</td></tr>
+ <tr><th class="glm-reg-c1">E-Mail Address:</th><td>{$account.email}</td></tr>
<tr><th class="glm-reg-c1">Request #:</th><td>{$request.id}</td></tr>
<tr><th class="glm-reg-c1">Submitted:</th><td>{$request.date_submitted.datetime}</td></tr>
<tr><th class="glm-reg-c1">Status:</th><td>{$request.status.name}</td></tr>
{/if}
</tbody>
</table>
-
+
<table class="info-table" width="100%">
<tbody>
{if $request.pay_method.value == $payMethodsNumb.NoCharge}
</td>
</table>
<h3>{$terms.reg_term_registration_plur_cap}</h3>
-
+
<!-- Registrations -->
-
+
<table class="container-table">
{foreach $cart.events as $event}
<thead>
<th class="glm-reg-c1"> {$customField.field_name}:</th>
<td>{$customField.stored}</td>
<td class="glm-reg-c3">
- {if $customField.cost > 0}
+ {if $customField.cost > 0}
${$customField.cost|number_format:2}
{/if}
- </td>
+ </td>
</tr>
{else}
<tr>
<th class="glm-reg-c1"> {$customField.field_name}:</th>
<td>{$customField.stored}</td>
<td class="glm-reg-c3">
- {if $customField.cost > 0}
+ {if $customField.cost > 0}
${$customField.cost|number_format:2}
{/if}
- </td>
+ </td>
</tr>
{/if}
{/if}
<th class="glm-reg-c1"> {$customField.field_name}:</th>
<td>{$customField.stored}</td>
<td class="glm-reg-c3">
- {if $customField.cost > 0}
+ {if $customField.cost > 0}
${$customField.cost|number_format:2}
{/if}
- </td>
+ </td>
</tr>
{else}
<tr>
<th class="glm-reg-c1"> {$customField.field_name}:</th>
<td>{$customField.stored}</td>
<td class="glm-reg-c3">
- {if $customField.cost > 0}
+ {if $customField.cost > 0}
${$customField.cost|number_format:2}
{/if}
- </td>
+ </td>
</tr>
{/if}
{/if}
{/foreach}
- {/if}
+ {/if}
{if $registrant.registrantDiscounts > 0}
<tr>
<th colspan="2" class="glm-reg-c1"> {$terms.reg_term_attendee_cap} Discount</th>
{/foreach} {* Registrant *}
{/foreach} {* Rate *}
<tr><td colspan="3"> </td></tr>
- {/foreach} {* Class *}
+ {/foreach} {* Class *}
{foreach $event.payCodes as $payCode}
<tr>
<td> </td>
<td class="glm-reg-c1">
- <b>Event {$terms.reg_term_payment_code_cap}:</b> {$payCode.code}
+ <b>Event {$terms.reg_term_payment_code_cap}:</b> {$payCode.code}
</td>
<td class="glm-reg-c3">-${$payCode.thisDiscount|number_format:2}</td>
</tr>
<tr>
<td> </td>
<td class="glm-reg-c2">
- <b>Global {$terms.reg_term_payment_code_cap}:</b> {$payCode.code}
+ <b>Global {$terms.reg_term_payment_code_cap}:</b> {$payCode.code}
</td>
<td class="glm-reg-c3">-${$payCode.thisDiscount|number_format:2}</td>
- </tr>
+ </tr>
{/foreach}
{/if}
<tr>
<th class="glm-reg-c3">${$cart.grandTotal|number_format:2}</th>
</tr>
</tbody>
- </table>
+ </table>
</body>
</html>