本文整理汇总了PHP中ilCheckboxInputGUI::setOptionTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCheckboxInputGUI::setOptionTitle方法的具体用法?PHP ilCheckboxInputGUI::setOptionTitle怎么用?PHP ilCheckboxInputGUI::setOptionTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCheckboxInputGUI
的用法示例。
在下文中一共展示了ilCheckboxInputGUI::setOptionTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initServiceSettingsForm
/**
* Init service settings form
* @param ilPropertyFormGUI $form
* @param type $services
*/
public static function initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
{
global $ilSetting;
if (in_array(self::CALENDAR_VISIBILITY, $services)) {
include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
if (ilCalendarSettings::_getInstance()->isEnabled()) {
// Container tools (calendar, news, ... activation)
$cal = new ilCheckboxInputGUI('', self::CALENDAR_VISIBILITY);
$cal->setValue(1);
include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
$cal->setChecked(ilCalendarSettings::lookupCalendarActivated($a_obj_id));
$cal->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_calendar'));
$form->addItem($cal);
}
}
if (in_array(self::NEWS_VISIBILITY, $services)) {
if ($ilSetting->get('block_activated_news')) {
// Container tools (calendar, news, ... activation)
$news = new ilCheckboxInputGUI('', self::NEWS_VISIBILITY);
$news->setValue(1);
$news->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::NEWS_VISIBILITY, $ilSetting->get('block_activated_news', true)));
$news->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_news'));
$form->addItem($news);
}
}
return $form;
}
示例2: addFieldsToEditForm
protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
{
// orientation
$orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
$orientation->setRequired(false);
$orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
$orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
$a_form->addItem($orientation);
// minimum answers
$minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
$minanswers->setValue(1);
$minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
$minanswers->setRequired(FALSE);
$nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
$nranswers->setSize(5);
$nranswers->setDecimals(0);
$nranswers->setRequired(false);
$nranswers->setMinValue(1);
$minanswers->addSubItem($nranswers);
$nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
$nrmaxanswers->setSize(5);
$nrmaxanswers->setDecimals(0);
$nrmaxanswers->setRequired(false);
$nrmaxanswers->setMinValue(1);
$minanswers->addSubItem($nrmaxanswers);
$a_form->addItem($minanswers);
// Answers
include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
$answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(false);
$answers->setAllowMove(true);
$answers->setShowWizard(false);
$answers->setShowSavePhrase(false);
$answers->setUseOtherAnswer(true);
$answers->setShowNeutralCategory(true);
$answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
$answers->setDisabledScale(false);
$a_form->addItem($answers);
// values
$orientation->setValue($this->object->getOrientation());
$minanswers->setChecked($this->object->use_min_answers);
$nranswers->setValue($this->object->nr_min_answers);
$nrmaxanswers->setValue($this->object->nr_max_answers);
if (!$this->object->getCategories()->getCategoryCount()) {
$this->object->getCategories()->addCategory("");
}
$answers->setValues($this->object->getCategories());
}
示例3: getLogSettingsForm
/**
* @return ilPropertyFormGUI
*/
protected function getLogSettingsForm()
{
/**
* @var $ilAccess ilAccessHandler
*/
global $ilAccess;
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'saveLogSettings'));
$form->setTitle($this->lng->txt('assessment_log_logging'));
$logging = new ilCheckboxInputGUI('', 'chb_assessment_logging');
$logging->setValue(1);
$logging->setOptionTitle($this->lng->txt('activate_assessment_logging'));
$form->addItem($logging);
$reporting = new ilSelectInputGUI($this->lng->txt('assessment_settings_reporting_language'), 'reporting_language');
$languages = $this->lng->getInstalledLanguages();
$this->lng->loadLanguageModule('meta');
$options = array();
foreach ($languages as $lang) {
$options[$lang] = $this->lng->txt('meta_l_' . $lang);
}
$reporting->setOptions($options);
$form->addItem($reporting);
if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
$form->addCommandButton('saveLogSettings', $this->lng->txt('save'));
}
return $form;
}
示例4: initForm
/**
* init create/edit form
*
* @access protected
* @param string edit or create
* @return
*/
protected function initForm($a_mode = 'edit')
{
global $ilUser, $tpl, $tree;
if (is_object($this->form)) {
return true;
}
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
switch ($a_mode) {
case 'edit':
$this->form->setFormAction($this->ctrl->getFormAction($this, 'update'));
break;
default:
$this->form->setTableWidth('600px');
$this->form->setFormAction($this->ctrl->getFormAction($this, 'save'));
break;
}
// title
$title = new ilTextInputGUI($this->lng->txt('title'), 'title');
$title->setSubmitFormOnEnter(true);
$title->setValue($this->object->getTitle());
$title->setSize(40);
$title->setMaxLength(128);
$title->setRequired(true);
$this->form->addItem($title);
// desc
$desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
$desc->setValue($this->object->getLongDescription());
$desc->setRows(2);
$desc->setCols(40);
$this->form->addItem($desc);
// Group type
$grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'), 'grp_type');
if ($a_mode == 'edit') {
$type = $this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus();
} else {
$type = $this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC;
}
$grp_type->setValue($type);
$grp_type->setRequired(true);
// PUBLIC GROUP
$opt_public = new ilRadioOption($this->lng->txt('grp_public'), GRP_TYPE_PUBLIC, $this->lng->txt('grp_public_info'));
$grp_type->addOption($opt_public);
// CLOSED GROUP
$opt_closed = new ilRadioOption($this->lng->txt('grp_closed'), GRP_TYPE_CLOSED, $this->lng->txt('grp_closed_info'));
$grp_type->addOption($opt_closed);
if ($a_mode == 'update_group_type') {
$grp_type->setAlert($this->lng->txt('grp_type_changed_info'));
}
$this->form->addItem($grp_type);
if ($a_mode == 'edit') {
// Group registration ############################################################
$pres = new ilFormSectionHeaderGUI();
$pres->setTitle($this->lng->txt('grp_setting_header_registration'));
$this->form->addItem($pres);
// Registration type
$reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
$reg_type->setValue($this->object->getRegistrationType());
$opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);
#$this->lng->txt('grp_reg_direct_info'));
$reg_type->addOption($opt_dir);
$opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
$pass = new ilTextInputGUI('', 'password');
$pass->setInfo($this->lng->txt('grp_reg_password_info'));
$pass->setValue($this->object->getPassword());
$pass->setSize(10);
$pass->setMaxLength(32);
$opt_pass->addSubItem($pass);
$reg_type->addOption($opt_pass);
$opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
$reg_type->addOption($opt_req);
$opt_deact = new ilRadioOption($this->lng->txt('grp_reg_disabled'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
$reg_type->addOption($opt_deact);
// Registration codes
$reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
$reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
$reg_code->setValue(1);
$reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
$this->form->addItem($reg_type);
// time limit
$time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'), 'reg_limit_time');
$time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
$time_limit->setChecked($this->object->isRegistrationUnlimited() ? false : true);
$this->lng->loadLanguageModule('dateplaner');
include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
$tpl->addJavaScript('./Services/Form/js/date_duration.js');
$dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_period'), 'reg');
$dur->setStartText($this->lng->txt('cal_start'));
$dur->setEndText($this->lng->txt('cal_end'));
$dur->setMinuteStepSize(5);
$dur->setShowDate(true);
$dur->setShowTime(true);
$dur->setStart($this->object->getRegistrationStart());
//.........这里部分代码省略.........
示例5: editQuestion
/**
* Creates an output of the edit form for the question
*
* @access public
*/
public function editQuestion($checkonly = FALSE)
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt($this->getQuestionType()));
$form->setMultipart(FALSE);
$form->setTableWidth("100%");
$form->setId("multiplechoice");
// title
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setValue($this->object->getTitle());
$title->setRequired(TRUE);
$form->addItem($title);
// label
$label = new ilTextInputGUI($this->lng->txt("label"), "label");
$label->setValue($this->object->label);
$label->setInfo($this->lng->txt("label_info"));
$label->setRequired(false);
$form->addItem($label);
// author
$author = new ilTextInputGUI($this->lng->txt("author"), "author");
$author->setValue($this->object->getAuthor());
$author->setRequired(TRUE);
$form->addItem($author);
// description
$description = new ilTextInputGUI($this->lng->txt("description"), "description");
$description->setValue($this->object->getDescription());
$description->setRequired(FALSE);
$form->addItem($description);
// questiontext
$question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
$question->setValue($this->object->prepareTextareaOutput($this->object->getQuestiontext()));
$question->setRequired(TRUE);
$question->setRows(10);
$question->setCols(80);
$question->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$question->addPlugin("latex");
$question->addButton("latex");
$question->addButton("pastelatex");
$question->setRTESupport($this->object->getId(), "spl", "survey", null, false, "3.4.7");
$form->addItem($question);
// obligatory
$shuffle = new ilCheckboxInputGUI($this->lng->txt("obligatory"), "obligatory");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getObligatory());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
// orientation
$orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
$orientation->setRequired(false);
$orientation->setValue($this->object->getOrientation());
$orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
$orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
$form->addItem($orientation);
// minimum answers
$minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
$minanswers->setValue(1);
$minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
$minanswers->setChecked($this->object->use_min_answers);
$minanswers->setRequired(FALSE);
$nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
$nranswers->setSize(5);
$nranswers->setDecimals(0);
$nranswers->setRequired(false);
$nranswers->setMinValue(1);
$nranswers->setValue($this->object->nr_min_answers);
$minanswers->addSubItem($nranswers);
$nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
$nrmaxanswers->setSize(5);
$nrmaxanswers->setDecimals(0);
$nrmaxanswers->setRequired(false);
$nrmaxanswers->setMinValue(1);
$nrmaxanswers->setValue($this->object->nr_max_answers);
$minanswers->addSubItem($nrmaxanswers);
$form->addItem($minanswers);
// Answers
include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
$answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(false);
$answers->setAllowMove(true);
$answers->setShowWizard(false);
$answers->setShowSavePhrase(false);
$answers->setUseOtherAnswer(true);
$answers->setShowNeutralCategory(true);
$answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
if (!$this->object->getCategories()->getCategoryCount()) {
$this->object->getCategories()->addCategory("");
}
$answers->setValues($this->object->getCategories());
$answers->setDisabledScale(false);
$form->addItem($answers);
$this->addCommandButtons($form);
//.........这里部分代码省略.........
示例6: initForm
/**
* Init form
*
* @param string $a_cmd
* @return ilPropertyFormGUI
*/
public function initForm($a_cmd = "")
{
global $ilCtrl, $lng;
$lng->loadLanguageModule('crs');
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this->parent_obj, $a_cmd));
$form->setTarget('_blank');
$form->setTitle($lng->txt('sess_gen_attendance_list'));
$title = new ilTextInputGUI($lng->txt('title'), 'title');
$title->setValue($this->title);
$form->addItem($title);
$desc = new ilTextInputGUI($lng->txt('description'), 'desc');
$desc->setValue($this->description);
$form->addItem($desc);
if (sizeof($this->presets)) {
$preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset');
$preset_value = array();
foreach ($this->presets as $id => $item) {
$preset->addOption(new ilCheckboxOption($item[0], $id));
if ($item[1]) {
$preset_value[] = $id;
}
}
$preset->setValue($preset_value);
$form->addItem($preset);
}
$blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank');
$blank->setMulti(true);
$form->addItem($blank);
if ($this->pre_blanks) {
$blank->setValue($this->pre_blanks);
}
$part = new ilFormSectionHeaderGUI();
$part->setTitle($lng->txt('event_participant_selection'));
$form->addItem($part);
// Admins
$admin = new ilCheckboxInputGUI($lng->txt('event_tbl_admins'), 'show_admins');
$admin->setOptionTitle($lng->txt('event_inc_admins'));
$admin->setValue(1);
$form->addItem($admin);
// Tutors
$tutor = new ilCheckboxInputGUI($lng->txt('event_tbl_tutors'), 'show_tutors');
$tutor->setOptionTitle($lng->txt('event_inc_tutors'));
$tutor->setValue(1);
$form->addItem($tutor);
// Members
$member = new ilCheckboxInputGUI($lng->txt('event_tbl_members'), 'show_members');
$member->setOptionTitle($lng->txt('event_inc_members'));
$member->setValue(1);
$member->setChecked(true);
$form->addItem($member);
$form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list'));
if ($this->id && $a_cmd) {
include_once "Services/User/classes/class.ilUserFormSettings.php";
$settings = new ilUserFormSettings($this->id);
$settings->exportToForm($form);
}
return $form;
}
示例7: addTestFinishProperties
/**
* @param ilPropertyFormGUI $form
*/
private function addTestFinishProperties(ilPropertyFormGUI $form)
{
$testFinishHeader = new ilFormSectionHeaderGUI();
$testFinishHeader->setTitle($this->lng->txt("tst_final_information"));
$form->addItem($testFinishHeader);
// examview
$enable_examview = new ilCheckboxInputGUI($this->lng->txt("enable_examview"), 'enable_examview');
$enable_examview->setValue(1);
$enable_examview->setChecked($this->testOBJ->getEnableExamview());
$enable_examview->setInfo($this->lng->txt("enable_examview_desc"));
$show_examview_html = new ilCheckboxInputGUI('', 'show_examview_html');
$show_examview_html->setValue(1);
$show_examview_html->setChecked($this->testOBJ->getShowExamviewHtml());
$show_examview_html->setOptionTitle($this->lng->txt("show_examview_html"));
$enable_examview->addSubItem($show_examview_html);
$show_examview_pdf = new ilCheckboxInputGUI('', 'show_examview_pdf');
$show_examview_pdf->setValue(1);
$show_examview_pdf->setChecked($this->testOBJ->getShowExamviewPdf());
$show_examview_pdf->setOptionTitle($this->lng->txt("show_examview_pdf"));
$enable_examview->addSubItem($show_examview_pdf);
$form->addItem($enable_examview);
// show final statement
$showfinal = new ilCheckboxInputGUI($this->lng->txt("final_statement"), "showfinalstatement");
$showfinal->setChecked($this->testOBJ->getShowFinalStatement());
$showfinal->setInfo($this->lng->txt("final_statement_show_desc"));
$form->addItem($showfinal);
// final statement
$finalstatement = new ilTextAreaInputGUI($this->lng->txt("final_statement"), "finalstatement");
$finalstatement->setRequired(true);
$finalstatement->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getFinalStatement(), false, true));
$finalstatement->setRows(10);
$finalstatement->setCols(80);
$finalstatement->setUseRte(TRUE);
$finalstatement->addPlugin("latex");
$finalstatement->addButton("latex");
$finalstatement->setRTESupport($this->testOBJ->getId(), "tst", "assessment");
$finalstatement->setRteTagSet('full');
$showfinal->addSubItem($finalstatement);
$redirection_mode = $this->testOBJ->getRedirectionMode();
$rm_enabled = new ilCheckboxInputGUI($this->lng->txt('redirect_after_finishing_tst'), 'redirection_enabled');
$rm_enabled->setInfo($this->lng->txt('redirect_after_finishing_tst_desc'));
$rm_enabled->setChecked($redirection_mode == '0' ? false : true);
$radio_rm = new ilRadioGroupInputGUI($this->lng->txt('redirect_after_finishing_rule'), 'redirection_mode');
$always = new ilRadioOption($this->lng->txt('redirect_always'), REDIRECT_ALWAYS);
$radio_rm->addOption($always);
$kiosk = new ilRadioOption($this->lng->txt('redirect_in_kiosk_mode'), REDIRECT_KIOSK);
$radio_rm->addOption($kiosk);
$radio_rm->setValue(in_array($redirection_mode, array(REDIRECT_ALWAYS, REDIRECT_KIOSK)) ? $redirection_mode : REDIRECT_ALWAYS);
$rm_enabled->addSubItem($radio_rm);
$redirection_url = new ilTextInputGUI($this->lng->txt('redirection_url'), 'redirection_url');
$redirection_url->setValue((string) $this->testOBJ->getRedirectionUrl());
$redirection_url->setRequired(true);
$rm_enabled->addSubItem($redirection_url);
$form->addItem($rm_enabled);
// Sign submission
$sign_submission = $this->testOBJ->getSignSubmission();
$sign_submission_enabled = new ilCheckboxInputGUI($this->lng->txt('sign_submission'), 'sign_submission');
$sign_submission_enabled->setChecked($sign_submission);
$sign_submission_enabled->setInfo($this->lng->txt('sign_submission_info'));
$form->addItem($sign_submission_enabled);
// mail notification
$mailnotification = new ilCheckboxInputGUI($this->lng->txt("tst_finish_notification"), "mailnotification");
$mailnotification->setInfo($this->lng->txt("tst_finish_notification_desc"));
$mailnotification->setChecked($this->testOBJ->getMailNotification() > 0);
$form->addItem($mailnotification);
$mailnotificationContent = new ilRadioGroupInputGUI($this->lng->txt("tst_finish_notification_content"), "mailnotification_content");
$mailnotificationContent->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_simple"), 1, ''));
$mailnotificationContent->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_advanced"), 2, ''));
$mailnotificationContent->setValue($this->testOBJ->getMailNotification() ? $this->testOBJ->getMailNotification() : 1);
$mailnotificationContent->setRequired(true);
$mailnotification->addSubItem($mailnotificationContent);
$mailnottype = new ilCheckboxInputGUI('', "mailnottype");
$mailnottype->setValue(1);
$mailnottype->setOptionTitle($this->lng->txt("mailnottype"));
$mailnottype->setChecked($this->testOBJ->getMailNotificationType());
$mailnotification->addSubItem($mailnottype);
}
示例8: initRoleMappingForm
/**
* init propertyformgui for Assignment of LDAP Attributes to ILIAS User Profile
* @param string $command command methode
* @return \ilPropertyFormGUI
*/
private function initRoleMappingForm($command)
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$this->setSubTabs();
$this->tabs_gui->setSubTabActive('ldap_role_mapping');
if (isset($_GET["mapping_id"])) {
$this->ctrl->setParameter($this, 'mapping_id', $_GET["mapping_id"]);
}
$propertie_form = new ilPropertyFormGUI();
$propertie_form->setFormAction($this->ctrl->getFormAction($this, $command));
$propertie_form->addCommandButton($command, $this->lng->txt('save'));
$propertie_form->addCommandButton("roleMapping", $this->lng->txt('cancel'));
$url = new ilTextInputGUI($this->lng->txt('ldap_server'));
$url->setPostVar("url");
$url->setSize(50);
$url->setMaxLength(255);
$url->setRequired(true);
$group_dn = new ilTextInputGUI($this->lng->txt('ldap_group_dn'));
$group_dn->setPostVar("dn");
$group_dn->setSize(50);
$group_dn->setMaxLength(255);
$group_dn->setInfo($this->lng->txt('ldap_dn_info'));
$group_dn->setRequired(true);
$member = new ilTextInputGUI($this->lng->txt('ldap_group_member'));
$member->setPostVar("member");
$member->setSize(32);
$member->setMaxLength(255);
$member->setInfo($this->lng->txt('ldap_member_info'));
$member->setRequired(true);
$member_isdn = new ilCheckboxInputGUI("");
$member_isdn->setPostVar("memberisdn");
$member_isdn->setOptionTitle($this->lng->txt('ldap_memberisdn'));
$role = new ilTextInputGUI($this->lng->txt('ldap_ilias_role'));
$role->setPostVar("role");
$role->setSize(32);
$role->setMaxLength(255);
$role->setInfo($this->lng->txt('ldap_role_info'));
$role->setRequired(true);
$info = new ilTextAreaInputGUI($this->lng->txt('ldap_info_text'));
$info->setPostVar("info");
$info->setCols(50);
$info->setRows(3);
$info->setInfo($this->lng->txt('ldap_info_text_info'));
$info_type = new ilCheckboxInputGUI("");
$info_type->setPostVar("info_type");
$info_type->setOptionTitle($this->lng->txt('ldap_mapping_info_type'));
$propertie_form->addItem($url);
$propertie_form->addItem($group_dn);
$propertie_form->addItem($member);
$propertie_form->addItem($member_isdn);
$propertie_form->addItem($role);
$propertie_form->addItem($info);
$propertie_form->addItem($info_type);
return $propertie_form;
}
示例9: createUserAgreementCheckBox
/**
* Generate and always set the user agreement checkbox.
*
* @return \ilCheckboxInputGUI
*/
private function createUserAgreementCheckBox()
{
$agreement_id = $this->book->getRoomAgreementFileId();
$link = $this->getFileLinkForUserAgreementId($agreement_id);
$title = $this->lng->txt("rep_robj_xrs_rooms_user_agreement_accept");
$checkbox_agreement = new ilCheckboxInputGUI($title, "accept_room_rules");
$checkbox_agreement->setRequired(true);
$checkbox_agreement->setOptionTitle($link);
$checkbox_agreement->setChecked(true);
$checkbox_agreement->setValue(1);
$checkbox_agreement->setDisabled(true);
return $checkbox_agreement;
}
示例10: getChatSettingsForm
/**
* @return ilPropertyFormGUI
*/
private function getChatSettingsForm()
{
/**
* @var $ilSetting ilSetting
* @var $lng ilLanguage
*/
global $lng;
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'saveChatOptions'));
$form->setTitle($lng->txt("chat_settings"));
$chb = new ilCheckboxInputGUI('', 'play_invitation_sound');
$chb->setOptionTitle($this->lng->txt('play_invitation_sound'));
$form->addItem($chb);
$form->addCommandButton("saveChatOptions", $lng->txt("save"));
return $form;
}
示例11: showSecurity
/**
* Show Privacy settings
*
* @access public
*/
public function showSecurity()
{
global $ilSetting, $ilUser, $rbacreview;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$security = ilSecuritySettings::_getInstance();
$this->tabs_gui->setTabActive('show_security');
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('ps_security_protection'));
// Form checkbox
$check = new ilCheckboxInputGUI($this->lng->txt('ps_auto_https'), 'auto_https_detect_enabled');
$check->setOptionTitle($this->lng->txt('ps_auto_https_description'));
$check->setChecked($security->isAutomaticHTTPSEnabled() ? 1 : 0);
$check->setValue(1);
$text = new ilTextInputGUI($this->lng->txt('ps_auto_https_header_name'), 'auto_https_detect_header_name');
$text->setValue($security->getAutomaticHTTPSHeaderName());
$text->setSize(24);
$text->setMaxLength(64);
$check->addSubItem($text);
$text = new ilTextInputGUI($this->lng->txt('ps_auto_https_header_value'), 'auto_https_detect_header_value');
$text->setValue($security->getAutomaticHTTPSHeaderValue());
$text->setSize(24);
$text->setMaxLength(64);
$check->addSubItem($text);
$form->addItem($check);
$check2 = new ilCheckboxInputGUI($this->lng->txt('activate_https'), 'https_enabled');
$check2->setChecked($security->isHTTPSEnabled() ? 1 : 0);
$check2->setValue(1);
$form->addItem($check2);
$radio_group = new ilRadioGroupInputGUI($this->lng->txt('ps_account_security_mode'), 'account_security_mode');
$radio_group->setValue($security->getAccountSecurityMode());
$radio_opt = new ilRadioOption($this->lng->txt('ps_account_security_mode_default'), ilSecuritySettings::ACCOUNT_SECURITY_MODE_DEFAULT);
$radio_group->addOption($radio_opt);
$radio_opt = new ilRadioOption($this->lng->txt('ps_account_security_mode_customized'), ilSecuritySettings::ACCOUNT_SECURITY_MODE_CUSTOMIZED);
$check = new ilCheckboxInputGUI($this->lng->txt('ps_password_chars_and_numbers_enabled'), 'password_chars_and_numbers_enabled');
$check->setChecked($security->isPasswordCharsAndNumbersEnabled() ? 1 : 0);
//$check->setOptionTitle($this->lng->txt('ps_password_chars_and_numbers_enabled'));
$check->setInfo($this->lng->txt('ps_password_chars_and_numbers_enabled_info'));
$radio_opt->addSubItem($check);
$check = new ilCheckboxInputGUI($this->lng->txt('ps_password_special_chars_enabled'), 'password_special_chars_enabled');
$check->setChecked($security->isPasswordSpecialCharsEnabled() ? 1 : 0);
//$check->setOptionTitle($this->lng->txt('ps_password_special_chars_enabled'));
$check->setInfo($this->lng->txt('ps_password_special_chars_enabled_info'));
$radio_opt->addSubItem($check);
$text = new ilTextInputGUI($this->lng->txt('ps_password_min_length'), 'password_min_length');
$text->setInfo($this->lng->txt('ps_password_min_length_info'));
$text->setValue($security->getPasswordMinLength());
$text->setSize(1);
$text->setMaxLength(2);
$radio_opt->addSubItem($text);
$text = new ilTextInputGUI($this->lng->txt('ps_password_max_length'), 'password_max_length');
$text->setInfo($this->lng->txt('ps_password_max_length_info'));
$text->setValue($security->getPasswordMaxLength());
$text->setSize(2);
$text->setMaxLength(3);
$radio_opt->addSubItem($text);
$text = new ilTextInputGUI($this->lng->txt('ps_password_max_age'), 'password_max_age');
$text->setInfo($this->lng->txt('ps_password_max_age_info'));
$text->setValue($security->getPasswordMaxAge());
$text->setSize(2);
$text->setMaxLength(3);
$radio_opt->addSubItem($text);
$text = new ilTextInputGUI($this->lng->txt('ps_login_max_attempts'), 'login_max_attempts');
$text->setInfo($this->lng->txt('ps_login_max_attempts_info'));
$text->setValue($security->getLoginMaxAttempts());
$text->setSize(1);
$text->setMaxLength(2);
$radio_opt->addSubItem($text);
$radio_group->addOption($radio_opt);
$form->addItem($radio_group);
$check = new ilCheckboxInputGUI($this->lng->txt('ps_password_change_on_first_login_enabled'), 'password_change_on_first_login_enabled');
$check->setInfo($this->lng->txt('ps_password_change_on_first_login_enabled_info'));
$check->setChecked($security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0);
$form->addItem($check);
// file suffix replacement
$ti = new ilTextInputGUI($this->lng->txt("file_suffix_repl"), "suffix_repl_additional");
$ti->setMaxLength(200);
$ti->setSize(40);
$ti->setInfo($this->lng->txt("file_suffix_repl_info") . " " . SUFFIX_REPL_DEFAULT);
$ti->setValue($ilSetting->get("suffix_repl_additional"));
$form->addItem($ti);
// prevent login from multiple pcs at the same time
$objCb = new ilCheckboxInputGUI($this->lng->txt('ps_prevent_simultaneous_logins'), 'ps_prevent_simultaneous_logins');
$objCb->setChecked((int) $security->isPreventionOfSimultaneousLoginsEnabled());
$objCb->setValue(1);
$objCb->setOptionTitle($this->lng->txt('ps_prevent_simultaneous_logins_info'));
$form->addItem($objCb);
// protected admin
$admin = new ilCheckboxInputGUI($GLOBALS['lng']->txt('adm_adm_role_protect'), 'admin_role');
$admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID));
$admin->setInfo($GLOBALS['lng']->txt('adm_adm_role_protect_info'));
$admin->setChecked((int) $security->isAdminRoleProtected());
$admin->setValue(1);
$form->addItem($admin);
$form->addCommandButton('save_security', $this->lng->txt('save'));
//.........这里部分代码省略.........
示例12: initFormSubstitutions
/**
* init form table 'substitutions'
*
* @access protected
*/
protected function initFormSubstitutions()
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
if (!($visible_records = ilAdvancedMDRecord::_getAllRecordsByObjectType())) {
return;
}
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this));
#$this->form->setTableWidth('100%');
// substitution
foreach ($visible_records as $obj_type => $records) {
$perm = null;
// :TODO: hardwird ?
if (in_array($obj_type, array("crs", "cat"))) {
$perm = $this->getPermissions()->hasPermissions(ilAdvancedMDPermissionHelper::CONTEXT_SUBSTITUTION, $obj_type, array(ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_SHOW_DESCRIPTION, ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_SHOW_FIELDNAMES, ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_FIELD_POSITIONS));
}
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDSubstitution.php';
$sub = ilAdvancedMDSubstitution::_getInstanceByObjectType($obj_type);
// Show section
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('objs_' . $obj_type));
$this->form->addItem($section);
$check = new ilCheckboxInputGUI($this->lng->txt('description'), 'enabled_desc_' . $obj_type);
$check->setValue(1);
$check->setOptionTitle($this->lng->txt('md_adv_desc_show'));
$check->setChecked($sub->isDescriptionEnabled() ? true : false);
$this->form->addItem($check);
if ($perm && !$perm[ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_SHOW_DESCRIPTION]) {
$check->setDisabled(true);
}
$check = new ilCheckboxInputGUI($this->lng->txt('md_adv_field_names'), 'enabled_field_names_' . $obj_type);
$check->setValue(1);
$check->setOptionTitle($this->lng->txt('md_adv_fields_show'));
$check->setChecked($sub->enabledFieldNames() ? true : false);
$this->form->addItem($check);
if ($perm && !$perm[ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_SHOW_FIELDNAMES]) {
$check->setDisabled(true);
}
#$area = new ilTextAreaInputGUI($this->lng->txt('md_adv_substitution'),'substitution_'.$obj_type);
#$area->setUseRte(true);
#$area->setRteTagSet('standard');
#$area->setValue(ilUtil::prepareFormOutput($sub->getSubstitutionString()));
#$area->setRows(5);
#$area->setCols(80);
#$this->form->addItem($area);
if ($perm) {
$perm_pos = $perm[ilAdvancedMDPermissionHelper::ACTION_SUBSTITUTION_FIELD_POSITIONS];
}
$definitions = ilAdvancedMDFieldDefinition::getInstancesByObjType($obj_type);
$definitions = $sub->sortDefinitions($definitions);
$counter = 1;
foreach ($definitions as $def) {
$definition_id = $def->getFieldId();
$perm = $this->getSubstitutionFieldPermissions($obj_type, $definition_id);
$title = ilAdvancedMDRecord::_lookupTitle($def->getRecordId());
$title = $def->getTitle() . ' (' . $title . ')';
$check = new ilCheckboxInputGUI($title, 'show[' . $obj_type . '][' . $definition_id . ']');
$check->setValue(1);
$check->setOptionTitle($this->lng->txt('md_adv_show'));
$check->setChecked($sub->isSubstituted($definition_id));
if ($perm && !$perm["show"]) {
$check->setDisabled(true);
}
$pos = new ilNumberInputGUI($this->lng->txt('position'), 'position[' . $obj_type . '][' . $definition_id . ']');
$pos->setSize(3);
$pos->setMaxLength(4);
$pos->allowDecimals(true);
$pos->setValue(sprintf('%.1f', $counter++));
$check->addSubItem($pos);
if ($perm && !$perm_pos) {
$pos->setDisabled(true);
}
$bold = new ilCheckboxInputGUI($this->lng->txt('bold'), 'bold[' . $obj_type . '][' . $definition_id . ']');
$bold->setValue(1);
$bold->setChecked($sub->isBold($definition_id));
$check->addSubItem($bold);
if ($perm && !$perm["bold"]) {
$bold->setDisabled(true);
}
$bold = new ilCheckboxInputGUI($this->lng->txt('newline'), 'newline[' . $obj_type . '][' . $definition_id . ']');
$bold->setValue(1);
$bold->setChecked($sub->hasNewline($definition_id));
$check->addSubItem($bold);
if ($perm && !$perm["newline"]) {
$bold->setDisabled(true);
}
$this->form->addItem($check);
}
// placeholder
/*
$custom = new ilCustomInputGUI($this->lng->txt('md_adv_placeholders'));
$tpl = new ilTemplate('tpl.placeholder_info.html',true,true,'Services/AdvancedMetaData');
foreach($records as $record)
{
foreach(ilAdvancedMDFieldDefinition::_getDefinitionsByRecordId($record->getRecordId()) as $definition)
//.........这里部分代码省略.........
示例13: initHTTPSForm
private function initHTTPSForm()
{
global $ilCtrl, $lng;
$this->setServerInfoSubTabs('adm_https');
$lng->loadLanguageModule('ps');
include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
$security = ilSecuritySettings::_getInstance();
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($lng->txt("adm_https"));
$form->setFormAction($ilCtrl->getFormAction($this, 'saveHTTPS'));
$check = new ilCheckboxInputGUI($lng->txt('ps_auto_https'), 'auto_https_detect_enabled');
$check->setOptionTitle($lng->txt('ps_auto_https_description'));
$check->setChecked($security->isAutomaticHTTPSEnabled() ? 1 : 0);
$check->setValue(1);
$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_name'), 'auto_https_detect_header_name');
$text->setValue($security->getAutomaticHTTPSHeaderName());
$text->setSize(24);
$text->setMaxLength(64);
$text->setRequired(true);
$check->addSubItem($text);
$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_value'), 'auto_https_detect_header_value');
$text->setValue($security->getAutomaticHTTPSHeaderValue());
$text->setSize(24);
$text->setMaxLength(64);
$text->setRequired(true);
$check->addSubItem($text);
$form->addItem($check);
$check2 = new ilCheckboxInputGUI($lng->txt('activate_https'), 'https_enabled');
$check2->setChecked($security->isHTTPSEnabled() ? 1 : 0);
$check2->setValue(1);
$form->addItem($check2);
// save and cancel commands
$form->addCommandButton('saveHTTPS', $lng->txt('save'));
return $form;
}
示例14: initBasicSettingsForm
/**
* Init basic settings form.
*/
public function initBasicSettingsForm($a_install = false)
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// webspace dir
$ne = new ilNonEditableValueGUI($lng->txt("data_directory_in_ws"), "webspace_dir");
if ($a_install) {
$ne->setInfo($this->lng->txt("data_directory_in_ws_info"));
}
$cwd = ilUtil::isWindows() ? str_replace("\\", "/", getcwd()) : getcwd();
$ne->setValue($cwd . "/data");
$this->form->addItem($ne);
// data dir
if ($a_install) {
$ti = new ilTextInputGUI($lng->txt("data_directory_outside_ws"), "datadir_path");
$ti->setInfo($lng->txt("data_directory_info"));
$ti->setRequired(true);
$this->form->addItem($ti);
} else {
$ne = new ilNonEditableValueGUI($lng->txt("data_directory_outside_ws"), "data_dir");
$this->form->addItem($ne);
}
$lvext = ilUtil::isWindows() ? "_win" : "";
// logging
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("logging"));
$this->form->addItem($sh);
// path to log file
$ti = new ilTextInputGUI($lng->txt("log_path"), "log_path");
$ti->setInfo($lng->txt("log_path_comment" . $lvext));
$this->form->addItem($ti);
// disable logging
$cb = new ilCheckboxInputGUI($lng->txt("disable_logging"), "chk_log_status");
$this->form->addItem($cb);
// server settings
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("server_settings"));
$this->form->addItem($sh);
// time zone
include_once "./Services/Calendar/classes/class.ilCalendarUtil.php";
$si = new ilSelectInputGUI($lng->txt("time_zone"), "time_zone");
$si->setOptions(array_merge(array("" => "-- " . $lng->txt("please_select") . " --"), ilCalendarUtil::_getShortTimeZoneList()));
$si->setRequired(true);
$this->form->addItem($si);
// https settings
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("https_settings"));
$this->form->addItem($sh);
$check = new ilCheckboxInputGUI($lng->txt('ps_auto_https'), 'auto_https_detect_enabled');
$check->setOptionTitle($lng->txt('ps_auto_https_description'));
$check->setValue(1);
$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_name'), 'auto_https_detect_header_name');
$text->setSize(24);
$text->setMaxLength(64);
$text->setRequired(true);
$check->addSubItem($text);
$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_value'), 'auto_https_detect_header_value');
$text->setSize(24);
$text->setMaxLength(64);
$text->setRequired(true);
$check->addSubItem($text);
$this->form->addItem($check);
// required 3rd party tools
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("3rd_party_software_req"));
$this->form->addItem($sh);
// convert path
$ti = new ilTextInputGUI($lng->txt("convert_path"), "convert_path");
$ti->setInfo($lng->txt("convert_path_comment" . $lvext));
$ti->setRequired(true);
$this->form->addItem($ti);
// zip path
$ti = new ilTextInputGUI($lng->txt("zip_path"), "zip_path");
$ti->setInfo($lng->txt("zip_path_comment" . $lvext));
$ti->setRequired(true);
$this->form->addItem($ti);
// unzip path
$ti = new ilTextInputGUI($lng->txt("unzip_path"), "unzip_path");
$ti->setInfo($lng->txt("unzip_path_comment" . $lvext));
$ti->setRequired(true);
$this->form->addItem($ti);
// optional 3rd party tools
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("3rd_party_software_opt"));
$this->form->addItem($sh);
// ghostscript path
$ti = new ilTextInputGUI($lng->txt("ghostscript_path"), "ghostscript_path");
$ti->setInfo($lng->txt("ghostscript_path_comment" . $lvext));
$this->form->addItem($ti);
// java path
$ti = new ilTextInputGUI($lng->txt("java_path"), "java_path");
$ti->setInfo($lng->txt("java_path_comment" . $lvext));
$this->form->addItem($ti);
// htmldoc path
$ti = new ilTextInputGUI($lng->txt("htmldoc_path"), "htmldoc_path");
$ti->setInfo($lng->txt("htmldoc_path_comment" . $lvext));
//.........这里部分代码省略.........
示例15: addAgreement
/**
* Add agreement to form
* @param type $form
* @param type $a_obj_id
* @param type $a_type
*/
public static function addAgreement($form, $a_obj_id, $a_type)
{
global $lng;
$agreement = new ilCheckboxInputGUI($lng->txt($a_type . '_agree'), 'agreement');
$agreement->setRequired(true);
$agreement->setOptionTitle($lng->txt($a_type . '_info_agree'));
$agreement->setValue(1);
$form->addItem($agreement);
return $form;
}