Added the appropriate misc text to the top of each registrations page.
Added global terms and conditions to checkout and added test for that.
Changed contained class for list and registrations page to make content wider.
$haveCart = false;
$option = false;
+ // Get misc texts
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
+ $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
+ $misc = $Misc->getEntry(1);
+
// Get any provided option
if (isset($_REQUEST['option'])) {
$option = $_REQUEST['option'];
'cart' => $this->cart,
'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
- 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL
+ 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL,
+ 'cartPageText' => $misc['cart_page_text']
);
// echo "<pre>".print_r($templateData,1)."</pre>";
$payMethod = false;
$compCode = false;
+ // Get misc texts
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
+ $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
+ $misc = $Misc->getEntry(1);
+
+ // Register the masked input script that we need for input controls
wp_register_script(
'glm-members-admin-maskedinput',
GLM_MEMBERS_PLUGIN_JS_URL . '/jquery.maskedinput-1.2.2.js',
'payMethod' => $payMethod,
'payMethods' => $management['reg_payment_methods']['bitmap'],
'payMethodsNumb' => $this->config['payment_method_numb'],
- 'misc' => $misc
+ 'misc' => $misc,
+ 'checkoutPageText' => $misc['checkout_page_text'],
+ 'globalTerms' => $misc['reg_terms']
);
// echo "<pre>".print_r($templateData,1)."</pre>";
$Account = new GlmDataRegistrationsAccount($this->wpdb, $this->config);
$Request = new GlmDataRegistrationsRegRequest($this->wpdb, $this->config);
+ // Get misc texts
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
+ $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
+ $misc = $Misc->getEntry(1);
+
/*
* Valid cart?
*/
if (count($messages) == 0) {
+ $policiesAccepted = true;
+
+ // Global Policies
+ if ($misc['reg_terms'] != '') {
+ if (!isset($_REQUEST['terms']) || $_REQUEST['terms'] != 'accept') {
+ $policiesAccepted = false;
+ }
+ }
+
// All policies accepted
reset($this->cart['events']);
foreach ($this->cart['events'] as $event) {
-
if (trim($event['event_terms']) != '' && (!isset($_REQUEST['terms_'.$event['id']]) || $_REQUEST['terms_'.$event['id']] != 'accept')) {
- $messages[] = 'You did not accept the Terms and Conditions for the '.$event['event_name'].' event.';
+ $policiesAccepted = false;
}
}
+ if (!$policiesAccepted) {
+ $messages[] = 'You did not accept all terms and conditions.';
+ }
+
}
/*
$request = $Request->getEntry($this->cart['request']['id']);
$account = $Account->getEntry($request['account']);
- // Get misc texts
- require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
- $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
- $misc = $Misc->getEntry(1);
-
// Produce HTML for storage and checkout page and add to request
$summaryData = array(
'cart' => $this->cart,
$haveRegEvents = false;
$regEventsCount = false;
+ // Get misc texts
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
+ $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
+ $misc = $Misc->getEntry(1);
+
// Get any provided option
if (isset($_REQUEST['option'])) {
$option = $_REQUEST['option'];
'limit' => $limit,
'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
+ 'reg_bulletin' => $misc['reg_bulletin']
);
// Return status, any suggested view, and any data to controller
$isNewCart = false;
$regEventFirstTime = false;
+ // Get misc texts
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
+ $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
+ $misc = $Misc->getEntry(1);
+
// Setup scripts array for needed js files.
$scripts = array(
'regApp' => 'js/frontRegApp.js',
'regJSON' => json_encode( $registrants, JSON_NUMERIC_CHECK ),
'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
- 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL
+ 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL,
+ 'reg_bulletin' => $misc['reg_bulletin']
);
// Return status, any suggested view, and any data to controller
-- 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
+ 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)
{include file='front/registrations/header.html'}
+{if $cartPageText}
+<div>
+ {$cartPageText}
+</div>
+{/if}
+
{if !$cart.validated}
<div class="glm-registrations-messages glm-reg-warning" style="clear: all;">
<i>Please Note:</i>
{include file='front/registrations/header.html'}
+{if $checkoutPageText}
+<div>
+ {$checkoutPageText}
+</div>
+{/if}
+
{if $haveMessages}
<div class="glm-registrations-messages glm-reg-warning" style="clear: all;">
<i>Please Note:</i>
<h4>Terms and Conditions (*** Added fields for events ***)</h4>
You <span class="glm-reg-required">must check</span> the boxes below to confirm that you agree to the Terms and Conditions for each event.
</div>
+ <div class="glm-reg-row">
+ <div class="glm-large-1"> </div>
+ <div class="glm-large-11 glm-columns glm-reg-nowrap">
+ <h5>General Registrations Terms and Conditions:</h5>
+ <input id="terms" type="checkbox" name="terms" value="accept" required><label for="terms_{$event.id}"> {$globalTerms}</label><br>
+ </div>
+ </div>
{foreach $cart.events as $event}
{if $event.event_terms != ''}
<div class="glm-reg-row">
-{include file='front/registrations/header.html'} {$ajaxUrl}
-<div id="glm-reg-list" class="glm-row">
+{include file='front/registrations/header.html'}
+
+{if $reg_bulletin}
+<div>
+ {$reg_bulletin}
+</div>
+{/if}
+
+<div id="glm-reg-list" class="glm-reg-row">
{if $haveRegEvents}
{foreach $regEvents as $event}
<div class="glm-columns glm-small-12 glm-reg-event-item">
<div class="glm-reg-event-list">
<h1>{$terms.reg_term_registrations_name}</h1>
{include file='front/registrations/header.html'}
- <div class="glm-row">
+
+{if $reg_bulletin}
+ <div>
+ {$reg_bulletin}
+ </div>
+{/if}
+
+ <div class="glm-reg-row">
<div id="regApp" class="glm-columns glm-small-12">
</div>
</div>