24 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
 
   25 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
 
   57                 $this->lng->loadLanguageModule(
'dateplaner');
 
   58                 $this->lng->loadLanguageModule(
'jscalendar');
 
   80                 $next_class = $this->ctrl->getNextClass();
 
   85                                 $cmd = $this->ctrl->getCmd(
"show");
 
  101                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.user_settings.html',
'Services/Calendar');
 
  104                 $this->tpl->setVariable(
'CAL_SETTINGS',$this->form->getHTML());
 
  114                 $this->ctrl->returnToParent($this);
 
  126                 $this->user_settings->setTimeZone(
$_POST[
'timezone']);
 
  127                 $this->user_settings->setExportTimeZoneType((
int) 
$_POST[
'export_tz']);
 
  128                 $this->user_settings->setWeekStart((
int) $_POST[
'weekstart']);
 
  129                 $this->user_settings->setDateFormat((
int) $_POST[
'date_format']);
 
  130                 $this->user_settings->setTimeFormat((
int) $_POST[
'time_format']);
 
  131                 $this->user_settings->setDayStart((
int) $_POST[
'dst']);
 
  132                 $this->user_settings->setDayEnd((
int) $_POST[
'den']);
 
  134                 if(((
int) $_POST[
'den']) < (
int) $_POST[
'dst'])
 
  141                 $this->user_settings->save();
 
  144                 $this->ctrl->returnToParent($this);
 
  155                 if(is_object($this->form))
 
  159                 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
 
  160                 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  163                 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
 
  164                 $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
 
  165                 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
 
  166                 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
  168                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'),
'timezone');
 
  170                 $select->setInfo($this->lng->txt(
'cal_timezone_info'));
 
  171                 $select->setValue($this->user_settings->getTimeZone());
 
  172                 $this->form->addItem($select);
 
  175                 $export_type->
setValue($this->user_settings->getExportTimeZoneType());
 
  178                 $export_type->addOption($export_tz);
 
  180                 $export_type->addOption($export_utc);
 
  181                 $this->form->addItem($export_type);
 
  184                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_date_format'),
'date_format');
 
  189                 $select->setInfo($this->lng->txt(
'cal_date_format_info'));
 
  190                 $select->setValue($this->user_settings->getDateFormat());
 
  191                 $this->form->addItem($select);
 
  193                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'),
'time_format');
 
  197                 $select->setInfo($this->lng->txt(
'cal_time_format_info'));
 
  198                 $select->setValue($this->user_settings->getTimeFormat());
 
  199                 $this->form->addItem($select);
 
  203                 $week_month->setTitle($this->lng->txt(
'cal_week_month_view'));
 
  204                 $this->form->addItem($week_month);
 
  207                 $radio->
setValue($this->user_settings->getWeekStart());
 
  210                 $radio->addOption($option);
 
  212                 $radio->addOption($option);
 
  213                 $this->form->addItem($radio);
 
  217                 $week_month->setTitle($this->lng->txt(
'cal_day_week_view'));
 
  218                 $this->form->addItem($week_month);
 
  224                 $day_start->setValue($this->user_settings->getDayStart());
 
  225                 $this->form->addItem($day_start);
 
  231                 $day_end->setValue($this->user_settings->getDayEnd());
 
  232                 $this->form->addItem($day_end);