20 $this->ref_id = $a_parent_obj->ref_id;
21 $this->slots_no = $a_parent_obj->object->getNumberOfSlots();
31 $next_class = $ilCtrl->getNextClass($this);
36 $cmd = $ilCtrl->getCmd(
"render");
52 include_once
'Modules/BookingManager/classes/class.ilBookingSchedulesTableGUI.php';
55 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
58 if(
sizeof($table->getData()))
60 include_once
"Modules/BookingManager/classes/class.ilBookingType.php";
67 include_once
'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
69 $bar->
addButton($lng->txt(
'book_add_schedule'), $ilCtrl->getLinkTarget($this,
'create'));
70 $bar = $bar->getHTML();
73 $tpl->setContent($bar.$table->getHTML());
83 $ilTabs->clearTargets();
84 $ilTabs->setBackTarget($lng->txt(
'book_back_to_list'), $ilCtrl->getLinkTarget($this,
'render'));
87 $tpl->setContent($form->getHTML());
97 $ilTabs->clearTargets();
98 $ilTabs->setBackTarget($lng->txt(
'book_back_to_list'), $ilCtrl->getLinkTarget($this,
'render'));
101 $tpl->setContent($form->getHTML());
114 $lng->loadLanguageModule(
"dateplaner");
116 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
121 $title->setRequired(
true);
123 $title->setMaxLength(120);
124 $form_gui->addItem(
$title);
168 include_once
"Modules/BookingManager/classes/class.ilScheduleInputGUI.php";
170 $definition->
setInfo($lng->txt(
"book_schedule_days_info"));
171 $definition->setRequired(
true);
172 $form_gui->addItem($definition);
175 $deadline->
setInfo($lng->txt(
"book_deadline_info"));
176 $deadline->setSuffix($lng->txt(
"book_hours"));
177 $deadline->setMinValue(0);
178 $deadline->setSize(3);
179 $deadline->setMaxLength(3);
180 $form_gui->addItem($deadline);
182 if ($a_mode ==
"edit")
184 $form_gui->setTitle($lng->txt(
"book_edit_schedule"));
187 $item->setValue($id);
188 $form_gui->addItem($item);
190 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
192 $title->setValue($schedule->getTitle());
193 $deadline->setValue($schedule->getDeadline());
210 $definition->setValue($schedule->getDefinitionBySlots());
212 $form_gui->addCommandButton(
"update", $lng->txt(
"save"));
216 $form_gui->setTitle($lng->txt(
"book_add_schedule"));
217 $form_gui->addCommandButton(
"save", $lng->txt(
"save"));
218 $form_gui->addCommandButton(
"render", $lng->txt(
"cancel"));
220 $form_gui->setFormAction($ilCtrl->getFormAction($this));
233 if($form->checkInput())
235 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
245 $form->setValuesByPost();
247 $tpl->setContent($form->getHTML());
259 if($form->checkInput())
261 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
271 $form->setValuesByPost();
273 $tpl->setContent($form->getHTML());
288 foreach($days_group->getOptions() as $option)
290 $days_fields[$option->getValue()] = $option;
293 foreach($days as $day)
295 $slot = $form->
getInput($day.
"_slot");
296 $subs = $days_fields[$day]->getSubItems();
299 $subs[0]->setValue($slot[0]);
303 $subs[1]->setValue($slot[1]);
316 global $ilObjDataCache;
318 $schedule->setTitle($form->getInput(
"title"));
319 $schedule->setPoolId($ilObjDataCache->lookupObjId($this->ref_id));
320 $schedule->setDeadline($form->getInput(
"deadline"));
349 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
351 $conf->setFormAction($ilCtrl->getFormAction($this));
352 $conf->setHeaderText($lng->txt(
'book_confirm_delete'));
354 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
356 $conf->addItem(
'schedule_id', (
int)$_GET[
'schedule_id'], $type->getTitle());
357 $conf->setConfirm($lng->txt(
'delete'),
'delete');
358 $conf->setCancel($lng->txt(
'cancel'),
'render');
360 $tpl->setContent($conf->getHTML());
370 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
375 $ilCtrl->redirect($this,
'render');