20 $this->ref_id = $a_parent_obj->ref_id;
30 $next_class = $ilCtrl->getNextClass($this);
35 $cmd = $ilCtrl->getCmd(
"render");
51 include_once
'Modules/BookingManager/classes/class.ilBookingSchedulesTableGUI.php';
54 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id))
57 if(
sizeof($table->getData()))
59 include_once
"Modules/BookingManager/classes/class.ilBookingObject.php";
66 include_once
'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
68 $bar->
addButton($lng->txt(
'book_add_schedule'), $ilCtrl->getLinkTarget($this,
'create'));
69 $bar = $bar->getHTML();
72 $tpl->setContent($bar.$table->getHTML());
82 $ilTabs->clearTargets();
83 $ilTabs->setBackTarget($lng->txt(
'book_back_to_list'), $ilCtrl->getLinkTarget($this,
'render'));
86 $tpl->setContent($form->getHTML());
96 $ilTabs->clearTargets();
97 $ilTabs->setBackTarget($lng->txt(
'book_back_to_list'), $ilCtrl->getLinkTarget($this,
'render'));
100 $tpl->setContent($form->getHTML());
113 $lng->loadLanguageModule(
"dateplaner");
115 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
120 $title->setRequired(
true);
122 $title->setMaxLength(120);
123 $form_gui->addItem(
$title);
167 include_once
"Modules/BookingManager/classes/class.ilScheduleInputGUI.php";
169 $definition->
setInfo($lng->txt(
"book_schedule_days_info"));
170 $definition->setRequired(
true);
171 $form_gui->addItem($definition);
174 $deadline->
setInfo($lng->txt(
"book_deadline_info"));
175 $deadline->setSuffix($lng->txt(
"book_hours"));
176 $deadline->setMinValue(0);
177 $deadline->setSize(3);
178 $deadline->setMaxLength(3);
179 $form_gui->addItem($deadline);
181 if ($a_mode ==
"edit")
183 $form_gui->setTitle($lng->txt(
"book_edit_schedule"));
186 $item->setValue($id);
187 $form_gui->addItem($item);
189 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
191 $title->setValue($schedule->getTitle());
192 $deadline->setValue($schedule->getDeadline());
209 $definition->setValue($schedule->getDefinitionBySlots());
211 $form_gui->addCommandButton(
"update", $lng->txt(
"save"));
215 $form_gui->setTitle($lng->txt(
"book_add_schedule"));
216 $form_gui->addCommandButton(
"save", $lng->txt(
"save"));
217 $form_gui->addCommandButton(
"render", $lng->txt(
"cancel"));
219 $form_gui->setFormAction($ilCtrl->getFormAction($this));
232 if($form->checkInput())
234 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
244 $form->setValuesByPost();
246 $tpl->setContent($form->getHTML());
258 if($form->checkInput())
260 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
270 $form->setValuesByPost();
272 $tpl->setContent($form->getHTML());
287 foreach($days_group->getOptions() as $option)
289 $days_fields[$option->getValue()] = $option;
292 foreach($days as $day)
294 $slot = $form->
getInput($day.
"_slot");
295 $subs = $days_fields[$day]->getSubItems();
298 $subs[0]->setValue($slot[0]);
302 $subs[1]->setValue($slot[1]);
315 global $ilObjDataCache;
317 $schedule->setTitle($form->getInput(
"title"));
318 $schedule->setPoolId($ilObjDataCache->lookupObjId($this->ref_id));
319 $schedule->setDeadline($form->getInput(
"deadline"));
348 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
350 $conf->setFormAction($ilCtrl->getFormAction($this));
351 $conf->setHeaderText($lng->txt(
'book_confirm_delete'));
353 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
355 $conf->addItem(
'schedule_id', (
int)$_GET[
'schedule_id'], $type->getTitle());
356 $conf->setConfirm($lng->txt(
'delete'),
'delete');
357 $conf->setCancel($lng->txt(
'cancel'),
'render');
359 $tpl->setContent($conf->getHTML());
369 include_once
'Modules/BookingManager/classes/class.ilBookingSchedule.php';
374 $ilCtrl->redirect($this,
'render');