24 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
25 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
58 $this->lng->loadLanguageModule(
'dateplaner');
59 $this->lng->loadLanguageModule(
'jscalendar');
63 $this->user = $ilUser;
81 $next_class = $this->ctrl->getNextClass();
86 $cmd = $this->ctrl->getCmd(
"show");
102 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.user_settings.html',
'Services/Calendar');
105 $this->tpl->setVariable(
'CAL_SETTINGS',$this->form->getHTML());
115 $this->ctrl->returnToParent($this);
126 $this->user_settings->setTimeZone($_POST[
'timezone']);
127 $this->user_settings->setWeekStart((
int) $_POST[
'weekstart']);
128 $this->user_settings->setTimeFormat((
int) $_POST[
'time_format']);
129 $this->user_settings->save();
132 $this->ctrl->returnToParent($this);
143 if(is_object($this->form))
147 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
148 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
151 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
152 $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
153 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
154 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
156 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'),
'timezone');
158 $select->setInfo($this->lng->txt(
'cal_timezone_info'));
159 $select->setValue($this->user_settings->getTimeZone());
160 $this->form->addItem($select);
162 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'),
'time_format');
166 $select->setInfo($this->lng->txt(
'cal_time_format_info'));
167 $select->setValue($this->user_settings->getTimeFormat());
168 $this->form->addItem($select);
171 $radio->
setValue($this->user_settings->getWeekStart());
174 $radio->addOption($option);
176 $radio->addOption($option);
177 $this->form->addItem($radio);