adding month of year value and recurrences function
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 27 Apr 2016 14:42:35 +0000 (10:42 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 27 Apr 2016 14:42:35 +0000 (10:42 -0400)
models/front/events/frontAdd.php
views/front/events/frontAdd.html

index 9a2d3f7..7a8ba14 100644 (file)
@@ -10,7 +10,7 @@ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataEvents.php';
 require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataCategories.php';
 require_once GLM_MEMBERS_EVENTS_PLUGIN_PATH . '/models/front/events/baseAction.php';
 require_once(GLM_MEMBERS_PLUGIN_PATH.'/models/admin/ajax/imageUpload.php');
- require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php';
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php';
 
 /**
  * GLmMembersFront_event_fontAdd
@@ -330,6 +330,7 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                     'event'             => $eventID,
                     'start_time'        => $smilitaryTime,
                     'end_time'          => $emilitaryTime,
+                    'start_date'        => $starting,
                     'from_date'         => $starting,
                     'to_date'           => $ending,
                     'all_day'           => $allDay,
@@ -337,6 +338,7 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                     'day_of_month'      => $dayOfMonth,
                     'week_of_month'     => $weekOfMonth,
                     'start_time_only'   => $startTimeOnly,
+                    'month_of_year'     => 4095,
                     'day_of_week'       => $days,
                     'by_day_of_month'   => $byDayOfMonth,
                     'last_day_of_month' => $lastDayOfMonth
@@ -350,6 +352,8 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                          '%s',
                          '%s',
                          '%s',
+                         '%s',
+                         '%d',
                          '%d',
                          '%d',
                          '%d',
@@ -361,6 +365,9 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                     )
                 );
               $recurID = $this->wpdb->insert_id;
+              $Recurrences->optionIncludeSelectListData = false;
+              $times = $Recurrences->createRecurrenceTimesEntries($recurID, true, true);
+               
               $timeData = array(
                     'event'      => $eventID,
                     'start_time' => $mysqlStart,
index 84087cd..eede800 100644 (file)
         </tr>
 
     </table>
-<input id="newEvent" name='newEvent' type="submit" value="Add Event">
+<input class="button radius" id="newEvent" name='newEvent' type="submit" value="Add Event">
 <!--<input name="option" value="submit" type="hidden">-->
 </form>