diff --git a/apps/calendar/ajax/newevent.php b/apps/calendar/ajax/newevent.php index 8ea39c2346..f3b95aae4b 100755 --- a/apps/calendar/ajax/newevent.php +++ b/apps/calendar/ajax/newevent.php @@ -27,8 +27,7 @@ if(!OC_USER::isLoggedIn()) { $title = $_POST["title"]; $location = $_POST["location"]; $cat = $_POST["cat"]; -$cal = $_POST["cal"]; -$cal = "1"; +$cal = str_replace("option_","", $_POST["cal"]); $allday = $_POST["allday"]; $from = $_POST["from"]; $fromtime = $_POST["fromtime"]; diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php index 21dddaa7db..255b0af29a 100755 --- a/apps/calendar/templates/part.newevent.php +++ b/apps/calendar/templates/part.newevent.php @@ -153,8 +153,8 @@ function validate_newevent_form(){ var newevent_title = document.getElementById("newevent_title").value; var newevent_location = document.getElementById("newevent_location").value; - var newevent_cat;// = document.getElementById("newevent_cat").options[document.getElementById("newevent_cat").selectedIndex].value; - var newevent_cal;// = document.getElementById("newevent_cal").options[document.getElementById("newevent_cal").selectedIndex].value; + var newevent_cat = document.getElementById("formcategorie_select").options[document.getElementById("formcategorie_select").selectedIndex].value; + var newevent_cal = document.getElementById("formcalendar_select").options[document.getElementById("formcalendar_select").selectedIndex].id; var newevent_allday = document.getElementById("newcalendar_allday_checkbox").checked; var newevent_from = document.getElementById("from").value; var newevent_fromtime = document.getElementById("fromtime").value;