adding an else statement to the check for groupMonth
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 14 Jun 2017 16:42:46 +0000 (12:42 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 14 Jun 2017 16:42:46 +0000 (12:42 -0400)
instead of getting the current date if groupMonth is set and glm_event_ get params are set
adding an else to use the glm_event date get params

models/front/events/frontAdd.php
models/front/events/list.php
views/front/events/confirmation.html

index 1e06f3b..760600b 100644 (file)
@@ -243,7 +243,7 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
         $fromEmail = trim(filter_var($emailInfo['from_email'], FILTER_VALIDATE_EMAIL));
 
         // get the email notification message
-        $emailNotification = $emailInfo['email_notification'];
+        $emailNotification = ( isset($emailInfo['email_notification']) ? $emailInfo['email_notification'] : '' );
 
         $cats = $categories->getList();
         foreach($cats as $cat){
index 9af4abc..3e6e234 100644 (file)
@@ -194,12 +194,16 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
             if ( !isset( $_REQUEST['glm_event_from'] ) ) {
                 // use the first date for this month
                 $fromDate = date( 'm/d/Y', mktime( 0, 0, 0, date( 'n' ), 1, date( 'Y' ) ) );
+            } else {
+                $fromDate = $_REQUEST['glm_event_from'];
             }
             if ( !isset( $_REQUEST['glm_event_to'] ) ) {
                 $toDate = date( 'm/d/Y', mktime( 0, 0, 0, date( 'n' ), date( 't' ), date( 'Y' ) ) );
+            } else {
+                $toDate = $_REQUEST['glm_event_to'];
             }
-            echo '<pre>$fromDate: ' . print_r( $fromDate, true ) . '</pre>';
-            echo '<pre>$toDate: ' . print_r( $toDate, true ) . '</pre>';
+//            echo '<pre>$fromDate: ' . print_r( $fromDate, true ) . '</pre>';
+//            echo '<pre>$toDate: ' . print_r( $toDate, true ) . '</pre>';
         } else if ( in_array($action, array( 'event-list-name', 'nameSearch', 'featured' ) ) || $this->config['settings']['use_venue_locations'] ) {
             $toDate = null;
         } else {
@@ -240,6 +244,7 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
                 $toDate      = date('m/d/Y', strtotime( '+ ' . $weeks_to_check . ' ' . $week_string ));
             }
         }
+
         if ( $fromDate && $toDate && !(isset($_REQUEST['event_name']) && $_REQUEST['event_name'])) {
             $from = date('Y-m-d', strtotime($fromDate));
             $to   = date('Y-m-d', strtotime($toDate));
index a90c497..7dde154 100644 (file)
@@ -1,9 +1,15 @@
 
 <html>
-    <div class="row">
+    <div class="success-content row">
     <div class='small-12 columns' id="success">
         <h5> Thank you for submitting your event </h5>
         <p> Your submission is currently pending, please allow up to 48 hours for it to be reviewed </p>
     </div>
     </div>
+    <script>
+        jQuery(document).ready(function($){
+            console.log("test");
+        });
+    </script>
 </html>
+