Fixed flxxy parameter error in requestDashboard and now adding submit error messages...
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 5 Sep 2018 16:04:36 +0000 (12:04 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 5 Sep 2018 16:04:36 +0000 (12:04 -0400)
models/front/registrations/checkoutProcess.php [changed mode: 0644->0755]
views/admin/registrations/eventEditLevels.html [changed mode: 0644->0755]
views/admin/registrations/requestDashboard.html [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 5e21183..49b1406
@@ -794,6 +794,22 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
             // Include the billing info same flag
             $regAccount['billingSame'] = $billingSame;
 
+            // Build failure message text to append to request notes field.
+            $failNotes = "Checkout Failure: ".date('l F j, Y g:i a')."\n";
+            if (is_array($messages) && count($messages > 0)) {
+                foreach ($messages as $mess) {
+                    $failNotes .= '* '.$mess."\n";
+                }
+            }
+            $failNotes .= '\n';
+
+            // Append failure message text to request notes field.
+            $updated = $this->wpdb->query("
+                update ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request
+                set notes = concat(COALESCE(notes,''), '$failNotes')
+                where id = $requestId
+            ");
+
             $view = 'checkout';
 
             $templateData = array(
old mode 100644 (file)
new mode 100755 (executable)
index d5b910f..8bb9699
@@ -98,7 +98,7 @@
                                 <th style="white-space: nowrap;">Start Days</th>
                                 <td>
                                     <input class="rate-start-days glm-form-text-input-veryshort" type="text" name="start_days_<% if (id) { %><%- id %><% } else { %> new <% } %>" value="<% if (start_days) { %><%- start_days %><% } %>">
-                                    Number of days before {/literal}terms.reg_term_event}{literal} that this rate starts. Must not overlap other rates.
+                                    Number of days before {/literal}{$terms.reg_term_event}{literal} that this rate starts. Must not overlap other rates.
                                 </td>
                             </tr>
                             <tr>
old mode 100644 (file)
new mode 100755 (executable)
index bb5d665..69d33e3
                             <div class="glm-small-12 glm-column">
         {if $cart.request.notes != ''}
                                 <div style="background-color: white; border: solid black 1px; padding: .2em; margin-top: .2em;">
-                                    {$cart.request.notes}
+                                    {$cart.request.notes|nl2br}
                                 </div>
         {else}
                                 (no notes entered)