24 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
25 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
62 $this->lng->loadLanguageModule(
'dateplaner');
63 $this->lng->loadLanguageModule(
'jscalendar');
84 $next_class = $this->ctrl->getNextClass();
86 switch ($next_class) {
88 $cmd = $this->ctrl->getCmd(
"show");
104 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.user_settings.html',
'Services/Calendar');
107 $this->tpl->setVariable(
'CAL_SETTINGS', $this->form->getHTML());
117 $this->ctrl->returnToParent($this);
128 $this->user_settings->setTimeZone(
$_POST[
'timezone']);
129 $this->user_settings->setExportTimeZoneType((
int)
$_POST[
'export_tz']);
130 $this->user_settings->setWeekStart((
int) $_POST[
'weekstart']);
131 $this->user_settings->setDateFormat((
int) $_POST[
'date_format']);
132 $this->user_settings->setTimeFormat((
int) $_POST[
'time_format']);
133 $this->user_settings->setDayStart((
int) $_POST[
'dst']);
134 $this->user_settings->setDayEnd((
int) $_POST[
'den']);
135 if ($this->
settings->getShowWeeks()) {
136 $this->user_settings->setShowWeeks((
int) $_POST[
'show_weeks']);
139 if (((
int) $_POST[
'den']) < (
int) $_POST[
'dst']) {
145 $this->user_settings->save();
148 $this->ctrl->redirect($this,
"show");
159 if (is_object($this->form)) {
162 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
163 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
166 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
167 $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
168 $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
171 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'),
'timezone');
173 $select->setInfo($this->lng->txt(
'cal_timezone_info'));
174 $select->setValue($this->user_settings->getTimeZone());
175 $this->form->addItem($select);
178 $export_type->
setValue($this->user_settings->getExportTimeZoneType());
181 $export_type->addOption($export_tz);
183 $export_type->addOption($export_utc);
184 $this->form->addItem($export_type);
187 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_date_format'),
'date_format');
192 $select->setInfo($this->lng->txt(
'cal_date_format_info'));
193 $select->setValue($this->user_settings->getDateFormat());
194 $this->form->addItem($select);
196 $select =
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'),
'time_format');
200 $select->setInfo($this->lng->txt(
'cal_time_format_info'));
201 $select->setValue($this->user_settings->getTimeFormat());
202 $this->form->addItem($select);
206 $week_month->setTitle($this->lng->txt(
'cal_week_month_view'));
207 $this->form->addItem($week_month);
210 $radio->
setValue($this->user_settings->getWeekStart());
213 $radio->addOption($option);
215 $radio->addOption($option);
216 $this->form->addItem($radio);
218 if ($this->
settings->getShowWeeks()) {
221 $cb->
setInfo($this->lng->txt(
"cal_usr_show_weeks_info"));
223 $cb->setChecked($this->user_settings->getShowWeeks());
224 $this->form->addItem($cb);
229 $week_month->setTitle($this->lng->txt(
'cal_day_week_view'));
230 $this->form->addItem($week_month);
236 $day_start->setValue($this->user_settings->getDayStart());
237 $this->form->addItem($day_start);
243 $day_end->setValue($this->user_settings->getDayEnd());
244 $this->form->addItem($day_end);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
static _getInstance()
get singleton instance
static getHourSelection($a_format)
Get hour selectio depending on user specific hour format.
static _getInstanceByUserId($a_user_id)
get singleton instance
initSettingsForm()
show settings table
static _getShortTimeZoneList()
get short timezone list
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
executeCommand()
Execute command.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct()
Constructor.