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->setTimeFormat((
int) $_POST[
'time_format']);
129 $this->user_settings->setDayStart((
int) $_POST[
'dst']);
130 $this->user_settings->setDayEnd((
int) $_POST[
'den']);
132 if(((
int) $_POST[
'den']) < (
int) $_POST[
'dst'])
139 $this->user_settings->save();
142 $this->ctrl->returnToParent($this);
153 if(is_object($this->form))
157 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
158 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
161 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
162 $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
163 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
164 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
166 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'),
'timezone');
168 $select->setInfo($this->lng->txt(
'cal_timezone_info'));
169 $select->setValue($this->user_settings->getTimeZone());
170 $this->form->addItem($select);
172 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'),
'time_format');
176 $select->setInfo($this->lng->txt(
'cal_time_format_info'));
177 $select->setValue($this->user_settings->getTimeFormat());
178 $this->form->addItem($select);
182 $week_month->setTitle($this->lng->txt(
'cal_week_month_view'));
183 $this->form->addItem($week_month);
186 $radio->
setValue($this->user_settings->getWeekStart());
189 $radio->addOption($option);
191 $radio->addOption($option);
192 $this->form->addItem($radio);
196 $week_month->setTitle($this->lng->txt(
'cal_day_week_view'));
197 $this->form->addItem($week_month);
203 $day_start->setValue($this->user_settings->getDayStart());
204 $this->form->addItem($day_start);
210 $day_end->setValue($this->user_settings->getDayEnd());
211 $this->form->addItem($day_end);