From 19597de8c915dd1cea5ec59034edafc08a95b8f5 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 28 Dec 2017 16:51:56 -0500 Subject: [PATCH] Fixed checkout page. Now chekcing for billing information only. Forced certain fields to required. --- classes/data/dataAccount.php | 4 +- views/front/registrations/checkout.html | 108 ++++-------------------- 2 files changed, 18 insertions(+), 94 deletions(-) diff --git a/classes/data/dataAccount.php b/classes/data/dataAccount.php index 93e32f5..4852678 100644 --- a/classes/data/dataAccount.php +++ b/classes/data/dataAccount.php @@ -169,7 +169,7 @@ class GlmDataRegistrationsAccount extends GlmDataAbstract 'fname' => array ( 'field' => 'fname', 'type' => 'text', - 'required' => true, + 'required' => false, 'use' => 'a' ), @@ -177,7 +177,7 @@ class GlmDataRegistrationsAccount extends GlmDataAbstract 'lname' => array ( 'field' => 'lname', 'type' => 'text', - 'required' => true, + 'required' => false, 'use' => 'a' ), diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index 143906c..72b7c84 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -1,5 +1,5 @@ {apply_filters('glm_members_registrations_header', 'accountHeader')} -{debug} + {if true}
@@ -47,24 +47,29 @@
-->
- {if true}

Billing Information

-
- * Required Fields -
+
+

Billing Information

+
+
+ * Required Fields
+
+ {$regAccount.fieldRequired.bill_fname = true}
First Name{if $regAccount.fieldRequired.bill_fname} *{/if}
+ {$regAccount.fieldRequired.bill_lname = true}
Last Name{if $regAccount.fieldRequired.bill_lname} *{/if}
+ {$regAccount.fieldRequired.bill_addr1 = true}
Address{if $regAccount.fieldRequired.bill_addr1} *{/if}
@@ -73,10 +78,12 @@
+ {$regAccount.fieldRequired.bill_city = true}
City{if $regAccount.fieldRequired.bill_city} *{/if}
+ {$regAccount.fieldRequired.bill_state = true}
State{if $regAccount.fieldRequired.bill_state} *{/if}
@@ -107,6 +115,7 @@
+ {$regAccount.fieldRequired.bill_phone = true}
Phone{if $regAccount.fieldRequired.bill_phone} *{/if}
@@ -115,91 +124,6 @@
- - {/if} -
-

Account Information

-
 Same as Billing Information
- {if $regAccountId == 0 || true} - - - {else} - - {/if} - - - - - - - - - - -

Registration Summary

@@ -375,7 +299,7 @@ // Get the value from the selected Payment Method var payMethodNumb = $(this).val(); payMethodSelection(payMethodNumb); - + }); function payMethodSelection(payMethodNumb) { @@ -393,7 +317,7 @@ $("#checkoutForm").submit(function(e){ // If something else is preventing submission, stop here. Use this with custom fields when there are required fields. - if (e.isDefautPrevented()) { + if (e.isDefaultPrevented()) { return false; } -- 2.17.1