24include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
 
   25include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
 
   67        $this->lng->loadLanguageModule(
'dateplaner');
 
   68        $this->lng->loadLanguageModule(
'jscalendar');
 
   92        $next_class = $this->ctrl->getNextClass();
 
   94        switch ($next_class) {
 
   96                $cmd = $this->ctrl->getCmd(
"show");
 
  112        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.user_settings.html', 
'Services/Calendar');
 
  115        $this->tpl->setVariable(
'CAL_SETTINGS', $this->form->getHTML());
 
  125        $this->ctrl->returnToParent($this);
 
  136        $this->user_settings->setTimeZone(
$_POST[
'timezone']);
 
  137        $this->user_settings->setExportTimeZoneType((
int) 
$_POST[
'export_tz']);
 
  138        $this->user_settings->setWeekStart((
int) 
$_POST[
'weekstart']);
 
  139        $this->user_settings->setDateFormat((
int) 
$_POST[
'date_format']);
 
  140        $this->user_settings->setTimeFormat((
int) 
$_POST[
'time_format']);
 
  141        $this->user_settings->setDayStart((
int) 
$_POST[
'dst']);
 
  142        $this->user_settings->setDayEnd((
int) 
$_POST[
'den']);
 
  143        if ($this->
settings->getShowWeeks()) {
 
  144            $this->user_settings->setShowWeeks((
int) 
$_POST[
'show_weeks']);
 
  153        $this->user_settings->save();
 
  155        ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
  156        $this->ctrl->redirect($this, 
"show");
 
  167        if (is_object($this->form)) {
 
  170        include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
 
  171        include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
 
  174        $this->form->setFormAction($this->ctrl->getFormAction($this, 
'save'));
 
  175        $this->form->setTitle($this->lng->txt(
'cal_user_settings'));
 
  176        $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
 
  179        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_timezone'), 
'timezone');
 
  181        $select->setInfo($this->lng->txt(
'cal_timezone_info'));
 
  182        $select->setValue($this->user_settings->getTimeZone());
 
  183        $this->form->addItem($select);
 
  186        $export_type->setValue($this->user_settings->getExportTimeZoneType());
 
  189        $export_type->addOption($export_tz);
 
  191        $export_type->addOption($export_utc);
 
  192        $this->form->addItem($export_type);
 
  195        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_date_format'), 
'date_format');
 
  196        $select->setOptions(array(
 
  200        $select->setInfo($this->lng->txt(
'cal_date_format_info'));
 
  201        $select->setValue($this->user_settings->getDateFormat());
 
  202        $this->form->addItem($select);
 
  204        $select = 
new ilSelectInputGUI($this->lng->txt(
'cal_user_time_format'), 
'time_format');
 
  205        $select->setOptions(array(
 
  208        $select->setInfo($this->lng->txt(
'cal_time_format_info'));
 
  209        $select->setValue($this->user_settings->getTimeFormat());
 
  210        $this->form->addItem($select);
 
  214        $week_month->setTitle($this->lng->txt(
'cal_week_month_view'));
 
  215        $this->form->addItem($week_month);
 
  218        $radio->setValue($this->user_settings->getWeekStart());
 
  221        $radio->addOption($option);
 
  223        $radio->addOption($option);
 
  224        $this->form->addItem($radio);
 
  226        if ($this->
settings->getShowWeeks()) {
 
  229            $cb->setInfo($this->lng->txt(
"cal_usr_show_weeks_info"));
 
  231            $cb->setChecked($this->user_settings->getShowWeeks());
 
  232            $this->form->addItem($cb);
 
  237        $week_month->setTitle($this->lng->txt(
'cal_day_week_view'));
 
  238        $this->form->addItem($week_month);
 
  241        $day_start->setOptions(
 
  244        $day_start->setValue($this->user_settings->getDayStart());
 
  245        $this->form->addItem($day_start);
 
  248        $day_end->setOptions(
 
  251        $day_end->setValue($this->user_settings->getDayEnd());
 
  252        $this->form->addItem($day_end);
 
An exception for terminatinating execution or to throw for unit testing.
static _getInstance()
get singleton instance
executeCommand()
Execute command.
__construct()
Constructor.
initSettingsForm()
show settings table
static _getInstanceByUserId($a_user_id)
get singleton instance
static _getShortTimeZoneList()
get short timezone list
static getHourSelection($a_format)
Get hour selectio depending on user specific hour format.
This class represents an option in a radio group.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.