From: Steve Sutton Date: Fri, 7 Sep 2018 15:30:59 +0000 (-0400) Subject: Update to event reg front end. X-Git-Tag: v1.0.22^2~22 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6086d2af69eb904c0fefadcfb9110639652c8a32;p=WP-Plugins%2Fglm-member-db-registrations.git Update to event reg front end. Remove the Extra Event Registration Title from the event reg detail page. Collapse the Event Detail part and have a Click to view event detail link or button. Give ability to Edit email for an attendee when editing. Update the Steps at the top to 4 steps Add Account Page - Require email and fname lname, email and password. --- diff --git a/css/front.css b/css/front.css index d014c09..650ed58 100644 --- a/css/front.css +++ b/css/front.css @@ -12,7 +12,7 @@ background-color: rgba(66,162,208, .1); /* float: left;*/ } - + .glm-reg-event-profile-details { } .reg-cart-summary-edit{ @@ -1220,7 +1220,7 @@ hr.glm-reg-class-separator{ } .progressbar li { list-style-type: none; - width: 33%; + width: 25%; float: left; font-size: 14px; position: relative; diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 7bbdc4e..e8ca491 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -786,6 +786,12 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var state = ( this.$('.reg_state').val() ) ? this.$('.reg_state').val().trim() : ''; var zip = this.$('.reg_zip').val().trim(); var country = ( this.$('.reg_country').val() ) ? this.$('.reg_country').val().trim(): ''; + var isValidEmail = app.isValidEmail( email ); + if ( !isValidEmail ) { + alert( 'Email must be valid' ); + this.$('.reg_email').val(''); + return; + } if ( this.$('#reg-time-' + modelId).length ) { var rTime = this.$('#reg-time-' + modelId).val().trim(); } else { @@ -810,6 +816,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ reg_class: this.model.get('reg_class'), fname: fname, lname: lname, + email: email, addr1: addr1, addr2: addr2, city: city, diff --git a/js/views/front/regRequestRegistrant.js b/js/views/front/regRequestRegistrant.js index bb13ba6..cebbc59 100644 --- a/js/views/front/regRequestRegistrant.js +++ b/js/views/front/regRequestRegistrant.js @@ -40,6 +40,12 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var state = ( this.$('.reg_state').val() ) ? this.$('.reg_state').val().trim() : ''; var zip = this.$('.reg_zip').val().trim(); var country = ( this.$('.reg_country').val() ) ? this.$('.reg_country').val().trim(): ''; + var isValidEmail = app.isValidEmail( email ); + if ( !isValidEmail ) { + alert( 'Email must be valid' ); + this.$('.reg_email').val(''); + return; + } if ( this.$('#reg-time-' + modelId).length ) { var rTime = this.$('#reg-time-' + modelId).val().trim(); } else { @@ -64,6 +70,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ reg_class: this.model.get('reg_class'), fname: fname, lname: lname, + email: email, addr1: addr1, addr2: addr2, city: city, diff --git a/models/admin/ajax/regFront/registrant.php b/models/admin/ajax/regFront/registrant.php index cf20ec7..3365491 100644 --- a/models/admin/ajax/regFront/registrant.php +++ b/models/admin/ajax/regFront/registrant.php @@ -385,6 +385,7 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations $accountData = array( 'fname' => $modelData['fname'], 'lname' => $modelData['lname'], + 'email' => $modelData['email'], 'addr1' => $modelData['addr1'], 'addr2' => $modelData['addr2'], 'city' => $modelData['city'], @@ -395,6 +396,7 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations $accountDataFormat = array( '%s', // fname '%s', // lname + '%s', // email '%s', // addr1 '%s', // addr2 '%s', // city diff --git a/views/front/registrations/account.html b/views/front/registrations/account.html index 452ca50..115c39c 100644 --- a/views/front/registrations/account.html +++ b/views/front/registrations/account.html @@ -25,7 +25,7 @@ Edit/create Account
E-Mail Address:
{$regAccount.fieldData.email}
- {/if} + {/if}
First Name:
@@ -147,7 +147,7 @@ Edit/create Account
- +

Additional Contact Information

@@ -209,10 +209,10 @@ Edit/create Account
- +
- + - \ No newline at end of file + diff --git a/views/front/registrations/cart.html b/views/front/registrations/cart.html index 8ea2420..dc1f67c 100644 --- a/views/front/registrations/cart.html +++ b/views/front/registrations/cart.html @@ -12,9 +12,10 @@
    -
  • {$terms.reg_term_register_cap}
  • -
  • View Cart
  • -
  • Checkout
  • +
  • Select {$terms.reg_term_event_cap}
  • +
  • {$terms.reg_term_register_cap}
  • +
  • View Cart
  • +
  • Checkout
@@ -56,7 +57,7 @@
- If you have a "Comp Code", please enter it here: + If you have a "Comp Code", please enter it here:
@@ -68,11 +69,11 @@

{/if}
- + {assign var="summaryType" value="cart"} {include file='front/registrations/cartSummary.html'} - - + + {if !$haveCart || !$cart.haveEvents}
You have not yet submitted your {$terms.reg_term_registration}. See above notes!
@@ -80,18 +81,18 @@ {else}
{if $settings.reg_show_navigation_aids} -
You have not yet submitted your {$terms.reg_term_registration}! +
You have not yet submitted your {$terms.reg_term_registration}! {/if} {$terms.reg_term_button_cart_page_continue}
{/if} - + diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index 7c0b687..b0f289b 100755 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -4,9 +4,10 @@
    -
  • {$terms.reg_term_register_cap}
  • -
  • View Cart
  • -
  • Checkout
  • +
  • Select {$terms.reg_term_event_cap}
  • +
  • {$terms.reg_term_register_cap}
  • +
  • View Cart
  • +
  • Checkout
@@ -54,15 +55,15 @@
NOTE: Your {$terms.reg_term_registration} is not complete until you click the "{$terms.reg_term_button_checkout_page_submit}" button at the bottom of this page.
- {/if} + {/if}
-
-
+
+

Billing Information

@@ -143,12 +144,12 @@
E-Mail Address{if $regAccount.fieldRequired.email} *{/if}
- +

{$terms.reg_term_registration_cap} Summary

- + {assign var="summaryType" value="checkout"} {include file='front/registrations/cartSummary.html'}
@@ -173,11 +174,11 @@ {if $pmName == "NoCharge"} {* Nothing here for now *} - {else if $pmName == "OnArrival"} + {else if $pmName == "OnArrival"} {* Nothing here for now *} - {else if $pmName == "Cash"} + {else if $pmName == "Cash"} {* Nothing here for now *} - {else if $pmName == "Check"} + {else if $pmName == "Check"}
Name on Check{if $regAccount.fieldRequired.cc_name} *{/if}
@@ -193,7 +194,7 @@
{else if $pmName == "CreditCard"} - +
{if $settings.reg_proc_methods == 2 && $regAccount.fieldData.customer_profile_id != ''} {* If using Authorize.net and have a stored credit card profile *}
@@ -254,11 +255,11 @@

{$settings.reg_authorize_net_merchant_seal|unescape}

-
+
-
Your credit card will be processed through Authorize.Net. Click the image to the left to verify our security. +
Your credit card will be processed through Authorize.Net. Click the image to the left to verify our security.
-
+
{/if} {/if}
@@ -273,21 +274,21 @@
- + {else}
{/if} - + {/foreach} - +
{/if} {* / total charges > 0 *}
{if apply_filters('glm-members-customfields-plugin-active', false)} {foreach $cart.events as $event} - {assign var="fid" value="glm_reg_customfields_reg_event_`$event.reg_event`"} {* assemble the uid with the current event ID *} + {assign var="fid" value="glm_reg_customfields_reg_event_`$event.reg_event`"} {* assemble the uid with the current event ID *} {if apply_filters('glm-members-customfields-have-fields', false, $fid)}

Additional information requested:

@@ -312,7 +313,7 @@

Terms and Conditions

You must check the boxes below to confirm that you agree to the Terms and Conditions for each {$terms.reg_term_event}.
- {if $haveGlobalTerms} + {if $haveGlobalTerms}
 
@@ -320,8 +321,8 @@
- {/if} - {if $haveEventTerms} + {/if} + {if $haveEventTerms} {foreach $cart.events as $event} {if $event.event_terms != ''}
@@ -343,16 +344,16 @@
(There is no charge for your request.)
{/if}
- + {if $settings.reg_show_navigation_aids}
Your {$terms.reg_term_registration} is not complete until you click here!
{/if} - +
- - + +
Please wait while we process your {$terms.reg_term_registration} request. If you don't see a new page, your {$terms.reg_term_registration} request may not have been processed.

Something may have gone wrong.

@@ -375,7 +376,7 @@

- NOTE: Your {$terms.reg_term_registration_plur} are not complete until you accept the PayPal payment and see the checkout summary page! + NOTE: Your {$terms.reg_term_registration_plur} are not complete until you accept the PayPal payment and see the checkout summary page!
@@ -387,14 +388,14 @@ jQuery(function($){ var payMethodNumb = false; - + // When payment method selection changes $('.payMethodSelector').on('change', function() { // Get the value from the selected Payment Method payMethodNumb = $(this).val(); payMethodSelection(payMethodNumb); - + }); function payMethodSelection(payMethodNumb) { @@ -415,7 +416,7 @@ $('#payPalPayButton').addClass('glm-hidden'); $('#payPalPayButton').attr('disabled','disabled'); } - + } // Dissable checkout button when first clicked to prevent multiple attempts @@ -442,12 +443,12 @@ // Don't actually do a submit yet return false; } - + // If something else is preventing submission, stop here. Use this with custom fields when there are required fields. if (e.isDefaultPrevented()) { return false; } - + // Show submit dialog box $( "#regSubmitDialog" ).dialog( "open" ); @@ -465,7 +466,7 @@ // Start with all pay method inputs dissabled $( document ).ready(function() { - + // Dialog box to show when submitting checkout page $( "#regSubmitDialog" ).dialog({ autoOpen: false, @@ -489,16 +490,16 @@ } } }); - + // Start with all payment method sections hidden $('.payMethodInput').attr('disabled', true); - // Get currently checked payment method - works after browser back button - Should never be needed, but just in case + // Get currently checked payment method - works after browser back button - Should never be needed, but just in case var payMethodNumb = $("input[name='payMethod']:checked").val() if (payMethodNumb == '') { payMethodNumb = {$defaultPayMethod}+0; } - + payMethodSelection(payMethodNumb); }); @@ -535,7 +536,7 @@ $(".cvv-input").mask("000#"); // Registration not submitted Dialog actions - {if $settings.reg_not_submitted_dialog} + {if $settings.reg_not_submitted_dialog} var notSubmittedTimer; notSubmittedDialog = $( "#regNotSubmittedDialog" ).dialog({ @@ -544,7 +545,7 @@ open: function(event,ui) { clearInterval(notSubmittedTimer); }, - close: function(event,ui) { + close: function(event,ui) { resetNotSubmittedTimer(); }, buttons: [ @@ -577,9 +578,9 @@ }); startNotSubmittedTimer(); - {/if} + {/if} - // When the checkout button is clicked and a PayPal payment is requested, this code is called to create a PayPal button inside of the dialog box + // When the checkout button is clicked and a PayPal payment is requested, this code is called to create a PayPal button inside of the dialog box var payPalButtonGenerated = false; function displayPayPalButton() { @@ -588,18 +589,18 @@ } payPalButtonGenerated = true; - + // PayPal button actions paypal.Button.render({ - + // Set your environment - + {if $payPalMode} env: 'sandbox', {else} env: 'production', {/if} - + // Specify the style of the button style: { label: 'pay', @@ -607,17 +608,17 @@ shape: 'rect', // pill | rect color: 'blue' // gold | blue | silver | black }, - + // To create a PayPal see app: https://developer.paypal.com/developer/applications/create client: { sandbox: '{$payPalSandboxClientId}', production: '{$payPalClientId}' }, - + // Wait for the PayPal button to be clicked payment: function(data, actions) { return actions.payment.create({ - invoice_number: '{$cartId}', + invoice_number: '{$cartId}', payment: { payer: { payer_info: { @@ -630,14 +631,14 @@ { description: '{$settings.reg_org_name} {$terms.reg_term_registration_plur_cap}', invoice_number: '{$cartId}', - amount: { - total: '{$cart.grandTotal}', - currency: 'USD' + amount: { + total: '{$cart.grandTotal}', + currency: 'USD' }, item_list: { items: [ - {foreach $cart.chargeItems as $item} - { + {foreach $cart.chargeItems as $item} + { name: '{$item.name|escape}', quantity: {$item.quantity}, price: {$item.price}, @@ -645,7 +646,7 @@ }, {/foreach} ] - } + } } ] } @@ -655,7 +656,7 @@ $('#payPalPaymentWarningMessage').html('
You canceled the PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you don\'t wish to pay with PayPal, click the button below and select another payment method.'); }, onError: function(err) { -console.log(err); +console.log(err); $('#payPalPaymentWarningMessage').html('
There was a problem with your PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you\'re unable to pay with PayPal, click the button below and select another payment method.'); }, // Wait for the payment to be authorized by the customer @@ -666,7 +667,7 @@ console.log(err); // Notify submit code above that it's OK to checkout payPalSubmitOK = true; - + $( "#payPalPaymentDialog" ).dialog("close"); // Add PayPal payment details to form @@ -679,11 +680,11 @@ console.log(err); $("#checkoutForm").submit(); }); } - + }, '#paypal-button-container'); - + } - + }); diff --git a/views/front/registrations/list.html b/views/front/registrations/list.html index b836497..778f2b7 100644 --- a/views/front/registrations/list.html +++ b/views/front/registrations/list.html @@ -2,9 +2,10 @@
    -
  • {$terms.reg_term_register_cap}
  • -
  • View Cart
  • -
  • Checkout
  • +
  • Select {$terms.reg_term_event_cap}
  • +
  • {$terms.reg_term_register_cap}
  • +
  • View Cart
  • +
  • Checkout
@@ -16,11 +17,11 @@ {/if} {if $haveRegEvents} {foreach $regEvents as $event} - +
- +

{$event.event_name}

@@ -31,15 +32,15 @@
-->
- + {$lastDate = ''} {foreach $event.recurrences as $rec} {$eDate = $rec.from_date.timestamp|date_format:"%B %e"} - + {if $eDate != $lastDate} {$lastDate = $eDate} - +
@@ -48,7 +49,7 @@ {else} {$eDate} {/if} - + {if $rec.from_date.date != $rec.to_date.date} {if $rec.from_date.timestamp|date_format:"%Y" != $rec.to_date.timestamp|date_format:"%Y"} - {$rec.to_date.timestamp|date_format:"%B %e, %Y"} @@ -61,7 +62,7 @@ {else} - {$rec.specific_dates|@end|date_format:"%B %e, %Y"} {/if} - + {/if} @@ -122,7 +123,7 @@
{/if}--> - +
@@ -135,7 +136,7 @@
{/if} - +
{/foreach} diff --git a/views/front/registrations/login.html b/views/front/registrations/login.html index e1d65ae..2a73780 100644 --- a/views/front/registrations/login.html +++ b/views/front/registrations/login.html @@ -7,10 +7,10 @@
-
-
-
-
-
@@ -55,13 +57,13 @@
-
-
diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 318cefd..a150783 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -2,7 +2,6 @@ {* Underscore Templates for the Event Registration App *} {* Template for Logged in Account *} - {literal}