bug fix for notices
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 9 Jan 2018 18:05:14 +0000 (13:05 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 9 Jan 2018 18:07:09 +0000 (13:07 -0500)
setup passwordError so it's not undefined.

models/front/registrations/checkoutProcess.php
models/front/registrations/register.php
views/front/registrations/register.html
views/front/registrations/summary.html

index 3dbeee3..16faf92 100644 (file)
@@ -104,6 +104,8 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
         $billing        = false;
         $payment        = false;
         $ccConfirmation = '';
+        $emailError     = false;
+        $passwordError  = false;
 
         $Account = new GlmDataRegistrationsAccount($this->wpdb, $this->config);
         $Request = new GlmDataRegistrationsRegRequest($this->wpdb, $this->config);
@@ -717,6 +719,8 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
             'reg_account_id' => $accountId,
             'states_list'    => $this->config['states'],
             'country_list'   => $this->config['countries'],
+            'emailError'     => $emailError,
+            'passwordError'  => $passwordError,
         );
 
         // Return status, any suggested view, and any data to controller
index 765c403..cacfe1f 100644 (file)
@@ -39,7 +39,8 @@
     public function modelAction($actionData = false)
     {
         $view          = 'register';
-        $emailError    = '';
+        $emailError    = false;
+        $passwordError = false;
         $modelRedirect = false;
 
         // Create dummy reg array $reg for the template data.
 
         // Compile template data
         $templateData = array(
-            'page'         => 'register',
-            'reg'          => $reg,
-            'emailError'   => $emailError,
-            'regUrl'       => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
-            'loggedIn'     => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
-            'states_list'  => $this->config['states'],
-            'country_list' => $this->config['countries'],
+            'page'          => 'register',
+            'reg'           => $reg,
+            'emailError'    => $emailError,
+            'passwordError' => $passwordError,
+            'regUrl'        => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+            'loggedIn'      => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
+            'states_list'   => $this->config['states'],
+            'country_list'  => $this->config['countries'],
         );
              // Return status, any suggested view, and any data to controller
         return array(
index e81db52..8833dd4 100644 (file)
@@ -21,7 +21,7 @@
                 <div class="small-12 large-6 columns">
                     <label class="error">Password *
                         {if $passwordError} <span class="glm-error">{$passwordError}</span> {/if}
-                        <input name="password" value="" required>
+                        <input type="password" name="password" value="" required>
                     </label>
                 </div>
             </div>
index 26b7899..8bc7bb3 100644 (file)
@@ -44,7 +44,7 @@
                 <div class="small-12 large-6 columns">
                     <label class="error">Password *
                         {if $passwordError} <span class="glm-error">{$passwordError}</span> {/if}
-                        <input name="password" value="" required>
+                        <input type="password" name="password" value="" required>
                     </label>
                 </div>
             </div>