当前位置: 首页>>代码示例>>PHP>>正文


PHP ilPropertyFormGUI::setDescription方法代码示例

本文整理汇总了PHP中ilPropertyFormGUI::setDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setDescription方法的具体用法?PHP ilPropertyFormGUI::setDescription怎么用?PHP ilPropertyFormGUI::setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilPropertyFormGUI的用法示例。


在下文中一共展示了ilPropertyFormGUI::setDescription方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: configure

 /**
  * Configuration gui.
  */
 function configure()
 {
     global $tpl;
     $pl = $this->getPluginObject();
     $form = new ilPropertyFormGUI();
     $form->setTitle($pl->txt('roomsharing_plugin_configuration'));
     $form->setDescription($pl->txt('roomsharing_plugin_config_not_required'));
     $tpl->setContent($form->getHTML());
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:12,代码来源:class.ilRoomSharingConfigGUI.php

示例2: showPasswordFormCmd

 private function showPasswordFormCmd()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     require_once 'Services/Form/classes/class.ilPasswordInputGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt("tst_password_form"));
     $form->setDescription($this->lng->txt("tst_password_introduction"));
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->addCommandButton(self::CMD_SAVE_ENTERED_PASSWORD, $this->lng->txt("submit"));
     $form->addCommandButton(self::CMD_BACK_TO_INFO_SCREEN, $this->lng->txt("cancel"));
     $inp = new ilPasswordInputGUI($this->lng->txt("tst_password"), 'password');
     $inp->setRequired(true);
     $inp->setRetype(false);
     $form->addItem($inp);
     $this->tpl->setVariable($this->parentGUI->getContentBlockName(), $this->ctrl->getHTML($form));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilTestPasswordProtectionGUI.php

示例3: initNewAccountMailForm

 protected function initNewAccountMailForm()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule("meta");
     $lng->loadLanguageModule("mail");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitleIcon(ilUtil::getImagePath("icon_mail.png"));
     $form->setTitle($lng->txt("user_new_account_mail"));
     $form->setDescription($lng->txt("user_new_account_mail_desc"));
     $langs = $lng->getInstalledLanguages();
     foreach ($langs as $lang_key) {
         $amail = $this->object->_lookupNewAccountMail($lang_key);
         $title = $lng->txt("meta_l_" . $lang_key);
         if ($lang_key == $lng->getDefaultLanguage()) {
             $title .= " (" . $lng->txt("default") . ")";
         }
         $header = new ilFormSectionHeaderGUI();
         $header->setTitle($title);
         $form->addItem($header);
         $subj = new ilTextInputGUI($lng->txt("subject"), "subject_" . $lang_key);
         // $subj->setRequired(true);
         $subj->setValue($amail["subject"]);
         $form->addItem($subj);
         $salg = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_" . $lang_key);
         // $salg->setRequired(true);
         $salg->setValue($amail["sal_g"]);
         $form->addItem($salg);
         $salf = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_" . $lang_key);
         // $salf->setRequired(true);
         $salf->setValue($amail["sal_f"]);
         $form->addItem($salf);
         $salm = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_" . $lang_key);
         // $salm->setRequired(true);
         $salm->setValue($amail["sal_m"]);
         $form->addItem($salm);
         $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_" . $lang_key);
         // $body->setRequired(true);
         $body->setValue($amail["body"]);
         $body->setRows(10);
         $body->setCols(100);
         $form->addItem($body);
         $att = new ilFileInputGUI($lng->txt("attachment"), "att_" . $lang_key);
         $att->setAllowDeletion(true);
         if ($amail["att_file"]) {
             $att->setValue($amail["att_file"]);
         }
         $form->addItem($att);
     }
     $form->addCommandButton("saveNewAccountMail", $lng->txt("save"));
     $form->addCommandButton("cancelNewAccountMail", $lng->txt("cancel"));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:54,代码来源:class.ilObjUserFolderGUI.php

示例4: editSOAPObject

 /**
  * Configure soap settings
  * 
  * @access	public
  */
 function editSOAPObject()
 {
     global $rbacsystem, $rbacreview, $ilSetting, $ilCtrl, $lng;
     if (!$rbacsystem->checkAccess("read", $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
     }
     $this->tabs_gui->setTabActive('auth_soap');
     //set Template
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.auth_soap.html', 'Services/Authentication');
     // compose role list
     $role_list = $rbacreview->getRolesByFilter(2, $this->object->getId());
     $roles = array();
     foreach ($role_list as $role) {
         $roles[$role['obj_id']] = $role['title'];
     }
     //set property form gui
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $soap_config = new ilPropertyFormGUI();
     $soap_config->setTitle($this->lng->txt("auth_soap_auth"));
     $soap_config->setDescription($this->lng->txt("auth_soap_auth_desc"));
     $soap_config->setFormAction($this->ctrl->getFormAction($this, "editSOAP"));
     $soap_config->addCommandButton("saveSOAP", $this->lng->txt("save"));
     $soap_config->addCommandButton("editSOAP", $this->lng->txt("cancel"));
     //set activ
     $active = new ilCheckboxInputGUI();
     $active->setTitle($this->lng->txt("active"));
     $active->setPostVar("soap[active]");
     //set server
     $server = new ilTextInputGUI();
     $server->setTitle($this->lng->txt("server"));
     $server->setInfo($this->lng->txt("auth_soap_server_desc"));
     $server->setPostVar("soap[server]");
     $server->setSize(50);
     $server->setMaxLength(256);
     $server->setRequired(true);
     //set port
     $port = new ilTextInputGUI();
     $port->setTitle($this->lng->txt("port"));
     $port->setInfo($this->lng->txt("auth_soap_port_desc"));
     $port->setPostVar("soap[port]");
     $port->setSize(7);
     $port->setMaxLength(5);
     //set https
     $https = new ilCheckboxInputGUI();
     $https->setTitle($this->lng->txt("auth_soap_use_https"));
     $https->setPostVar("soap[use_https]");
     //set uri
     $uri = new ilTextInputGUI();
     $uri->setTitle($this->lng->txt("uri"));
     $uri->setInfo($this->lng->txt("auth_soap_uri_desc"));
     $uri->setPostVar("soap[uri]");
     $uri->setSize(50);
     $uri->setMaxLength(256);
     //set namespace
     $namespace = new ilTextInputGUI();
     $namespace->setTitle($this->lng->txt("auth_soap_namespace"));
     $namespace->setInfo($this->lng->txt("auth_soap_namespace_desc"));
     $namespace->setPostVar("soap[namespace]");
     $namespace->setSize(50);
     $namespace->setMaxLength(256);
     //set dotnet
     $dotnet = new ilCheckboxInputGUI();
     $dotnet->setTitle($this->lng->txt("auth_soap_use_dotnet"));
     $dotnet->setPostVar("soap[use_dotnet]");
     //set create users
     $createuser = new ilCheckboxInputGUI();
     $createuser->setTitle($this->lng->txt("auth_create_users"));
     $createuser->setInfo($this->lng->txt("auth_soap_create_users_desc"));
     $createuser->setPostVar("soap[create_users]");
     //set account mail
     $sendmail = new ilCheckboxInputGUI();
     $sendmail->setTitle($this->lng->txt("user_send_new_account_mail"));
     $sendmail->setInfo($this->lng->txt("auth_new_account_mail_desc"));
     $sendmail->setPostVar("soap[account_mail]");
     //set user default role
     $defaultrole = new ilSelectInputGUI();
     $defaultrole->setTitle($this->lng->txt("auth_user_default_role"));
     $defaultrole->setInfo($this->lng->txt("auth_soap_user_default_role_desc"));
     $defaultrole->setPostVar("soap[user_default_role]");
     $defaultrole->setOptions($roles);
     //set allow local authentication
     $allowlocal = new ilCheckboxInputGUI();
     $allowlocal->setTitle($this->lng->txt("auth_allow_local"));
     $allowlocal->setInfo($this->lng->txt("auth_soap_allow_local_desc"));
     $allowlocal->setPostVar("soap[allow_local]");
     // get all settings
     $settings = $ilSetting->getAll();
     // get values in error case
     if ($_SESSION["error_post_vars"]) {
         $active->setChecked($_SESSION["error_post_vars"]["soap"]["active"]);
         $server->setValue($_SESSION["error_post_vars"]["soap"]["server"]);
         $port->setValue($_SESSION["error_post_vars"]["soap"]["port"]);
         $https->setChecked($_SESSION["error_post_vars"]["soap"]["use_https"]);
         $uri->setValue($_SESSION["error_post_vars"]["soap"]["uri"]);
         $namespace->setValue($_SESSION["error_post_vars"]["soap"]["namespace"]);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjAuthSettingsGUI.php

示例5: buildform

 /**
  * @param $tpl
  */
 function buildform($tpl)
 {
     require_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setTitle("Mitglieder einschreiben");
     $form->setDescription("Bitte geben Sie eine durch Kommata getrennte Liste von E-Mail-Adressen an.");
     require_once "Services/Form/classes/class.ilTextAreaInputGUI.php";
     $textarea = new ilTextAreaInputGUI('E-Mail-Adresse', 'emails');
     $textarea->setRequired(true);
     $textarea->setRows(20);
     $form->addItem($textarea);
     //$form->addCommandButton('TODO', 'Speichern');
     $this->ctrl->saveParameter($this, 'ref_id');
     $form->addCommandButton('save', 'Speichern');
     $form->setFormAction($this->ctrl->getFormAction($this));
     return $form;
 }
开发者ID:prante,项目名称:CoreEmailSubscription,代码行数:20,代码来源:class.ilCourseEmailSubscriptionGUI.php

示例6: initForm

 /**
  * Init courses form
  *
  * @param bool $a_insert
  * @return ilPropertyFormGUI
  */
 protected function initForm($a_insert = false)
 {
     global $ilCtrl;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     if ($a_insert) {
         $form->setTitle($this->lng->txt("cont_insert_amd_page_list"));
     } else {
         $form->setTitle($this->lng->txt("cont_update_amd_page_list"));
     }
     $form->setDescription($this->lng->txt("wiki_page_list_form_info"));
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_SEARCH, 'wiki', $this->getPage()->getWikiId(), 'wpg', $this->getPage()->getId());
     $this->record_gui->setPropertyForm($form);
     $this->record_gui->setSelectedOnly(true);
     if (!$a_insert) {
         $this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
     }
     $this->record_gui->parse();
     if ($a_insert) {
         $form->addCommandButton("create_amd_page_list", $this->lng->txt("select"));
         $form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
     } else {
         $form->addCommandButton("update", $this->lng->txt("select"));
         $form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
     }
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilPCAMDPageListGUI.php

示例7: initEditUserForm

 protected function initEditUserForm($a_user_id, $a_obj_id, $a_cancel = null)
 {
     global $lng, $ilCtrl;
     include_once 'Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($a_obj_id);
     $lp_mode = $olp->getCurrentMode();
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this, "updateUser"));
     $form->setTitle($lng->txt("edit") . ": " . ilObject::_lookupTitle($a_obj_id));
     $form->setDescription($lng->txt('trac_mode') . ": " . $olp->getModeText($lp_mode));
     include_once "Services/User/classes/class.ilUserUtil.php";
     $user = new ilNonEditableValueGUI($lng->txt("user"), null, true);
     $user->setValue(ilUserUtil::getNamePresentation($a_user_id, true));
     $form->addItem($user);
     include_once 'Services/Tracking/classes/class.ilLPMarks.php';
     $marks = new ilLPMarks($a_obj_id, $a_user_id);
     $type = ilObject::_lookupType($a_obj_id);
     if ($type != 'lm') {
         $mark = new ilTextInputGUI($lng->txt("trac_mark"), "mark");
         $mark->setValue($marks->getMark());
         $mark->setMaxLength(32);
         $form->addItem($mark);
     }
     $comm = new ilTextInputGUI($lng->txt("trac_comment"), "comment");
     $comm->setValue($marks->getComment());
     $form->addItem($comm);
     if ($lp_mode == ilLPObjSettings::LP_MODE_MANUAL || $lp_mode == ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR) {
         include_once "./Services/Tracking/classes/class.ilLPStatus.php";
         $completed = ilLPStatus::_lookupStatus($a_obj_id, $a_user_id);
         $status = new ilCheckboxInputGUI($lng->txt('trac_completed'), "completed");
         $status->setChecked($completed == ilLPStatus::LP_STATUS_COMPLETED_NUM);
         $form->addItem($status);
     }
     $form->addCommandButton("updateUser", $lng->txt('save'));
     if ($a_cancel) {
         $form->addCommandButton($a_cancel, $lng->txt('cancel'));
     }
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:40,代码来源:class.ilLearningProgressBaseGUI.php

示例8: showtlt

 protected function showtlt()
 {
     global $lng, $ilCtrl, $tpl, $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this, "showtlt"));
     $form->setTitle($lng->txt("learning_progress"));
     $form->setDescription($lng->txt("trac_collection_tlt_learner_info"));
     $coll_items = array();
     include_once './Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($this->getObjId());
     $collection = $olp->getCollectionInstance();
     if ($collection) {
         $coll_items = $collection->getItems();
         $possible_items = $collection->getPossibleItems($this->getRefId());
         // for titles
     }
     include_once "Services/Tracking/classes/class.ilLPStatusFactory.php";
     $class = ilLPStatusFactory::_getClassById($this->getObjId(), ilLPObjSettings::LP_MODE_COLLECTION_TLT);
     $info = $class::_getStatusInfo($this->getObjId(), true);
     foreach ($coll_items as $item_id) {
         $field = new ilCustomInputGUI($possible_items[$item_id]["title"]);
         // lp status
         $status = ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM;
         if (isset($info["completed"][$item_id]) && in_array($ilUser->getId(), $info["completed"][$item_id])) {
             $status = ilLPStatus::LP_STATUS_COMPLETED_NUM;
         } else {
             if (isset($info["in_progress"][$item_id]) && in_array($ilUser->getId(), $info["in_progress"][$item_id])) {
                 $status = ilLPStatus::LP_STATUS_IN_PROGRESS_NUM;
             }
         }
         $path = ilLearningProgressBaseGUI::_getImagePathForStatus($status);
         $text = ilLearningProgressBaseGUI::_getStatusText($status);
         $field->setHtml(ilUtil::img($path, $text));
         // stats
         $spent = 0;
         if (isset($info["tlt_users"][$item_id][$ilUser->getId()])) {
             $spent = $info["tlt_users"][$item_id][$ilUser->getId()];
         }
         $needed = $info["tlt"][$item_id];
         if ($needed) {
             $field->setInfo(sprintf($lng->txt("trac_collection_tlt_learner_subitem"), ilFormat::_secondsToString($spent), ilFormat::_secondsToString($needed), min(100, round(abs($spent) / $needed * 100))));
         }
         $form->addItem($field);
     }
     $tpl->setContent($form->getHTML());
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:47,代码来源:class.ilLearningProgressGUI.php

示例9: buildForm

 /**
  * @return ilPropertyFormGUI
  */
 protected function buildForm()
 {
     require_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setTitle("Mitgliedern Einschreiben");
     $form->setDescription("Bitte geben Sie eine Liste von Emails aus.");
     require_once "Services/Form/classes/class.ilTextAreaInputGUI.php";
     $textarea = new ilTextAreaInputGUI('E-mail Addresse', 'emails');
     $textarea->setRequired(true);
     $textarea->setRows(20);
     $form->addItem($textarea);
     $this->ctrl->saveParameter($this, 'ref_id');
     $form->addCommandButton('save', 'Speichern');
     $form->setFormAction($this->ctrl->getFormAction($this));
     return $form;
 }
开发者ID:any333,项目名称:courseEmailsSubscriptionPlugin,代码行数:19,代码来源:class.ilCourseEmailSubscriptionGUI.php

示例10: randomQuestionsObject

 function randomQuestionsObject()
 {
     global $ilUser;
     $total = $this->object->evalTotalPersons();
     $save = strcmp($this->ctrl->getCmd(), "saveRandomQuestions") == 0 ? TRUE : FALSE;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, 'randomQuestions'));
     $form->setTitle($this->lng->txt('random_selection'));
     $form->setDescription($this->lng->txt('tst_select_random_questions'));
     $form->setMultipart(FALSE);
     $form->setTableWidth("100%");
     $form->setId("randomSelectionForm");
     // question selection
     $selection_mode = $save ? $_POST['chbQuestionSelectionMode'] : $ilUser->getPref("tst_question_selection_mode_equal");
     $question_selection = new ilCheckboxInputGUI($this->lng->txt("tst_question_selection"), "chbQuestionSelectionMode");
     $question_selection->setValue(1);
     $question_selection->setChecked($selection_mode);
     $question_selection->setOptionTitle($this->lng->txt('tst_question_selection_equal'));
     $question_selection->setInfo($this->lng->txt('tst_question_selection_description'));
     $question_selection->setRequired(false);
     $form->addItem($question_selection);
     // total amount of questions
     $total_questions = new ilNumberInputGUI($this->lng->txt('tst_total_questions'), 'total_questions');
     $total_questions->setValue($this->object->getRandomQuestionCount());
     $total_questions->setSize(3);
     $total_questions->setInfo($this->lng->txt('tst_total_questions_description'));
     $total_questions->setRequired(false);
     $form->addItem($total_questions);
     if ($total == 0) {
         $found_qpls = $this->object->getRandomQuestionpoolData();
         include_once "./Modules/Test/classes/class.ilRandomTestData.php";
         if (count($found_qpls) == 0) {
             array_push($found_qpls, new ilRandomTestData());
         }
         $available_qpl =& $this->object->getAvailableQuestionpools(TRUE, $selection_mode, FALSE, TRUE, TRUE);
         include_once './Modules/Test/classes/class.ilRandomTestInputGUI.php';
         $source = new ilRandomTestInputGUI($this->lng->txt('tst_random_questionpools'), 'source');
         $source->setUseEqualPointsOnly($selection_mode);
         $source->setRandomQuestionPools($available_qpl);
         $source->setUseQuestionCount(array_key_exists('total_questions', $_POST) ? $_POST['total_questions'] < 1 : $this->object->getRandomQuestionCount() < 1);
         $source->setValues($found_qpls);
         $form->addItem($source);
     } else {
         $qpls = $this->object->getUsedRandomQuestionpools();
         include_once './Modules/Test/classes/class.ilRandomTestROInputGUI.php';
         $source = new ilRandomTestROInputGUI($this->lng->txt('tst_random_questionpools'), 'source');
         $source->setValues($qpls);
         $form->addItem($source);
     }
     if ($total == 0) {
         $form->addCommandButton("saveRandomQuestions", $this->lng->txt("save"));
     }
     $errors = false;
     if ($save) {
         $form->setValuesByPost();
         $errors = !$form->checkInput();
         if (!$errors) {
             // check total amount of questions
             if ($_POST['total_questions'] > 0) {
                 $totalcount = 0;
                 foreach ($_POST['source']['qpl'] as $idx => $qpl) {
                     $totalcount += $available_qpl[$qpl]['count'];
                 }
                 if ($_POST['total_questions'] > $totalcount) {
                     $total_questions->setAlert($this->lng->txt('msg_total_questions_too_high'));
                     $errors = true;
                 }
             }
         }
         if ($errors) {
             $checkonly = false;
         }
     }
     if (!$checkonly) {
         $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
     }
     return $errors;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:79,代码来源:class.ilObjTestGUI.php

示例11: initBookingNumbersForm

 protected function initBookingNumbersForm(array $a_objects_counter, $a_group_id)
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "confirmedBooking"));
     $form->setTitle($this->lng->txt("book_confirm_booking_schedule_number_of_objects"));
     $form->setDescription($this->lng->txt("book_confirm_booking_schedule_number_of_objects_info"));
     include_once 'Modules/BookingManager/classes/class.ilBookingObject.php';
     $section = false;
     foreach ($a_objects_counter as $id => $counter) {
         $id = explode("_", $id);
         $book_id = $id[0] . "_" . $id[1] . "_" . $id[2] . "_" . $counter;
         $obj = new ilBookingObject($id[0]);
         if (!$section) {
             $section = new ilFormSectionHeaderGUI();
             $section->setTitle($obj->getTitle());
             $form->addItem($section);
             $section = true;
         }
         $period = ilDatePresentation::formatPeriod(new ilDateTime($id[1], IL_CAL_UNIX), new ilDateTime($id[2], IL_CAL_UNIX));
         $nr_field = new ilNumberInputGUI($period, "conf_nr__" . $book_id);
         $nr_field->setValue(1);
         $nr_field->setSize(3);
         $nr_field->setMaxValue($counter);
         $nr_field->setMinValue(1);
         $nr_field->setRequired(true);
         $form->addItem($nr_field);
     }
     if ($a_group_id) {
         $grp = new ilHiddenInputGUI("grp_id");
         $grp->setValue($a_group_id);
         $form->addItem($grp);
     }
     $form->addCommandButton("confirmedBookingNumbers", $this->lng->txt("confirm"));
     $form->addCommandButton("render", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:37,代码来源:class.ilObjBookingPoolGUI.php

示例12: initBookingNumbersForm

 protected function initBookingNumbersForm(array $a_objects_counter, $a_group_id, $a_reload = false)
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "confirmedBooking"));
     $form->setTitle($this->lng->txt("book_confirm_booking_schedule_number_of_objects"));
     $form->setDescription($this->lng->txt("book_confirm_booking_schedule_number_of_objects_info"));
     include_once 'Modules/BookingManager/classes/class.ilBookingObject.php';
     $section = false;
     $min_date = null;
     foreach ($a_objects_counter as $id => $counter) {
         $id = explode("_", $id);
         $book_id = $id[0] . "_" . $id[1] . "_" . $id[2] . "_" . $counter;
         $obj = new ilBookingObject($id[0]);
         if (!$section) {
             $section = new ilFormSectionHeaderGUI();
             $section->setTitle($obj->getTitle());
             $form->addItem($section);
             $section = true;
         }
         $period = ilDatePresentation::formatPeriod(new ilDateTime($id[1], IL_CAL_UNIX), new ilDateTime($id[2], IL_CAL_UNIX));
         $nr_field = new ilNumberInputGUI($period, "conf_nr__" . $book_id);
         $nr_field->setValue(1);
         $nr_field->setSize(3);
         $nr_field->setMaxValue($counter);
         $nr_field->setMinValue($counter ? 1 : 0);
         $nr_field->setRequired(true);
         $form->addItem($nr_field);
         if (!$min_date || $id[1] < $min_date) {
             $min_date = $id[1];
         }
     }
     // recurrence
     $this->lng->loadLanguageModule("dateplaner");
     $rec_mode = new ilSelectInputGUI($this->lng->txt("cal_recurrences"), "recm");
     $rec_mode->setRequired(true);
     $rec_mode->setOptions(array("-1" => $this->lng->txt("cal_no_recurrence"), 1 => $this->lng->txt("cal_weekly"), 2 => $this->lng->txt("r_14"), 4 => $this->lng->txt("r_4_weeks")));
     $form->addItem($rec_mode);
     $rec_end = new ilDateTimeInputGUI($this->lng->txt("cal_repeat_until"), "rece");
     $rec_mode->addSubItem($rec_end);
     if (!$a_reload) {
         // show date only if active recurrence
         $rec_mode->setHideSubForm(true, '>= 1');
         if ($min_date) {
             $rec_end->setDate(new ilDateTime($min_date, IL_CAL_UNIX));
         }
     } else {
         // recurrence may not be changed on reload
         $rec_mode->setDisabled(true);
         $rec_end->setDisabled(true);
     }
     if ($a_group_id) {
         $grp = new ilHiddenInputGUI("grp_id");
         $grp->setValue($a_group_id);
         $form->addItem($grp);
     }
     $form->addCommandButton("confirmedBookingNumbers", $this->lng->txt("confirm"));
     $form->addCommandButton("render", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:60,代码来源:class.ilObjBookingPoolGUI.php

示例13: initFormSettings

 /**
  * Init cas settings
  */
 protected function initFormSettings()
 {
     $this->lng->loadLanguageModule('auth');
     $this->lng->loadLanguageModule('radius');
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt('auth_cas_auth'));
     $form->setDescription($this->lng->txt("auth_cas_auth_desc"));
     // Form checkbox
     $check = new ilCheckboxInputGUI($this->lng->txt("active"), 'active');
     $check->setChecked($this->getSettings()->isActive() ? true : false);
     $check->setValue(1);
     $form->addItem($check);
     $text = new ilTextInputGUI($this->lng->txt('server'), 'server');
     $text->setValue($this->getSettings()->getServer());
     $text->setRequired(true);
     $text->setInfo($this->lng->txt('auth_cas_server_desc'));
     $text->setSize(64);
     $text->setMaxLength(255);
     $form->addItem($text);
     $port = new ilNumberInputGUI($this->lng->txt("port"), 'port');
     $port->setValue($this->getSettings()->getPort());
     $port->setRequired(true);
     $port->setMinValue(0);
     $port->setMaxValue(65535);
     $port->setSize(5);
     $port->setMaxLength(5);
     $port->setInfo($this->lng->txt('auth_cas_port_desc'));
     $form->addItem($port);
     $text = new ilTextInputGUI($this->lng->txt('uri'), 'uri');
     $text->setValue($this->getSettings()->getUri());
     $text->setRequired(true);
     $text->setInfo($this->lng->txt('auth_cas_uri_desc'));
     $text->setSize(64);
     $text->setMaxLength(255);
     $form->addItem($text);
     // User synchronization
     // 0: Disabled
     // 1: CAS
     // 2: LDAP
     $sync = new ilRadioGroupInputGUI($this->lng->txt('auth_sync'), 'sync');
     $sync->setRequired(true);
     #$sync->setInfo($this->lng->txt('auth_radius_sync_info'));
     $form->addItem($sync);
     // Disabled
     $dis = new ilRadioOption($this->lng->txt('disabled'), self::SYNC_DISABLED, '');
     #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info'));
     $sync->addOption($dis);
     // CAS
     $rad = new ilRadioOption($this->lng->txt('auth_sync_cas'), self::SYNC_CAS, '');
     $rad->setInfo($this->lng->txt('auth_sync_cas_info'));
     $sync->addOption($rad);
     $select = new ilSelectInputGUI($this->lng->txt('auth_user_default_role'), 'role');
     $select->setOptions($this->prepareRoleSelection());
     $select->setValue($this->getSettings()->getDefaultRole());
     $rad->addSubItem($select);
     // LDAP
     include_once './Services/LDAP/classes/class.ilLDAPServer.php';
     $server_ids = ilLDAPServer::getAvailableDataSources(AUTH_CAS);
     if (count($server_ids)) {
         $ldap = new ilRadioOption($this->lng->txt('auth_radius_ldap'), self::SYNC_LDAP, '');
         $ldap->setInfo($this->lng->txt('auth_radius_ldap_info'));
         $sync->addOption($ldap);
         // TODO Handle more than one LDAP configuration
     }
     if (ilLDAPServer::isDataSourceActive(AUTH_CAS)) {
         $sync->setValue(self::SYNC_LDAP);
     } else {
         $sync->setValue($this->getSettings()->isUserCreationEnabled() ? ilCASSettings::SYNC_CAS : ilCASSettings::SYNC_DISABLED);
     }
     $instruction = new ilTextAreaInputGUI($this->lng->txt('auth_login_instructions'), 'instruction');
     $instruction->setCols(80);
     $instruction->setRows(6);
     $instruction->setValue($this->getSettings()->getLoginInstruction());
     $form->addItem($instruction);
     $create = new ilCheckboxInputGUI($this->lng->txt('auth_allow_local'), 'local');
     $create->setInfo($this->lng->txt('auth_cas_allow_local_desc'));
     $create->setChecked($this->getSettings()->isLocalAuthenticationEnabled() ? true : false);
     $create->setValue(1);
     $form->addItem($create);
     $form->addCommandButton('save', $this->lng->txt('save'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:87,代码来源:class.ilCASSettingsGUI.php


注:本文中的ilPropertyFormGUI::setDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。