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');
 
   62                 $this->user = $ilUser;
 
   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->setWeekStart((
int) 
$_POST[
'weekstart']);
 
  128                 $this->user_settings->setDateFormat((
int) $_POST[
'date_format']);
 
  129                 $this->user_settings->setTimeFormat((
int) $_POST[
'time_format']);
 
  130                 $this->user_settings->setDayStart((
int) $_POST[
'dst']);
 
  131                 $this->user_settings->setDayEnd((
int) $_POST[
'den']);
 
  133                 if(((
int) $_POST[
'den']) < (
int) $_POST[
'dst'])
 
  140                 $this->user_settings->save();
 
  143                 $this->ctrl->returnToParent($this);
 
  154                 if(is_object($this->form))
 
  158                 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
 
  159                 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  162                 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
 
  163                 $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
 
  164                 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
 
  165                 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
  167                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'),
'timezone');
 
  169                 $select->setInfo($this->lng->txt(
'cal_timezone_info'));
 
  170                 $select->setValue($this->user_settings->getTimeZone());
 
  171                 $this->form->addItem($select);
 
  174                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_date_format'),
'date_format');
 
  179                 $select->setInfo($this->lng->txt(
'cal_date_format_info'));
 
  180                 $select->setValue($this->user_settings->getDateFormat());
 
  181                 $this->form->addItem($select);
 
  183                 $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'),
'time_format');
 
  187                 $select->setInfo($this->lng->txt(
'cal_time_format_info'));
 
  188                 $select->setValue($this->user_settings->getTimeFormat());
 
  189                 $this->form->addItem($select);
 
  193                 $week_month->setTitle($this->lng->txt(
'cal_week_month_view'));
 
  194                 $this->form->addItem($week_month);
 
  197                 $radio->
setValue($this->user_settings->getWeekStart());
 
  200                 $radio->addOption($option);
 
  202                 $radio->addOption($option);
 
  203                 $this->form->addItem($radio);
 
  207                 $week_month->setTitle($this->lng->txt(
'cal_day_week_view'));
 
  208                 $this->form->addItem($week_month);
 
  214                 $day_start->setValue($this->user_settings->getDayStart());
 
  215                 $this->form->addItem($day_start);
 
  221                 $day_end->setValue($this->user_settings->getDayEnd());
 
  222                 $this->form->addItem($day_end);