From 07e895fc426b9b6b7e433eee8a4b61e13f5e676a Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 19 Jun 2013 17:27:13 +0800 Subject: [PATCH] Small change for creating events when calendar is not selected --- .../controllers/panel/calendar/back_end/events_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/built_in_modules/calendar/app/controllers/panel/calendar/back_end/events_controller.rb b/vendor/built_in_modules/calendar/app/controllers/panel/calendar/back_end/events_controller.rb index a6cead67..b63c079c 100644 --- a/vendor/built_in_modules/calendar/app/controllers/panel/calendar/back_end/events_controller.rb +++ b/vendor/built_in_modules/calendar/app/controllers/panel/calendar/back_end/events_controller.rb @@ -71,7 +71,10 @@ class Panel::Calendar::BackEnd::EventsController < OrbitBackendController start_am_pm = params[:start_am_pm] end_am_pm = params[:end_am_pm] - cal_id = params[:event][:cal_id] + if params[:event][:cal_id] + cal_id = params[:event][:cal_id] + else + cal_id = Cal.first.id.to_s # if start_am_pm == "PM" # temp_start_time = $starttime + 12