4 include_once
'Services/Table/interfaces/interface.ilTableFilterItem.php';
66 $this->activation_title = $a_title;
67 $this->activation_post_var = $a_postvar;
68 $this->activation_checked = $a_checked;
79 $this->toggle_fulltime_txt = $a_title;
80 $this->toggle_fulltime_checked = $a_checked;
81 $this->toggle_fulltime =
true;
117 $this->start = $a_date;
127 $this->start_text = $a_txt;
146 $this->end_text = $a_txt;
181 $this->end = $a_date;
201 $this->show_empty = $a_empty;
222 $this->showtime = $a_showtime;
251 $this->startyear = $a_year;
274 $this->minute_step_size = $a_step_size;
298 if(isset($a_values[$this->
getPostVar()][
'start'][
"time"]))
305 if (isset($a_values[$this->
getPostVar()][
'start'][
"date"]))
311 if(isset($a_values[$this->
getPostVar()][
'end'][
"time"]))
318 if (isset($a_values[$this->
getPostVar()][
'end'][
"date"]))
326 $item->setValueByArray($a_values);
388 $this->invalid_input[
'start'] =
$_POST[$this->
getPostVar()][
'start'][
"date"];
389 $this->
setAlert($lng->txt(
"exc_date_not_valid"));
393 #$_POST[$this->getPostVar()]['start']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
394 #$_POST[$this->getPostVar()]['start']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
433 $this->
setAlert($lng->txt(
"exc_date_not_valid"));
437 #$_POST[$this->getPostVar()]['end']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());
438 #$_POST[$this->getPostVar()]['end']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());
453 $tpl =
new ilTemplate(
"tpl.prop_datetime_duration.html",
true,
true,
"Services/Form");
456 if(is_a($this->
getStart(),
'ilDate'))
460 elseif(is_a($this->
getStart(),
'ilDateTime'))
470 if(is_array($this->invalid_input[
'start']))
472 $start_info[
'year'] = $this->invalid_input[
'start'][
'y'];
473 $start_info[
'mon'] = $this->invalid_input[
'start'][
'm'];
474 $start_info[
'mday'] = $this->invalid_input[
'start'][
'd'];
478 if(is_a($this->
getEnd(),
'ilDate'))
482 elseif(is_a($this->
getEnd(),
'ilDateTime'))
492 if(is_array($this->invalid_input[
'end']))
494 $end_info[
'year'] = $this->invalid_input[
'end'][
'y'];
495 $end_info[
'mon'] = $this->invalid_input[
'end'][
'm'];
496 $end_info[
'mday'] = $this->invalid_input[
'end'][
'd'];
499 $lng->loadLanguageModule(
"jscalendar");
500 require_once(
"./Services/Calendar/classes/class.ilCalendarUtil.php");
505 $tpl->setCurrentBlock(
'prop_date_activation');
507 $tpl->setVariable(
'TXT_DATE_ENABLED',$this->activation_title);
508 $tpl->setVariable(
'CHECKED_ENABLED',$this->activation_checked ?
'checked="checked"' :
'');
509 $tpl->setVariable(
'CHECKED_DISABLED',$this->
getDisabled() ?
'disabled="disabled" ' :
'');
510 $tpl->parseCurrentBlock();
525 $tpl->setCurrentBlock(
'toggle_fullday');
527 $tpl->setVariable(
'FULLDAY_TOGGLE_NAME',$this->
getPostVar().
'[fulltime]');
528 $tpl->setVariable(
'FULLDAY_TOGGLE_CHECKED',$this->toggle_fulltime_checked ?
'checked="checked"' :
'');
529 $tpl->setVariable(
'FULLDAY_TOGGLE_DISABLED',$this->
getDisabled() ?
'disabled="disabled"' :
'');
530 $tpl->setVariable(
'TXT_TOGGLE_FULLDAY',$this->toggle_fulltime_txt);
531 $tpl->parseCurrentBlock();
535 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
541 $tpl->setVariable(
"INPUT_FIELDS_START", $this->
getPostVar().
"[start][date]");
542 include_once
'./Services/Calendar/classes/class.ilCalendarUserSettings.php';
544 $tpl->setVariable(
"START_SELECT",
547 $start_info[
'year'], $start_info[
'mon'], $start_info[
'mday'],
552 'select_attributes' => array(
'onchange' =>
'ilUpdateEndDate();')
556 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
561 $tpl->setVariable(
"INPUT_FIELDS_END", $this->
getPostVar().
"[end][date]");
562 $tpl->setVariable(
"END_SELECT",
565 $end_info[
'year'], $end_info[
'mon'], $end_info[
'mday'],
575 $tpl->setCurrentBlock(
"show_start_time");
576 $tpl->setVariable(
"START_TIME_SELECT",
580 $start_info[
'hours'], $start_info[
'minutes'], $start_info[
'seconds'],
585 'select_attributes' => array(
'onchange' =>
'ilUpdateEndDate();')
590 ?
"(".$lng->txt(
"hh_mm_ss").
")"
591 :
"(".$lng->txt(
"hh_mm").
")");
592 $tpl->parseCurrentBlock();
594 $tpl->setCurrentBlock(
"show_end_time");
595 $tpl->setVariable(
"END_TIME_SELECT",
597 $end_info[
'hours'], $end_info[
'minutes'], $end_info[
'seconds'],
602 ?
"(".$lng->txt(
"hh_mm_ss").
")"
603 :
"(".$lng->txt(
"hh_mm").
")");
604 $tpl->parseCurrentBlock();
609 $tpl->setVariable(
"DELIM",
"<br />");
624 $a_tpl->setCurrentBlock(
"prop_generic");
625 $a_tpl->setVariable(
"PROP_GENERIC", $html);
626 $a_tpl->parseCurrentBlock();