4 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
28 foreach($values as $key => $value)
36 switch(strtolower(get_class($field)))
38 case 'ilcheckboxinputgui':
41 $field->setChecked(
true);
46 $field->setValue($value);
57 public function getCreationForm()
70 $form->addItem($description);
72 return $this->addDefaultBehaviour($form);
97 public function getSettingsForm()
106 $title->setRequired(
true);
113 $cb->
setInfo($lng->txt(
'anonymous_hint'));
116 $txt->setRequired(
true);
117 $txt->setInfo($lng->txt(
'autogen_usernames_info'));
118 $cb->addSubItem(
$txt);
121 $cb =
new ilCheckboxInputGUI($lng->txt(
'allow_custom_usernames'),
'allow_custom_usernames');
127 $num_msg_history =
new ilNumberInputGUI($lng->txt(
'display_past_msgs'),
'display_past_msgs');
128 $num_msg_history->
setInfo($lng->txt(
'hint_display_past_msgs'));
129 $num_msg_history->setMinValue(0);
130 $num_msg_history->setMaxValue(100);
131 $form->
addItem($num_msg_history);
133 $cb =
new ilCheckboxInputGUI($lng->txt(
'private_rooms_enabled'),
'private_rooms_enabled');
134 $cb->
setInfo($lng->txt(
'private_rooms_enabled_info'));
144 public function getFileUploadForm()
154 $file_input->setPostVar(
'file_to_upload');
155 $file_input->setTitle($lng->txt(
'upload'));
168 public function getPeriodForm()
178 require_once
'Services/Form/classes/class.ilDateDurationInputGUI.php';
181 $duration->setStartText($lng->txt(
'duration_from'));
182 $duration->setEndText($lng->txt(
'duration_to'));
195 public function getUserChatNameSelectionForm(
array $name_options)
205 $radio =
new ilRadioGroupInputGUI($lng->txt(
'select_custom_username'),
'custom_username_radio');
207 foreach($name_options as $key => $option)
210 $radio->addOption($opt);
213 $custom_opt =
new ilRadioOption($lng->txt(
'custom_username'),
'custom_username');
214 $radio->addOption($custom_opt);
220 if($ilUser->isAnonymous())
222 $radio->setValue(
'anonymousName');
226 $radio->setValue(
'fullname');
237 public function getSessionForm(
array $sessions)
250 foreach($sessions as $session)
255 $options[$session[
'connected'] .
',' .
259 $list->setOptions($options);
260 $list->setRequired(
true);
271 public function getGeneralSettingsForm()
280 $address =
new ilTextInputGUI($lng->txt(
'chatserver_address'),
'address');
286 $port->setMaxValue(65535);
287 $port->setRequired(
true);
288 $port->setInfo($lng->txt(
'port_info'));
292 $subDirectory =
new ilTextInputGUI($lng->txt(
'chat_osc_no_sub_directory'),
'sub_directory');
294 $subDirectory->setInfo($lng->txt(
'chat_osc_no_sub_directory_info'));
301 $protocol->addOption(
$http);
304 $protocol->addOption(
$https);
307 $certificate->setInfo($lng->txt(
'chat_https_cert_info'));
312 $key->
setInfo($lng->txt(
'chat_https_key_info'));
313 $key->setRequired(
true);
317 $dhparam->
setInfo($lng->txt(
'chat_https_dhparam_info'));
318 $dhparam->setRequired(
true);
319 $https->addSubItem($dhparam);
322 $chatLog->
setInfo($lng->txt(
'chat_log_info'));
323 $chatLog->setRequired(
false);
326 $chatErrorLog =
new ilTextInputGUI($lng->txt(
'error_log'),
'error_log');
327 $chatErrorLog->
setInfo($lng->txt(
'chat_error_log_info'));
328 $chatErrorLog->setRequired(
false);
332 $iliasSection->setTitle($lng->txt(
'ilias_chatserver_connection'));
337 $iliasProxy->setInfo($lng->txt(
'ilias_proxy_info'));
340 $chatServerILIASUrl =
new ilTextInputGUI($lng->txt(
'url'),
'ilias_url');
342 $chatServerILIASUrl->setInfo($lng->txt(
'connection_url_info'));
343 $iliasProxy->addSubItem($chatServerILIASUrl);
346 $clientSection->setTitle($lng->txt(
'client_chatserver_connection'));
347 $form->
addItem($clientSection);
351 $clientProxy->setInfo($lng->txt(
'client_proxy_info'));
354 $chatServerClientUrl =
new ilTextInputGUI($lng->txt(
'url'),
'client_url');
356 $chatServerClientUrl->setInfo($lng->txt(
'connection_url_info'));
357 $clientProxy->addSubItem($chatServerClientUrl);
360 $deletion_section->setTitle($lng->txt(
'chat_deletion_section_head'));
361 $form->
addItem($deletion_section);
363 $deletion_options =
new ilRadioGroupInputGUI($lng->txt(
'chat_deletion_section_head'),
'deletion_mode');
365 $deletion_mode_deactivated =
new ilRadioOption($lng->txt(
'chat_deletion_disabled'), 0);
366 $deletion_options->addOption($deletion_mode_deactivated);
368 $chat_deletion_interval =
new ilRadioOption($lng->txt(
'chat_deletion_interval'), 1);
369 $chat_deletion_interval->
setInfo($lng->txt(
'chat_deletion_interval_info'));
370 $interval_unit =
new ilSelectInputGUI($lng->txt(
'chat_deletion_interval_unit'),
'deletion_unit');
372 $interval_unit->setOptions(
array(
373 'days' => $lng->txt(
'days'),
374 'weeks' => $lng->txt(
'weeks'),
375 'month' => $lng->txt(
'months'),
376 'years' => $lng->txt(
'years'),
378 $chat_deletion_interval->addSubItem($interval_unit);
380 require_once
'Modules/Chatroom/classes/form/class.ilChatroomMessageDeletionThresholdInputGUI.php';
383 $interval_value->setMinValue(1);
384 $interval_value->setRequired(
true);
385 $chat_deletion_interval->addSubItem($interval_value);
387 $runAtTime =
new ilTextInputGUI($lng->txt(
'chat_deletion_interval_run_at'),
'deletion_time');
388 $runAtTime->
setInfo($lng->txt(
'chat_deletion_interval_run_at_info'));
389 $runAtTime->setRequired(
true);
390 $runAtTime->setValidationRegexp(
'/([01][0-9]|[2][0-3]):[0-5][0-9]/');
391 $chat_deletion_interval->addSubItem($runAtTime);
393 $deletion_options->addOption($chat_deletion_interval);
395 $form->
addItem($deletion_options);
403 public function getClientSettingsForm()
416 $enable_osc->
setInfo($lng->txt(
'chatroom_enable_osc_info'));
417 $enable_chat->addSubItem($enable_osc);
420 $osd->
setInfo($lng->txt(
'hint_osd'));
421 $enable_chat->addSubItem($osd);
423 $interval =
new ilNumberInputGUI($lng->txt(
'osd_intervall'),
'osd_intervall');
425 $interval->setRequired(
true);
426 $interval->setInfo($lng->txt(
'hint_osd_interval'));
427 $osd->addSubItem($interval);
429 $play_sound =
new ilCheckboxInputGUI($lng->txt(
'play_invitation_sound'),
'play_invitation_sound');
430 $play_sound->
setInfo($lng->txt(
'play_invitation_sound'));
431 $osd->addSubItem($play_sound);
433 $enable_smilies =
new ilCheckboxInputGUI($lng->txt(
'enable_smilies'),
'enable_smilies');
434 $enable_smilies->
setInfo($lng->txt(
'hint_enable_smilies'));
435 $enable_chat->addSubItem($enable_smilies);
437 $name = new \ilTextInputGUI($lng->txt(
'chatroom_client_name'),
'client_name');
438 $name->setInfo($lng->txt(
'chatroom_client_name_info'));
439 $name->setRequired(
true);
440 $name->setMaxLength(100);
441 $enable_chat->addSubItem($name);
443 require_once
'Modules/Chatroom/classes/class.ilChatroomAuthInputGUI.php';
445 $auth->
setInfo($lng->txt(
'chat_auth_token_info'));
446 $auth->setCtrlPath(
array(
'iladministrationgui',
'ilobjchatroomgui',
'ilpropertyformgui',
'ilformpropertydispatchgui',
'ilchatroomauthinputgui'));
447 $auth->setRequired(
true);
448 $enable_chat->addSubItem($auth);
This class represents an option in a radio group.
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
setInfo($a_info)
Set Info.
if(@file_exists(dirname(__FILE__).'/lang/eng.php')) $certificate
if(!is_array($argv)) $options
This class represents a text property in a property form.
Create styles array
The data for the language used.
This class represents a text area property in a property form.