4 include_once
'Services/Table/interfaces/interface.ilTableFilterItem.php';
67 $this->activation_title = $a_title;
68 $this->activation_post_var = $a_postvar;
69 $this->activation_checked = $a_checked;
80 $this->toggle_fulltime_txt = $a_title;
81 $this->toggle_fulltime_checked = $a_checked;
82 $this->toggle_fulltime =
true;
118 $this->start = $a_date;
128 $this->start_text = $a_txt;
147 $this->end_text = $a_txt;
182 $this->end = $a_date;
202 $this->showdate = $a_showdate;
212 return $this->showdate;
222 $this->show_empty = $a_empty;
243 $this->showtime = $a_showtime;
253 return $this->showtime;
272 $this->startyear = $a_year;
295 $this->minute_step_size = $a_step_size;
319 if(isset($a_values[$this->
getPostVar()][
'start'][
"time"]))
326 if (isset($a_values[$this->
getPostVar()][
'start'][
"date"]))
332 if(isset($a_values[$this->
getPostVar()][
'end'][
"time"]))
339 if (isset($a_values[$this->
getPostVar()][
'end'][
"date"]))
347 $item->setValueByArray($a_values);
409 $this->invalid_input[
'start'] =
$_POST[$this->
getPostVar()][
'start'][
"date"];
410 $this->
setAlert($lng->txt(
"exc_date_not_valid"));
414 #$_POST[$this->getPostVar()]['start']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
415 #$_POST[$this->getPostVar()]['start']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
454 $this->
setAlert($lng->txt(
"exc_date_not_valid"));
458 #$_POST[$this->getPostVar()]['end']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
459 #$_POST[$this->getPostVar()]['end']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
474 $tpl =
new ilTemplate(
"tpl.prop_datetime_duration.html",
true,
true,
"Services/Form");
477 if(is_a($this->
getStart(),
'ilDate'))
481 elseif(is_a($this->
getStart(),
'ilDateTime'))
491 if(is_array($this->invalid_input[
'start']))
493 $start_info[
'year'] = $this->invalid_input[
'start'][
'y'];
494 $start_info[
'mon'] = $this->invalid_input[
'start'][
'm'];
495 $start_info[
'mday'] = $this->invalid_input[
'start'][
'd'];
499 if(is_a($this->
getEnd(),
'ilDate'))
503 elseif(is_a($this->
getEnd(),
'ilDateTime'))
513 if(is_array($this->invalid_input[
'end']))
515 $end_info[
'year'] = $this->invalid_input[
'end'][
'y'];
516 $end_info[
'mon'] = $this->invalid_input[
'end'][
'm'];
517 $end_info[
'mday'] = $this->invalid_input[
'end'][
'd'];
520 $lng->loadLanguageModule(
"jscalendar");
521 require_once(
"./Services/Calendar/classes/class.ilCalendarUtil.php");
526 $tpl->setCurrentBlock(
'prop_date_activation');
528 $tpl->setVariable(
'TXT_DATE_ENABLED',$this->activation_title);
529 $tpl->setVariable(
'CHECKED_ENABLED',$this->activation_checked ?
'checked="checked"' :
'');
530 $tpl->setVariable(
'CHECKED_DISABLED',$this->
getDisabled() ?
'disabled="disabled" ' :
'');
531 $tpl->parseCurrentBlock();
546 $tpl->setCurrentBlock(
'toggle_fullday');
548 $tpl->setVariable(
'FULLDAY_TOGGLE_NAME',$this->
getPostVar().
'[fulltime]');
549 $tpl->setVariable(
'FULLDAY_TOGGLE_CHECKED',$this->toggle_fulltime_checked ?
'checked="checked"' :
'');
550 $tpl->setVariable(
'FULLDAY_TOGGLE_DISABLED',$this->
getDisabled() ?
'disabled="disabled"' :
'');
551 $tpl->setVariable(
'TXT_TOGGLE_FULLDAY',$this->toggle_fulltime_txt);
552 $tpl->parseCurrentBlock();
560 $tpl->setVariable(
"TXT_START_CALENDAR", $lng->txt(
"open_calendar"));
564 $tpl->setVariable(
"INPUT_FIELDS_START", $this->
getPostVar().
"[start][date]");
565 include_once
'./Services/Calendar/classes/class.ilCalendarUserSettings.php';
567 $tpl->setVariable(
"START_SELECT",
570 $start_info[
'year'], $start_info[
'mon'], $start_info[
'mday'],
575 'select_attributes' => array(
'onchange' =>
'ilUpdateEndDate();')
580 $tpl->setVariable(
"TXT_END_CALENDAR", $lng->txt(
"open_calendar"));
583 $tpl->setVariable(
"INPUT_FIELDS_END", $this->
getPostVar().
"[end][date]");
584 $tpl->setVariable(
"END_SELECT",
587 $end_info[
'year'], $end_info[
'mon'], $end_info[
'mday'],
597 $tpl->setCurrentBlock(
"show_start_time");
598 $tpl->setVariable(
"START_TIME_SELECT",
602 $start_info[
'hours'], $start_info[
'minutes'], $start_info[
'seconds'],
607 'select_attributes' => array(
'onchange' =>
'ilUpdateEndDate();')
612 ?
"(".$lng->txt(
"hh_mm_ss").
")"
613 :
"(".$lng->txt(
"hh_mm").
")");
614 $tpl->parseCurrentBlock();
616 $tpl->setCurrentBlock(
"show_end_time");
617 $tpl->setVariable(
"END_TIME_SELECT",
619 $end_info[
'hours'], $end_info[
'minutes'], $end_info[
'seconds'],
624 ?
"(".$lng->txt(
"hh_mm_ss").
")"
625 :
"(".$lng->txt(
"hh_mm").
")");
626 $tpl->parseCurrentBlock();
631 $tpl->setVariable(
"DELIM",
"<br />");
646 $a_tpl->setCurrentBlock(
"prop_generic");
647 $a_tpl->setVariable(
"PROP_GENERIC", $html);
648 $a_tpl->parseCurrentBlock();