From: Steve Sutton Date: Mon, 16 Apr 2018 19:40:40 +0000 (-0400) Subject: Update for become member form X-Git-Tag: v1.0.0^2~49 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=edfae65c5d3e026b357341c63e3ba2a6e6ed7d9d;p=WP-Plugins%2Fglm-member-db-billing.git Update for become member form WIP working on the add new member form for migcsa. --- diff --git a/models/front/billing/becomeMember.php b/models/front/billing/becomeMember.php index 8d0e66d..705866d 100644 --- a/models/front/billing/becomeMember.php +++ b/models/front/billing/becomeMember.php @@ -78,13 +78,14 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling } - public function modelAction($actionData = false) + public function modelAction( $actionData = false ) { // Initialize Variables Here $option = ''; $view = 'becomeMember'; $management = false; $messages = array(); + $errors = array(); $paymentSuccess = false; $paymentError = false; $payable_types = false; @@ -110,21 +111,49 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling $view = 'alreadyAMember'; break; + case 'newMembership': + $payable_types = $BillingSupport->getAllPayableInvoiceTypes(); + $messages[] = '
$_REQUEST: ' . print_r( $_REQUEST, true ) . '
'; + // Need to see if the email address they're using is already setup as a contact. + // If it is then we need to give a message about it and not let them sign up again. + + $email_to_check = filter_var( $_REQUEST['email'], FILTER_VALIDATE_EMAIL ); + $messages[] = '
$email_to_check: ' . print_r( $email_to_check, true ) . '
'; + $verify_email = filter_var( $_REQUEST['email_verify'], FILTER_VALIDATE_EMAIL ); + $messages[] = '
$verify_email: ' . print_r( $verify_email, true ) . '
'; + if ( $email_to_check !== $verify_email ) { + // Emails don't match give error message + $error = true; + $messages[] = $errors['email'] = "Emails don't match!"; + } + + // Process the main form + + // Process any custom fields + break; + default: $payable_types = $BillingSupport->getAllPayableInvoiceTypes(); break; } + // Load DataClass for Management. + require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/data/dataManagement.php'; + $Management = new GlmDataBillingManagement( $this->wpdb, $this->config ); + $management = $Management->getEntry( 1 ); + // Compile template data $templateData = array( 'option' => $option, 'billing_settings' => $this->config['billing_settings'], 'management' => $management, 'messages' => $messages, + 'errors' => $errors, 'paymentSuccess' => $paymentSuccess, 'paymentError' => $paymentError, - 'payable_types' => $payable_types, + 'payable_types' => $payable_types, + 'states' => $this->config['states'] ); // Return status, any suggested view, and any data to controller. diff --git a/views/front/billing/becomeMember.html b/views/front/billing/becomeMember.html index afa480c..ebe1fd0 100644 --- a/views/front/billing/becomeMember.html +++ b/views/front/billing/becomeMember.html @@ -1,4 +1,4 @@ - +{* This template is for MiGCSA Become a Member Form *}

Membership Renewal

@@ -12,7 +12,7 @@ {/if}
- + @@ -50,7 +50,11 @@ First Name
- +
@@ -58,7 +62,11 @@ Last Name
- +
@@ -66,7 +74,12 @@ Email
- + + {if $errors.email}{$errors.email}{/if}
@@ -74,16 +87,224 @@ Confirm Email
- + +
+ + {* START - Custom Fields part for MiGCSA *} +
+
+ Company Position +
+
+ +
+
+
+
+ Spouse +
+
+ +
+
+
+
+ District +
+
+ +
+
+
+
+ Preferred Communication +
+
+ +
+
+
+
+ Type of Operation +
+
+ +
+
+
+
+ CGCS +
+
+ +
+
+
+
+ Will Volunteer for a Committee +
+
+ +
+
+ {* END - Custom Fields part for MiGCSA *} + + + +
+ Account/Contact Information + +
+
+ Phone +
+
+ +
+
+
+
+ Cellphone +
+
+
+
+
+ Fax +
+
+ +
+
+
+
+ Email on Website +
+
+ +
+
+
+
+ Web Address +
+
+ +
+
+ + +
+
+ Username +
+
+ +
+
+
+
+ Password +
+
+ +
+
+
+
+ Confirm Password +
+
+ +
+
+ +
+ +
+ Billing Address
Address
- +
@@ -91,7 +312,11 @@ City
- +
@@ -101,9 +326,9 @@
@@ -114,19 +339,16 @@ Zip
- -
-
-
-
- Email Address -
-
- +
-
+ +
Payment Options @@ -150,8 +372,8 @@ class="ccard" type="text" name="cc_name" - required - {if isset($smarty.request.cc_name) && $smarty.request.cc_name}value="{$smarty.request.cc_name}"{/if} /> + {if isset($smarty.request.cc_name) && $smarty.request.cc_name}value="{$smarty.request.cc_name}"{/if} + required /> @@ -179,9 +401,9 @@ type="text" placeholder="Numbers Only" name="cc_numb" - required pattern="\d*" - {if isset($smarty.request.cc_numb) && $smarty.request.cc_numb}value="{$smarty.request.cc_numb}"{/if} /> + {if isset($smarty.request.cc_numb) && $smarty.request.cc_numb}value="{$smarty.request.cc_numb}"{/if} + required />
@@ -194,9 +416,9 @@ type="text" placeholder="MM/YY" name="cc_exp" - required pattern="{literal}\d{2}/\d{2}{/literal}" - {if isset($smarty.request.cc_exp) && $smarty.request.cc_exp}value="{$smarty.request.cc_exp}"{/if} /> + {if isset($smarty.request.cc_exp) && $smarty.request.cc_exp}value="{$smarty.request.cc_exp}"{/if} + required />
@@ -209,9 +431,9 @@ type="text" placeholder="3 or 4 digit security code on back of card" name="cc_cvv" - required pattern="{literal}\d{3,4}{/literal}" - {if isset($smarty.request.cc_cvv) && $smarty.request.cc_cvv}value="{$smarty.request.cc_cvv}"{/if} /> + {if isset($smarty.request.cc_cvv) && $smarty.request.cc_cvv}value="{$smarty.request.cc_cvv}"{/if} + required />