Updates requested by MIGCSA and some fixes
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 28 Feb 2019 17:22:33 +0000 (12:22 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 28 Feb 2019 17:22:33 +0000 (12:22 -0500)
Added management flags for showing and requiring Organization and Title attendee fields.
Updated front-end registration page to handle Organization and Title field updates.
Added Organization and Title attendee fields to Attendee edit in reg event Attendee page.
Now shwing "(unlimited)" for certain attendees available fields in admin when maximum is unlimted for registration event.
Fixed a bad link and some invalid parameter errors in admin areas.

29 files changed:
classes/data/dataAccount.php
classes/data/dataManagement.php
classes/data/dataSettingsTerms.php
index.php
js/frontRegApp.js
models/admin/ajax/regAdmin/attendee.php
models/front/registrations/registration.php
readme.txt
setup/databaseScripts/create_database_V1.0.3.sql [deleted file]
setup/databaseScripts/create_database_V1.0.4.sql [new file with mode: 0755]
setup/databaseScripts/dbVersions.php
setup/databaseScripts/update_database_V1.0.4.sql [new file with mode: 0755]
views/admin/ajax/registrantsListExport.html
views/admin/ajax/registrantsListExportCsv.html
views/admin/management/registrations.html
views/admin/management/regterms.html
views/admin/registrations/accountDashboard.html
views/admin/registrations/accountEdit.html
views/admin/registrations/accountsDashboard.html
views/admin/registrations/eventDashboard.html
views/admin/registrations/eventEditNotification.html
views/admin/registrations/eventRegistrants.html
views/admin/registrations/requestEdit.html
views/admin/registrations/requestsDashboard.html
views/front/registrations/account.html
views/front/registrations/checkout.html
views/front/registrations/register.html
views/front/registrations/registration.html
views/front/registrations/summary.html

index 98609f1..ac1da1f 100755 (executable)
@@ -510,9 +510,10 @@ class GlmDataRegistrationsAccount extends GlmDataAbstract
             //
             'contact_state' => array (
                 'field'     => 'contact_state',
-                'type'      => 'text',
-                'required'  => '',
-                'use'       => 'a'
+                'type' => 'list',
+                'list' => $this->config['states'],
+                'default'  => $this->config['settings']['default_state'],
+                'use' => 'a'
             ),
 
             //
@@ -526,9 +527,10 @@ class GlmDataRegistrationsAccount extends GlmDataAbstract
             //
             'contact_country' => array (
                 'field'     => 'contact_country',
-                'type'      => 'text',
-                'required'  => false,
-                'use'       => 'a'
+                'type' => 'list',
+                'list' => $this->config['countries'],
+                'default' => 'US',
+                'use' => 'a'
             ),
 
             //
index dcf779d..a4968bf 100644 (file)
@@ -350,6 +350,38 @@ class GlmDataRegistrationsManagement extends GlmDataAbstract
                 'use' => 'a'
             ),
 
+            // Display Attendee Organization field
+            'reg_attendee_org' => array (
+                'field' => 'reg_attendee_org',
+                'type' => 'checkbox',
+                'use' => 'a',
+                'default'  => 0,
+            ),
+
+            // Display Attendee Title field
+            'reg_attendee_title' => array (
+                'field' => 'reg_attendee_title',
+                'type' => 'checkbox',
+                'use' => 'a',
+                'default'  => 0,
+            ),
+
+            // Attendee Organization field Required
+            'reg_attendee_org_req' => array (
+                'field' => 'reg_attendee_org_req',
+                'type' => 'checkbox',
+                'use' => 'a',
+                'default'  => 0,
+            ),
+
+            // Attendee Title field Required
+            'reg_attendee_title_req' => array (
+                'field' => 'reg_attendee_title_req',
+                'type' => 'checkbox',
+                'use' => 'a',
+                'default'  => 0,
+            ),
+
             // Always Use Full Billing Info
             'reg_full_billing_info' => array (
                 'field' => 'reg_full_billing_info',
index 7ef91d6..643d707 100644 (file)
@@ -612,6 +612,22 @@ class GlmDataRegistrationsSettingsTerms extends GlmDataAbstract
                 'type' => 'text',
                 'required' => true,
                 'use' => 'a'
+            ),
+
+            // Attendee Organization Field
+            'reg_term_account_field_org' => array (
+                'field' => 'reg_term_account_field_org',
+                'type' => 'text',
+                'required' => true,
+                'use' => 'a'
+            ),
+
+            // Attendee Title Field
+            'reg_term_account_field_title' => array (
+                'field' => 'reg_term_account_field_title',
+                'type' => 'text',
+                'required' => true,
+                'use' => 'a'
             )
 
         );
index ab6dd7c..939791a 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@ if (!defined('ABSPATH')) {
  *  version from this plugin.
  */
 define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.3.0');
-define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.3');
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.4');
 
 // 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.46');
index a0acab8..089880f 100644 (file)
@@ -1,5 +1,26 @@
 // js/models/account.js
 
+// js/models/regRate.js
+
+// Event Reg model
+
+app.Models.Front.AttendeeFields = Backbone.Model.extend({
+
+    // Default regRate values
+    defaults: {
+        reg_attendee_org: '',
+        reg_attendee_title: '',
+        reg_attendee_org_req: '',
+        reg_attendee_title_req: ''
+     },
+
+    initialize: function(){
+        // for setting up classes
+    }
+
+});
+
+
 // Event Registrant Model
 app.Models.Front.Account = Backbone.Model.extend({
 
@@ -784,8 +805,12 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
         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();
+        if (attendeeFields.get('reg_attendee_org')) {
+            var org     = this.$('.reg_org').val().trim();
+        }
+        if (attendeeFields.get('reg_attendee_title')) {
+            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();
@@ -811,6 +836,10 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
             app.sendAlertMessage( '.edit-attendee-form-message', 'First and Last name required!' );
             return;
         }
+        if ( (org === '' && attendeeFields.get('reg_attendee_org_req')) || (title === '' && attendeeFields.get('reg_attendee_title_req')) ) {
+            app.sendAlertMessage( '.edit-attendee-form-message', 'Please provide all required fields!' );
+            return;
+        }
         // Validate the model
         // Have to require reg_time if app.timeSpecific is true
         // Get the form values and update the model.
@@ -997,8 +1026,12 @@ app.Views.Front.RegTime = Backbone.View.extend({
         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();
+        if (attendeeFields.get('reg_attendee_org')) {
+            var org     = this.$('.add_reg_org').val().trim();
+        }
+        if (attendeeFields.get('reg_attendee_title')) {
+            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();
@@ -1023,6 +1056,12 @@ app.Views.Front.RegTime = Backbone.View.extend({
             this.$('#loading-' + this.model.get('id') ).hide();
             return;
         }
+        if ( (org === '' && attendeeFields.get('reg_attendee_org_req')) || (title === '' && attendeeFields.get('reg_attendee_title_req')) ) {
+            app.sendAlertMessage( '#add-attendee-form-message', 'Please provide all required fields!' );
+            this.$('#loading-' + this.model.get('id') ).hide();
+            return;
+        }
+
         if ( email === '' ) {
             // var confAnsw = confirm( 'You did not supply and Email address! Are you sure you want to add this registrant?' );
             // if ( !confAnsw ) {
index f22c737..3108bd2 100755 (executable)
@@ -155,17 +155,24 @@ class GlmMembersAdmin_registrations_ajax_attendee extends GlmDataRegistrationsRe
                 );
 
                 // If the submitted E-Mail is different than what's stored in the account
-                if (trim($registrantData['email']) != trim($modelData['email'])) {
+                if (trim($registrantData['email']) != trim($modelData['email']) ||
+                    trim($registrantData['org']) != trim($modelData['org']) ||
+                    trim($registrantData['title']) != trim($modelData['title'])
+                ) {
 
                     // Update the E-Mail address in the account and reset validated flag
                     $this->wpdb->update(
                         GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account',
                         array(
                             'email' => $modelData['email'],
+                            'org' => $modelData['org'],
+                            'title' => $modelData['title'],
                             'validated' => false
                         ),
                         array( 'id' => $registrantData['account'] ),
                         array(
+                            '%s',
+                            '%s',
                             '%s',
                             '%d'
                         ),
@@ -179,6 +186,8 @@ class GlmMembersAdmin_registrations_ajax_attendee extends GlmDataRegistrationsRe
                     'email' => $modelData['email'],
                     'fname' => $modelData['fname'],
                     'lname' => $modelData['lname'],
+                    'org' => $modelData['org'],
+                    'title' => $modelData['title'],
                     'notAttending' => $notAttending,
                     'notAvailable' => $notAvailable
                 );
index 75c533d..14fe2d8 100755 (executable)
 
         }
 
+        // Send Attendee field usage to view
+        $attendeeFields = array(
+            'reg_attendee_org'          => $this->config['settings']['reg_attendee_org'],
+            'reg_attendee_title'        => $this->config['settings']['reg_attendee_title'],
+            'reg_attendee_org_req'      => $this->config['settings']['reg_attendee_org_req'],
+            'reg_attendee_title_req'    => $this->config['settings']['reg_attendee_title_req']
+        );
+        $attendeeFieldsJSON = json_encode($attendeeFields, JSON_NUMERIC_CHECK);
 
-
-       // echo "<pre>".print_r($registrants,1)."</pre>";
+        // echo "<pre>".print_r($registrants,1)."</pre>";
 
         // Compile template data
         $templateData = array(
             'states_list'       => $this->config['states'],
             'country_list'      => $this->config['countries'],
             'pluginAssetsUrl'   => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL,
-            'registrantsList'   => $registrantsList
+            'registrantsList'   => $registrantsList,
+            'attendeeFieldsJSON' => $attendeeFieldsJSON
         );
 
 
index 5fedb0e..645ad0c 100755 (executable)
@@ -25,6 +25,14 @@ e.g.
 1. Activate the plugin through the 'Plugins' menu in WordPress
 
 == Changelog ==
+= 1.3.1 =
+* Update database to version 1.0.4
+* Added management flags for showing and requiring Organization and Title attendee fields.
+* Updated front-end registration page to handle Organization and Title field updates.
+* Added Organization and Title attendee fields to Attendee edit in reg event Attendee page.
+* Now shwing "(unlimited)" for certain attendees available fields in admin when maximum is unlimted for registration event.
+* Fixed a bad link and some invalid parameter errors in admin areas.
+
 = 1.3.0 =
 * Improvements and minor fixes to selecting event by event code in front-end event list.
 * Added more fields to evnt list in registration events dashboard.
diff --git a/setup/databaseScripts/create_database_V1.0.3.sql b/setup/databaseScripts/create_database_V1.0.3.sql
deleted file mode 100755 (executable)
index 1b863e6..0000000
+++ /dev/null
@@ -1,936 +0,0 @@
--- 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 DEFAULT 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,
-    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'
-    );
diff --git a/setup/databaseScripts/create_database_V1.0.4.sql b/setup/databaseScripts/create_database_V1.0.4.sql
new file mode 100755 (executable)
index 0000000..4f51412
--- /dev/null
@@ -0,0 +1,988 @@
+-- Gaslight Media Registration Database
+-- File Created: 01/18/2017 14:40:00
+-- Database Version: 1.0.4
+-- 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
+    -- Attendee Field Settings
+    reg_attendee_org BOOLEAN NULL,                                  -- Ask for Organization field for all attendees - Added in 1.0.4
+    reg_attendee_title BOOLEAN NULL,                                -- as for Title/Department field for all attendees - Added in 1.0.4
+    reg_attendee_org_req BOOLEAN NULL,                              -- Require attendee Organization field for all attendees - Added in 1.0.4
+    reg_attendee_title_req BOOLEAN NULL,                            -- Require attendee Title/Department field for all attendees - Added in 1.0.4
+    -- 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 DEFAULT 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,
+    reg_term_account_field_org TINYTEXT NULL,                   -- Added in 1.0.4
+    reg_term_account_field_title TINYTEXT NULL,                 -- Added in 1.0.4
+    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,
+    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,                     -- canonical_reg_page
+    reg_org_name,                           -- reg_org_name
+    reg_org_short,                          -- reg_org_short
+    reg_org_address,                        -- reg_org_address
+    reg_org_city,                           -- reg_org_city
+    reg_org_state,                          -- reg_org_state
+    reg_org_zip,                            -- reg_org_zip
+    reg_org_phone,                          -- reg_org_phone
+    reg_org_toll_free,                      -- reg_org_toll_free
+    reg_org_internal_email,                 -- reg_org_internal_email
+    reg_org_from_email,                     -- reg_org_from_email
+    reg_payment_methods,                    -- reg_payment_methods
+    reg_proc_methods,                       -- reg_proc_methods
+    reg_cc_accepts,                         -- reg_cc_accepts
+    reg_authorize_net_login,                -- reg_authorize_net_login
+    reg_authorize_net_key,                  -- reg_authorize_net_key
+    reg_authorize_net_test,                 -- reg_authorize_net_test
+    reg_authorize_net_conf,                 -- reg_authorize_net_conf
+    reg_authorize_net_merchant_email,       -- reg_authorize_net_merchant_email
+    reg_authorize_net_merchant_seal,        -- reg_authorize_net_merchant_seal
+    reg_merchant_solutions_acctid,          -- reg_merchant_solutions_acctid
+    reg_merchant_solutions_merchantpin,     -- reg_merchant_solutions_merchantpin
+    reg_merchant_solutions_test,            -- reg_merchant_solutions_test
+    reg_merchant_solutions_conf,            -- reg_merchant_solutions_conf
+    reg_merchant_solutions_merchant_email,  -- reg_merchant_solutions_merchant_email
+    reg_paypal_clientid,                    -- reg_paypal_clientid
+    reg_paypal_secret,                      -- reg_paypal_secret
+    reg_paypal_sandbox_clientid,            -- reg_paypal_sandbox_clientid
+    reg_paypal_sandbox_secret,              -- reg_paypal_sandbox_secret
+    reg_paypal_test,                        -- reg_paypal_test
+    reg_attendee_org_req,                   -- reg_attendee_org_req
+    reg_attendee_title_req,                 -- reg_attendee_title_req
+    reg_full_billing_info,                  -- reg_full_billing_info
+    reg_bill_info_requested,                -- reg_bill_info_requested
+    reg_bill_info_req_no_charge,            -- reg_bill_info_req_no_charge
+    reg_bill_info_req_comp_code,            -- reg_bill_info_req_comp_code
+    reg_bill_info_req_cash,                 -- reg_bill_info_req_cash
+    reg_bill_info_req_check,                -- reg_bill_info_req_check
+    reg_bill_info_req_credit_card,          -- reg_bill_info_req_credit_card
+    reg_bill_info_req_merchant_call,        -- reg_bill_info_req_merchant_call
+    reg_request_hold_days,                  -- reg_request_hold_days
+    reg_account_hold_days,                  -- reg_account_hold_days
+    reg_not_submitted_dialog,               -- reg_not_submitted_dialog
+    reg_medical_info,                       -- reg_medical_info
+    reg_show_navigation_aids,               -- reg_show_navigation_aids
+    reg_show_attendees_on_reg_page,         -- reg_show_attendees_on_reg_page
+    reg_show_select_by_code                 -- reg_show_select_by_code
+    )
+    VALUES
+    (
+    'registrations',                        -- 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_authorize_net_merchant_seal
+    '',                                     -- reg_merchant_solutions_acctid
+    '',                                     -- reg_merchant_solutions_merchantpin
+    true,                                      -- reg_merchant_solutions_test
+    true,                                      -- reg_merchant_solutions_conf
+    '',                                     -- reg_merchant_solutions_merchant_email
+    '',                                     -- reg_paypal_clientid
+    '',                                     -- reg_paypal_secret
+    '',                                     -- reg_paypal_sandbox_clientid
+    '',                                     -- reg_paypal_sandbox_secret
+    3,                                      -- reg_paypal_test
+    0,                                      -- reg_attendee_org_req
+    0,                                      -- reg_attendee_title_req
+    true,                                   -- reg_full_billing_info
+    32767,                                  -- reg_bill_info_requested
+    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
+    10,                                     -- reg_request_hold_days
+    15,                                     -- reg_account_hold_days
+    0,                                      -- reg_not_submitted_dialog
+    true,                                   -- reg_medical_info
+    0,                                      -- reg_show_navigation_aids
+    0,                                      -- reg_show_attendees_on_reg_page
+    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,
+    reg_term_account_field_org,
+    reg_term_account_field_title
+    )
+    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
+    'Organization',                             -- reg_term_account_field_org
+    'Title/Department'                          -- reg_term_account_field_title
+    );
+
+----
+
+-- 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'
+    );
index a595f81..97d2acc 100755 (executable)
@@ -49,7 +49,8 @@ $glmMembersRegistrationsDbVersions = array(
     '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.3' => array('version' => '1.0.3', 'tables' => 18, 'date' => '12/11/2018')
+    '1.0.3' => array('version' => '1.0.3', 'tables' => 18, 'date' => '12/11/2018'),
+    '1.0.4' => array('version' => '1.0.4', 'tables' => 18, 'date' => '02/25/2019')
 );
 
 
diff --git a/setup/databaseScripts/update_database_V1.0.4.sql b/setup/databaseScripts/update_database_V1.0.4.sql
new file mode 100755 (executable)
index 0000000..0501ff4
--- /dev/null
@@ -0,0 +1,33 @@
+-- Gaslight Media Members Database  - Registratiuons Add-On
+-- File Updated: 2018-10-08
+-- Database Version: 1.0.4
+-- 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_attendee_org BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}management ADD COLUMN reg_attendee_title BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}management ADD COLUMN reg_attendee_org_req BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}management ADD COLUMN reg_attendee_title_req BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_account_field_org TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_account_field_title TINYTEXT DEFAULT NULL;
+
+----
+
+UPDATE {prefix}settings_terms SET reg_term_account_field_org = 'Organization', reg_term_account_field_title = 'Title/Department' where id = 1;
index 759dc18..28cf2b8 100644 (file)
@@ -27,8 +27,8 @@
                 <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.exportOrg}<th align="left">{$terms.reg_term_account_field_org}</th>{/if}
+                    {if $select.exportTitle}<th align="left">{$terms.reg_term_account_field_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}
index dc121f0..791b1e8 100644 (file)
@@ -1,8 +1,8 @@
 {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.exportOrg}"{$terms.reg_term_account_field_org}",{/if}
+{if $select.exportTitle}"{$terms.reg_term_account_field_title}",{/if}
 {if $select.exportAddr1}"Address",{/if}
 {if $select.exportAddr2}"Addr Line #2",{/if}
 {if $select.exportCity}"City",{/if}
index 3e62dd0..3b4ac44 100644 (file)
                             <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>Attendee Information Fields</p></th>
+                    </tr>
+                    <tr>
+                        <th>Attendee Organization Field</th>
+                        <td>
+                            <input type="checkbox" name="reg_attendee_org"{if $regSettings.fieldData.reg_attendee_org.value} checked="checked"{/if}> Display<br>
+                            <input type="checkbox" name="reg_attendee_org_req"{if $regSettings.fieldData.reg_attendee_org_req.value} checked="checked"{/if}> Required
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>Attendee Title/Department Field</th>
+                        <td>
+                            <input type="checkbox" name="reg_attendee_title"{if $regSettings.fieldData.reg_attendee_title.value} checked="checked"{/if}> Display<br>
+                            <input type="checkbox" name="reg_attendee_title_req"{if $regSettings.fieldData.reg_attendee_title_req.value} checked="checked"{/if}> Required
+                        </td>
+                    </tr>
                     <tr>
                         <td></td>
                         <th><p>Billing Information Fields</p></th>
index 34f963b..9c4caf9 100644 (file)
                             {if $termSettings.fieldFail.reg_term_button_checkout_page_submit}<p>{$termSettings.fieldFail.reg_term_button_checkout_page_submit}</p>{/if}
                         </td>
                     </tr>
+                    <tr><td>&nbsp;</td><th><br><h2>Attendee/Account Field Titles</h2></th></tr>
+                    <tr>
+                        <th {if $termSettings.fieldRequired.reg_term_account_field_org}class="glm-required"{/if}>Organization:</th>
+                        <td {if $termSettings.fieldFail.reg_term_account_field_org}class="glm-form-bad-input"{/if}>
+                            <input type="text" name="reg_term_account_field_org" value="{$termSettings.fieldData.reg_term_account_field_org}" class="glm-form-text-input-medium">
+                            {if $termSettings.fieldFail.reg_term_account_field_org}<p>{$termSettings.fieldFail.reg_term_account_field_org}</p>{/if}
+                        </td>
+                    </tr>
+                    <tr>
+                        <th {if $termSettings.fieldRequired.reg_term_account_field_title}class="glm-required"{/if}>Title/Department:</th>
+                        <td {if $termSettings.fieldFail.reg_term_account_field_title}class="glm-form-bad-input"{/if}>
+                            <input type="text" name="reg_term_account_field_title" value="{$termSettings.fieldData.reg_term_account_field_title}" class="glm-form-text-input-medium">
+                            {if $termSettings.fieldFail.reg_term_account_field_title}<p>{$termSettings.fieldFail.reg_term_account_field_title}</p>{/if}
+                        </td>
+                    </tr>
                 </table>
             </td>
 
index f990884..d2c4f55 100755 (executable)
             </tr>
       {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><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&accountID={$registrant.id}">{$registrant.id}</a></td>
                 <td>{$registrant.fname} {$registrant.lname}</td>
                 <td>{$registrant.event_name}</td>
                 <td>{$registrant.class_name}</td>
index d794ae0..7cc9d79 100644 (file)
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.org} glm-required{/if}">Organization:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.org} glm-required{/if}">{$terms.reg_term_account_field_org}:</th>
             <td {if $account.fieldFail.org}class="glm-form-bad-input" data-tabid="glm-org"{/if}>
                 <input type="text" name="org" value="{$account.fieldData.org}" class="glm-form-text-input-medium">
             {if $account.fieldFail.org}<p>{$account.fieldFail.org}</p>{/if}<br>
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.title} glm-required{/if}">Title:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.title} glm-required{/if}">{$terms.reg_term_account_field_title}:</th>
             <td {if $account.fieldFail.title}class="glm-form-bad-input" data-tabid="glm-title"{/if}>
                 <input type="text" name="title" value="{$account.fieldData.title}" class="glm-form-text-input-medium">
             {if $account.fieldFail.title}<p>{$account.fieldFail.title}</p>{/if}<br>
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.bill_org} glm-required{/if}">Organization:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.bill_org} glm-required{/if}">{$terms.reg_term_account_field_org}:</th>
             <td {if $account.fieldFail.bill_org}class="glm-form-bad-input" data-tabid="glm-bill-org"{/if}>
                 <input type="text" name="bill_org" value="{$account.fieldData.bill_org}" class="glm-form-text-input-medium">
             {if $account.fieldFail.bill_org}<p>{$account.fieldFail.bill_org}</p>{/if}<br>
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.bill_title} glm-required{/if}">Title:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.bill_title} glm-required{/if}">{$terms.reg_term_account_field_title}:</th>
             <td {if $account.fieldFail.bill_title}class="glm-form-bad-input" data-tabid="glm-bill-title"{/if}>
                 <input type="text" name="bill_title" value="{$account.fieldData.bill_title}" class="glm-form-text-input-medium">
             {if $account.fieldFail.bill_title}<p>{$account.fieldFail.bill_title}</p>{/if}<br>
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_org} glm-required{/if}">Organization:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_org} glm-required{/if}">{$terms.reg_term_account_field_org}:</th>
             <td {if $account.fieldFail.contact_org}class="glm-form-bad-input" data-tabid="glm-contact-org"{/if}>
                 <input type="text" name="contact_org" value="{$account.fieldData.contact_org}" class="glm-form-text-input-medium">
             {if $account.fieldFail.contact_org}<p>{$account.fieldFail.contact_org}</p>{/if}<br>
         </tr>
 
         <tr>
-            <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_title} glm-required{/if}">Title:</th>
+            <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_title} glm-required{/if}">{$terms.reg_term_account_field_title}:</th>
             <td {if $account.fieldFail.contact_title}class="glm-form-bad-input" data-tabid="glm-contact-title"{/if}>
                 <input type="text" name="contact_title" value="{$account.fieldData.contact_title}" class="glm-form-text-input-medium">
             {if $account.fieldFail.contact_title}<p>{$account.fieldFail.contact_title}</p>{/if}<br>
             <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_state} glm-required{/if}">State:</th>
             <td {if $account.fieldFail.contact_state}class="glm-form-bad-input" data-tabid="glm-contact-state"{/if}>
                 <select name="contact_state">
-                    <option value=""></option>
+                    <option value=""{if $s.value==''} selected="selected"{/if}></option>
         {foreach $account.fieldData.contact_state.list as $s}
                     <option value="{$s.value}"{if $account.fieldData.contact_state.value == $s.value} selected="selected"{/if}>
                         {$s.name}
             <th class="glm-nowrap-left-align{if $account.fieldRequired.contact_country} glm-required{/if}">Country:</th>
             <td {if $account.fieldFail.contact_country}class="glm-form-bad-input" data-tabid="glm-contact-country"{/if}>
                 <select name="contact_country">
-                    <option value=""></option>
+                    <option value=""{if $c.value==''} selected="selected"{/if}></option>
         {foreach $account.fieldData.contact_country.list as $c}
                     <option value="{$c.value}"{if $account.fieldData.contact_country.value == $c.value} selected="selected"{/if}>
                         {$c.name}
index 9322635..f2bad73 100755 (executable)
@@ -15,7 +15,7 @@
         <div class="">
             <p>
                 <span class="glm-nowrap">
-                    <b>Name / E-mail / Organization / Phone / ID Search: </b><input  id="glmEventsSearch" name="textSearch" type="text" id="autoTest" value="{$inputData.textSearch}">
+                    <b>Name / E-mail / {$terms.reg_term_account_field_org} / Phone / ID Search: </b><input  id="glmEventsSearch" name="textSearch" type="text" id="autoTest" value="{$inputData.textSearch}">
                 </span>
             <p>
             <p>
@@ -48,7 +48,7 @@
                 <th>First Name</th>
                 <th>Last Name</th>
                 <th>E-Mail Address</th>
-                <th>Organization</th>
+                <th>{$terms.reg_term_account_field_org}</th>
                 <th>Phone</th>
                 <th>Requests</th>
                 <th>{$terms.reg_term_registered_cap}</th>
index 0f1cbc6..37a76ad 100755 (executable)
                             <h3>Maximum {$terms.reg_term_attendee_plur_cap}:</h3>
                         </div>
                         <div class="glm-small-12 glm-column">
-                            {$regEvent.total}
+                            {if $regEvent.total==0}
+                                (unlimited)
+                            {else}
+                                {$regEvent.total}
+                            {/if}
                         </div>
                     </div>
                     <div class="glm-row">
                             <h3>{$terms.reg_term_attendee_plur_cap} Available:</h3>
                         </div>
                         <div class="glm-small-12 glm-column">
-                            {$regEvent.totalAvail}
+                            {if $regEvent.total==0}
+                                (unlimited)
+                            {else}
+                                {$regEvent.totalAvail}
+                            {/if}
                         </div>
                     </div>
                     <div class="glm-row">
                             <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}
+                            {if $regEvent.total==0}
+                                (unlimited)
+                            {else}
+                                {$regEvent.curAvailCalc}
+                                {if $regEvent.curAvailError}<br>(discrepancy in stored quantity corrected) {/if}
+                            {/if}
                         </div>
                     </div>
                 </div>
                         </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>
+                        <tr>
+                            <th style="text-align: left">Available for {$terms.reg_term_registration_cap}:</th>
+                            <td id="availAtt">
+                                {if $regEvent.total==0}
+                                    (unlimited)
+                                {else}
+                                    {$rt.attendees_available}
+                                {/if}
+                            </td>
+                        </tr>
                     </table>
                 {/if}
             {/foreach}
index c234bdf..224934d 100644 (file)
 
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_name}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Full name of your organization.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Full name of your {$terms.reg_term_account_field_org}.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_short_name}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Short name of your organization.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Short name of your {$terms.reg_term_account_field_org}.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_address}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's street address.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s street address.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_city}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's city.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s city.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_state}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's state.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s state.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_zip}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's ZIP/Postal code.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s ZIP/Postal code.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_phone]}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's phone number.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s phone number.</div>
     </div>
     <div class="glm-row">
         <div class="glm-small-12 glm-large-2 glm-column"><h3>{$from_email}</h3></div>
-        <div class="glm-small-12 glm-large-9 glm-column">Your organization's E-Mail address.</div>
+        <div class="glm-small-12 glm-large-9 glm-column">Your {$terms.reg_term_account_field_org}'s E-Mail address.</div>
     </div>
 </div>
 {/literal}
index 5cdf687..45b6bab 100755 (executable)
@@ -70,7 +70,8 @@
             <thead>
                 <tr>
                     <th>Name</th>
-                    <th>Organization</th>
+                    <th>{$terms.reg_term_account_field_org}</th>
+                    <th>{$terms.reg_term_account_field_title}</th>
                     <th>Level</th>
                     <th>Event Date/Time</th>
                     <th>{$terms.reg_term_rate_cap}</th>
@@ -89,7 +90,8 @@
                             <span class="glm-attendee-fullname-{$r.id}">{$r.fname} {$r.lname}</span>
                         </span>
                     </td>
-                    <td>{$r.account.org}</td>
+                    <td class="glm-attendee-org-{$r.id}">{$r.account.org}</td>
+                    <td class="glm-attendee-title-{$r.id}">{$r.account.title}</td>
                     <td>{$r.class_name}</td>
                     <td>{$r.event_time_reformatted}</td>
                     <td>{$r.rate_name}</td>
                                 <label>First Name</label>
                                 <input class="glm-form-text-input-medium" type="text" name="fname" value="{$r.fname}"><br>
                                 <label>Last Name</label>
-                                <input class="glm-form-text-input-medium" type="text" name="lname" value="{$r.lname}">
+                                <input class="glm-form-text-input-medium" type="text" name="lname" value="{$r.lname}"><br>
+                                <label>{$terms.reg_term_account_field_org}</label>
+                                <input class="glm-form-text-input-medium" type="text" name="org" value="{$r.account.org}"><br>
+                                <label>{$terms.reg_term_account_field_title}</label>
+                                <input class="glm-form-text-input-medium" type="text" name="title" value="{$r.account.title}">
                             </div>
                             {if apply_filters('glm-members-customfields-plugin-active', false)}
                             <form action="#" id="glm-attendee-form-{$r.id}">
                             <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="exportOrg" checked> {$terms.reg_term_account_field_org}<br>
+                                <input class="exportField" type="checkbox" name="exportTitle" checked> {$terms.reg_term_account_field_title}<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>
                                     <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="org">{$terms.reg_term_account_field_org}</opion>
+                                    <option value="title">{$terms.reg_term_account_field_title}</opion>
                                     <option value="city">City</opion>
                                     <option value="state">State</opion>
                                     <option value="zip">ZIP/Postal Code</option>
@@ -357,7 +363,9 @@ jQuery(document).ready(function($){
             },
         }).done(function( eventFieldsHtml ){
 
-            fieldsHtml = '<b>Additional data requested for this {$terms.reg_term_event}</b><br>' + eventFieldsHtml;
+            if (eventFieldsHtml.length > 1) {
+                fieldsHtml = '<b>Additional data requested for this {$terms.reg_term_event}</b><br>' + eventFieldsHtml;
+            }
 
             // Next get event class attendee custom fields
             $.ajax({
@@ -376,9 +384,14 @@ jQuery(document).ready(function($){
                 },
             }).done(function( eventClassFieldsHtml ){
 
-                fieldsHtml += '<b>Additional data requested for this {$terms.reg_term_level}</b><br>' + eventClassFieldsHtml;
+                if (eventClassFieldsHtml.length > 1) {
+                    fieldsHtml += '<b>Additional data requested for this {$terms.reg_term_level}</b><br>' + eventClassFieldsHtml;
+                }
 
                 // Add custom fields to form
+                if (fieldsHtml.length < 2) {
+                    fieldsHtml = '(none)';
+                }
                 $('.customfields-attendee-' + refId).html( fieldsHtml);
 
             }).fail( function() {
@@ -426,6 +439,8 @@ jQuery(document).ready(function($){
         var accountEmail = $('#glm-attendee-' + refId + ' input[name=email]').val().trim();
         var accountFname = $('#glm-attendee-' + refId + ' input[name=fname]').val().trim();
         var accountLname = $('#glm-attendee-' + refId + ' input[name=lname]').val().trim();
+        var accountOrg   = $('#glm-attendee-' + refId + ' input[name=org]').val().trim();
+        var accountTitle = $('#glm-attendee-' + refId + ' input[name=title]').val().trim();
 
         $.ajax({
             context: this,
@@ -439,6 +454,8 @@ jQuery(document).ready(function($){
                 email: accountEmail,
                 fname: accountFname,
                 lname: accountLname,
+                org: accountOrg,
+                title: accountTitle,
                 not_attending: notAttending,
                 reg_event_id: {$regEvent.id},
                 reg_class_id: classId,
@@ -447,6 +464,9 @@ jQuery(document).ready(function($){
         }).done(function(account){
             // Have to change the actual td display too.
             $('.glm-attendee-fullname-' + account.id ).html( account.fname + ' ' + account.lname );
+            $('.glm-attendee-org-' + account.id ).html( account.org );
+            $('.glm-attendee-title-' + account.id ).html( account.title );
+
             // And update the edit form also
             if (account.notAvailable) {
                 alert('No availability to permit this {$terms.reg_term_attendee}.');
@@ -461,6 +481,8 @@ jQuery(document).ready(function($){
             $('#glm-attendee-form-' + account.id + ' input[name=email]').val( account.email );
             $('#glm-attendee-form-' + account.id + ' input[name=fname]').val( account.fname );
             $('#glm-attendee-form-' + account.id + ' input[name=lname]').val( account.lname );
+            $('#glm-attendee-form-' + account.id + ' input[name=org]').val( account.org );
+            $('#glm-attendee-form-' + account.id + ' input[name=title]').val( account.title );
             $('.glm-edit-form-' + $(this).data('registrant')).hide();
             $('.glm-attendee-' + $(this).data('registrant')).show();
             clearAttendeeLinks();
index 095fe26..7097ccc 100644 (file)
@@ -51,7 +51,7 @@
                             <table>
                                 <tr><th>Name: </th><td>{$req.bill_fname} {$req.bill_lname}{if $req.bill_title}, {$req.bill_title}{/if}</td></tr>
                 {if $req.bill_org}
-                                <tr><th>Organization: </th><td>{$req.bill_org}</td></tr>
+                                <tr><th>{$terms.reg_term_account_field_org}: </th><td>{$req.bill_org}</td></tr>
                 {/if}
                                 <tr><th>Address: </th><td>{$req.bill_addr1}</td></tr>
                 {if $req.bill_addr2}
index d22a8ec..393d183 100755 (executable)
@@ -3,11 +3,11 @@
 {if $errorMsg}
     <h3 class="glm-error">{$errorMsg}</h3>
 {/if}
-    
+
 <h1>{$terms.reg_term_registration_plur_cap} Requests List</h1>
 <p>
     This is a list of pending and submitted {$terms.reg_term_registration} requests (carts).<br>
-    The name, organization, and other information are for the person sumbiting the request. Pending requests may not have this data.
+    The name, {$terms.reg_term_account_field_org}, and other information are for the person sumbiting the request. Pending requests may not have this data.
 <p>
 
 <form method="post" action="{$thisUrl}?page={$thisPage}">
                 </select>
             </span>&nbsp;&nbsp;&nbsp;
             <span class="glm-nowarp">
-                Order/Group By: 
+                Order/Group By:
                 <select name="orderBy">
                     <option value="id"{if $orderBy == 'id'} selected{/if}>Request ID</option>
                     <option value="status"{if $orderBy == 'status'} selected{/if}>Status</option>
                     <option value="name"{if $orderBy == 'name'} selected{/if}>Name</option>
-                    <option value="org"{if $orderBy == 'org'} selected{/if}>Organization</option>
+                    <option value="org"{if $orderBy == 'org'} selected{/if}>{$terms.reg_term_account_field_org}</option>
                     <option value="city"{if $orderBy == 'city'} selected{/if}>City</option>
                     <option value="created"{if $orderBy == 'created'} selected{/if}>Date Created</option>
                     <option value="updated"{if $orderBy == 'updated'} selected{/if}>Last Updated</option>
                 </select>
             </span>&nbsp;&nbsp;&nbsp;
-                Include requests without attendees: <input type="checkbox" name="list_empty"{if $listEmpty} checked="checked"{/if}> 
+                Include requests without attendees: <input type="checkbox" name="list_empty"{if $listEmpty} checked="checked"{/if}>
                 <input type="submit" value="Submit">
             </span>
         </p>
     </div>
 
   <div class="glm-admin-table-inner glm-admin-table">
-  
+
      <p><b>Total found:</b> {if $haveRequests}{$requestsCount}{else}(none){/if}&nbsp;&nbsp; <b>Showing:</b> {$start} through {$lastDisplayed}</p>
+
     {if $paging}
         <input type="Submit" name="pageSelect" value="Previous {$limit} Requests" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
         <input type="Submit" name="pageSelect" value="Next {$limit} Requests" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
@@ -93,7 +93,7 @@
                         <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}" class="button button-secondary glm-button">View Request</a>
                 {if $r.status.value == 0}
                         <a href="{$regUrl}?page=cart&cartId={$r.id}&cartCheck={$r.cartCheck}" class="button button-secondary glm-button" target="_cart">Access Cart</a>
-                {/if}                        
+                {/if}
                     </td>
                 </tr>
         {/foreach}
   </div>
 
 </form>
-  
+
 
 <script>
 jQuery(document).ready(function($){
 
 
     $('#statusFieldsSelect').multiselect();
-    
+
 });
 </script>
-    
+
 {include file='admin/footer.html'}
 
index d59c8f9..7d6405a 100644 (file)
@@ -35,11 +35,11 @@ Edit/create Account
                         <div class="glm-large-9 glm-columns{if $regAccount.fieldFail.lname} glm-reg-fail{/if}"><input type="text" name="lname" value="{$regAccount.fieldData.lname}"{if $regAccount.fieldRequired.lname} required{/if}></div>
                     </div>
                     <div class="glm-reg-row">
-                        <div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.org} glm-reg-required{/if}">Organization:</div>
+                        <div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.org} glm-reg-required{/if}">{$terms.reg_term_account_field_org}:</div>
                         <div class="glm-large-9 glm-columns{if $regAccount.fieldFail.org} glm-reg-fail{/if}"><input type="text" name="org" value="{$regAccount.fieldData.org}"{if $regAccount.fieldRequired.org} required{/if}></div>
                     </div>
                     <div class="glm-reg-row">
-                        <div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.title} glm-reg-required{/if}">Title:</div>
+                        <div class="glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.title} glm-reg-required{/if}">{$terms.reg_term_account_field_title}:</div>
                         <div class="glm-large-9 glm-columns{if $regAccount.fieldFail.title} glm-reg-fail{/if}"><input type="text" name="title" value="{$regAccount.fieldData.title}"{if $regAccount.fieldRequired.title} required{/if}></div>
                     </div>
                     <div class="glm-reg-row">
@@ -97,7 +97,7 @@ Edit/create Account
                         <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-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_org} glm-reg-required{/if}">{$terms.reg_term_account_field_org}:</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">
index 09ddda6..03e3cc6 100755 (executable)
         {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-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_org} glm-reg-required{/if}">{$terms.reg_term_account_field_org}{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-label glm-small-12 glm-large-3 glm-columns glm-reg-nowrap{if $regAccount.fieldRequired.bill_title} glm-reg-required{/if}">{$terms.reg_term_account_field_title}{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}
index 61ab379..fa6582a 100644 (file)
@@ -44,7 +44,7 @@
             <div class="row">
                 <div class="small-12 large-12 columns">
                     <label class="">
-                        <span style="color:red;">Organization</span>
+                        <span style="color:red;">{$terms.reg_term_account_field_org}</span>
                         <input name="org" value="{$reg.org}" required>
                     </label>
                 </div>
index 1079e33..8e54f41 100755 (executable)
                     <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>
+                {/literal}{if $settings.reg_attendee_org}{literal}
+                    <div class="row">
+                        <div class="columns large-4 small-12 text-right{/literal}{if $settings.reg_attendee_org_req} glm-reg-required{/if}{literal}">{/literal}{$terms.reg_term_account_field_org}{literal}{/literal}{if $settings.reg_attendee_org_req} *{/if}{literal}</div>
+                        <div class="columns large-8 small-12"><input class="add_reg_org" value="<%- org %>"></div>
+                    </div>
+                {/literal}{/if}{literal}
+                {/literal}{if $settings.reg_attendee_title}{literal}
+                    <div class="row">
+                        <div class="columns large-4 small-12 text-right{/literal}{if $settings.reg_attendee_title_req} glm-reg-required{/if}{literal}">{/literal}{$terms.reg_term_account_field_title}{literal}{/literal}{if $settings.reg_attendee_title_req} *{/if}{literal}</div>
+                        <div class="columns large-8 small-12"><input class="add_reg_title" value="<%- title %>"></div>
+                    </div>
+                {/literal}{/if}{literal}
                 <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>
+                    {/literal}{if $settings.reg_attendee_org}{literal}
+                        <div class="row">
+                            <div class="columns large-4 small-12 text-right {/literal}{if $settings.reg_attendee_org_req} glm-reg-required{/if}{literal}">{/literal}{$terms.reg_term_account_field_org}{if $settings.reg_attendee_org_req} *{/if}{literal}</div>
+                            <div class="columns large-8 small-12"><input class="reg_org" value="<%- org %>"></div>
+                        </div>
+                    {/literal}{/if}{literal}
+                    {/literal}{if $settings.reg_attendee_title}{literal}
+                        <div class="row">
+                            <div class="columns large-4 small-12 text-right{/literal}{if $settings.reg_attendee_title_req} glm-reg-required{/if}{literal}">{/literal}{$terms.reg_term_account_field_title}{if $settings.reg_attendee_title_req} *{/if}{literal}</div>
+                            <div class="columns large-8 small-12"><input class="reg_title" value="<%- title %>"></div>
+                        </div>
+                    {/literal}{/if}{literal}
                     <div class="row ereg-addr">
                         <a class="show-hide-address">Address (show/hide)</a>
                     </div>
@@ -677,6 +685,8 @@ jQuery(function($){
     regEvent.set( {$regEventJSON} );
     regEvent.setClasses( {$regClassesJSON} );
     regEvent.setClassRegistrants( {$regJSON} );
+    attendeeFields = new app.Models.Front.AttendeeFields( {$attendeeFieldsJSON} );
+
     var glmApp = new app.Views.Front.App();
     var mapIsDone = false;
 
index e66f301..ee24707 100644 (file)
@@ -66,7 +66,7 @@
              <div class="row">
                 <div class="small-12 large-12 columns">
                     <label class="error">
-                        Organization
+                        {$terms.reg_term_account_field_org}
                         <input name="org" value="{$regAccount.fieldData.org}" required>
                     </label>
                 </div>