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


PHP ilTextInputGUI::setDataSource方法代码示例

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


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

示例1: showTrustees

 public function showTrustees($a_show_delete = false)
 {
     global $ilToolbar;
     $_SESSION['paya_delete_trustee'] = $_SESSION['paya_delete_trustee'] ? $_SESSION['paya_delete_trustee'] : array();
     $actions = array(0 => $this->lng->txt("paya_disabled"), 1 => $this->lng->txt("paya_enabled"));
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $ul = new ilTextInputGUI($this->lng->txt("user"), "search_str");
     $ul->setDataSource($this->ctrl->getLinkTarget($this, "performSearch", "", true));
     $ul->setSize(20);
     $ilToolbar->addInputItem($ul, true);
     $ilToolbar->addFormButton($this->lng->txt("add"), "performSearch");
     $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     if ($a_show_delete) {
         $oConfirmationGUI = new ilConfirmationGUI();
         // set confirm/cancel commands
         $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, "performDeleteTrustee"));
         $oConfirmationGUI->setHeaderText($this->lng->txt("paya_sure_delete_selected_trustees"));
         $oConfirmationGUI->setCancel($this->lng->txt("cancel"), "cancelDelete");
         $oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "performDeleteTrustee");
         foreach ($this->trustee_obj->getTrustees() as $trustee) {
             $delete_row = '';
             if (in_array($trustee['trustee_id'], $_POST['trustee'])) {
                 if ($tmp_obj = ilObjectFactory::getInstanceByObjId($trustee['trustee_id'], false)) {
                     $delete_row = $tmp_obj->getLogin() . ' -> ' . $tmp_obj->getFirstname() . ' ' . $tmp_obj->getLastname();
                 }
             }
             $oConfirmationGUI->addItem('', $delete_row, $delete_row);
         }
         $this->tpl->setVariable("CONFIRMATION", $oConfirmationGUI->getHTML());
     }
     if (!count($this->trustee_obj->getTrustees())) {
         ilUtil::sendInfo($this->lng->txt('paya_no_trustees'));
         return true;
     }
     $counter = 0;
     $f_result = array();
     require_once 'Services/Mail/classes/class.ilMailFormCall.php';
     foreach ($this->trustee_obj->getTrustees() as $trustee) {
         // GET USER OBJ
         if ($tmp_obj = ilObjectFactory::getInstanceByObjId($trustee['trustee_id'], false)) {
             $f_result[$counter]['trustee_id'] = ilUtil::formCheckbox(in_array($trustee['trustee_id'], $_SESSION['paya_delete_trustee']) ? 1 : 0, "trustee[]", $trustee['trustee_id']);
             $f_result[$counter]['login'] = $tmp_obj->getLogin();
             $f_result[$counter]['firstname'] = $tmp_obj->getFirstname();
             $f_result[$counter]['lastname'] = $tmp_obj->getLastname();
             $f_result[$counter]['perm_stat'] = ilUtil::formSelect((int) $trustee['perm_stat'], 'perm_stat[' . $trustee['trustee_id'] . ']', $actions, false, true);
             $f_result[$counter]['perm_obj'] = ilUtil::formSelect((int) $trustee['perm_obj'], 'perm_obj[' . $trustee['trustee_id'] . ']', $actions, false, true);
             $f_result[$counter]['perm_coupons'] = ilUtil::formSelect((int) $trustee['perm_coupons'], 'perm_coupons[' . $trustee['trustee_id'] . ']', $actions, false, true);
             #				$link_mail = "<a target=\"_blank\" href=\"./ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".
             #					$tmp_obj->getLogin()."\"".$img_mail."</a>";
             $url_mail = ilMailFormCall::getLinkTarget($this, '', array(), array('type' => 'new', 'rcp_to' => $tmp_obj->getLogin()));
             $link_mail = "<div class=\"il_ContainerItemCommands\"><a class=\"il_ContainerItemCommand\" href=\"" . $url_mail . "\">" . $this->lng->txt("mail") . "</a></div>";
             $f_result[$counter]['options'] = $link_mail;
             unset($tmp_obj);
             ++$counter;
         }
     }
     return $this->__showTrusteesTable($f_result);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:59,代码来源:class.ilPaymentTrusteeGUI.php

示例2: owner

 function owner()
 {
     $this->__initSubTabs("owner");
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "owner"));
     $form->setTitle($this->lng->txt("info_owner_of_object"));
     $login = new ilTextInputGUI($this->lng->txt("login"), "owner");
     $login->setDataSource($this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilRepositorySearchGUI'), 'doUserAutoComplete', '', true));
     $login->setRequired(true);
     $login->setSize(50);
     $login->setInfo($this->lng->txt("chown_warning"));
     $login->setValue(ilObjUser::_lookupLogin($this->gui_obj->object->getOwner()));
     $form->addItem($login);
     $form->addCommandButton("changeOwner", $this->lng->txt("change_owner"));
     $this->tpl->setContent($form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilPermission2GUI.php

示例3: initKeywordsForm

 protected function initKeywordsForm()
 {
     global $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "saveKeywordsForm"));
     $form->setTitle($this->lng->txt("blog_edit_keywords"));
     $txt = new ilTextInputGUI($this->lng->txt("blog_keywords"), "keywords");
     // $txt->setRequired(true); #10504
     $txt->setMulti(true);
     $txt->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
     $txt->setMaxLength(200);
     $txt->setSize(50);
     $txt->setInfo($this->lng->txt("blog_keywords_info"));
     $form->addItem($txt);
     $md_section = $this->getBlogPosting()->getMDSection();
     $keywords = array();
     foreach ($ids = $md_section->getKeywordIds() as $id) {
         $md_key = $md_section->getKeyword($id);
         if (trim($md_key->getKeyword()) != "") {
             $keywords[$md_key->getKeywordLanguageCode()][] = $md_key->getKeyword();
         }
     }
     // language is not "used" anywhere
     $ulang = $ilUser->getLanguage();
     if ($keywords[$ulang]) {
         asort($keywords[$ulang]);
         $txt->setValue($keywords[$ulang]);
     }
     $form->addCommandButton("saveKeywordsForm", $this->lng->txt("save"));
     $form->addCommandButton("preview", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:33,代码来源:class.ilBlogPostingGUI.php

示例4: addStandardFieldsToForm


//.........这里部分代码省略.........
                     $ta = new ilTextAreaInputGUI($lng->txt($lv), "usr_" . $f);
                     if ($a_user) {
                         $ta->setValue($a_user->{$m}());
                     }
                     $ta->setRows($p["rows"]);
                     $ta->setCols($p["cols"]);
                     $ta->setRequired($ilSetting->get("require_" . $f));
                     if (!$ta->getRequired() || $ta->getValue()) {
                         $ta->setDisabled($ilSetting->get("usr_settings_disable_" . $f));
                     }
                     $a_form->addItem($ta);
                 }
                 break;
             case "messenger":
                 if (ilUserProfile::userSettingVisible("instant_messengers")) {
                     $im_arr = $p["types"];
                     foreach ($im_arr as $im_name) {
                         $im = new ilTextInputGUI($lng->txt("im_" . $im_name), "usr_im_" . $im_name);
                         if ($a_user) {
                             $im->setValue($a_user->getInstantMessengerId($im_name));
                         }
                         $im->setMaxLength($p["maxlength"]);
                         $im->setSize($p["size"]);
                         $im->setRequired($ilSetting->get("require_" . "instant_messengers"));
                         if (!$im->getRequired() || $im->getValue()) {
                             $im->setDisabled($ilSetting->get("usr_settings_disable_" . "instant_messengers"));
                         }
                         $a_form->addItem($im);
                     }
                 }
                 break;
             case "password":
                 if (self::$mode == self::MODE_REGISTRATION) {
                     if (!$registration_settings->passwordGenerationEnabled()) {
                         $ta = new ilPasswordInputGUI($lng->txt($lv), "usr_" . $f);
                         $ta->setRequired(true);
                         // $ta->setDisabled($ilSetting->get("usr_settings_disable_".$f));
                     } else {
                         $ta = new ilNonEditableValueGUI($lng->txt($lv));
                         $ta->setValue($lng->txt("reg_passwd_via_mail"));
                     }
                     $a_form->addItem($ta);
                 }
                 break;
             case "language":
                 if (ilUserProfile::userSettingVisible($f)) {
                     $ta = new ilSelectInputGUI($lng->txt($lv), "usr_" . $f);
                     if ($a_user) {
                         $ta->setValue($a_user->{$m}());
                     }
                     $options = array();
                     $lng->loadLanguageModule("meta");
                     foreach ($lng->getInstalledLanguages() as $lang_key) {
                         $options[$lang_key] = $lng->txt("meta_l_" . $lang_key);
                     }
                     asort($options);
                     // #9728
                     $ta->setOptions($options);
                     $ta->setRequired($ilSetting->get("require_" . $f));
                     if (!$ta->getRequired() || $ta->getValue()) {
                         $ta->setDisabled($ilSetting->get("usr_settings_disable_" . $f));
                     }
                     $a_form->addItem($ta);
                 }
                 break;
             case "multitext":
                 if (ilUserProfile::userSettingVisible($f)) {
                     $ti = new ilTextInputGUI($lng->txt($lv), "usr_" . $f);
                     $ti->setMulti(true);
                     if ($a_user) {
                         $ti->setValue($a_user->{$m}());
                     }
                     $ti->setMaxLength($p["maxlength"]);
                     $ti->setSize($p["size"]);
                     $ti->setRequired($ilSetting->get("require_" . $f));
                     if (!$ti->getRequired() || $ti->getValue()) {
                         $ti->setDisabled($ilSetting->get("usr_settings_disable_" . $f));
                     }
                     if ($this->ajax_href) {
                         // add field to ajax call
                         $ti->setDataSource($this->ajax_href . "&f=" . $f);
                     }
                     $a_form->addItem($ti);
                 }
                 break;
         }
     }
     // append custom fields as "other"
     if (is_array($custom_fields) && !$custom_fields_done) {
         // add "other" subheader
         if ($current_group != "other") {
             $sh = new ilFormSectionHeaderGUI();
             $sh->setTitle($lng->txt("other"));
             $a_form->addItem($sh);
         }
         foreach ($custom_fields as $custom_field) {
             $a_form->addItem($custom_field);
         }
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilUserProfile.php

示例5: addToolbar

 /**
  * Creates Toolbar entries
  */
 function addToolbar()
 {
     global $ilToolbar;
     $ilToolbar->setFormAction($this->ilCtrl->getFormAction($this, "perminfo"));
     $ilToolbar->addText($this->lng->txt('user'));
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $login = new ilTextInputGUI($this->lng->txt("username"), "user_login");
     $login->setDataSource($this->ilCtrl->getLinkTargetByClass(array(get_class($this), 'ilRepositorySearchGUI'), 'doUserAutoComplete', '', true));
     $login->setSize(15);
     $login->setValue($this->user->getLogin());
     $ilToolbar->addInputItem($login);
     $ilToolbar->addFormButton($this->lng->txt("info_change_user_view"), "perminfo");
     //$ilToolbar->addText($lng->txt("info_enter_login_or_id"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilObjectPermissionStatusGUI.php

示例6: initFilter

 /**
  * 
  */
 public function initFilter()
 {
     /**
      * @var $tpl ilTemplate
      */
     global $tpl;
     include_once 'Services/Form/classes/class.ilTextInputGUI.php';
     $ul = new ilTextInputGUI($this->lng->txt('login') . '/' . $this->lng->txt('email') . '/' . $this->lng->txt('name'), 'query');
     $ul->setDataSource($this->ctrl->getLinkTarget($this->getParentObject(), 'addUserAutoComplete', '', true));
     $ul->setSize(20);
     $ul->setSubmitFormOnEnter(true);
     $this->addFilterItem($ul);
     $ul->readFromSession();
     $this->filter['query'] = $ul->getValue();
     include_once 'Services/Form/classes/class.ilSelectInputGUI.php';
     $options = array();
     $languages = ilObject::_getObjectsByType('lng');
     foreach ($languages as $lng) {
         $options[$lng['title']] = $this->lng->txt('meta_l_' . $lng['title']);
     }
     asort($options);
     $options = array('' => $this->lng->txt('any_language')) + $options;
     $si = new ilSelectInputGUI($this->lng->txt('language'), 'lng');
     $si->setOptions($options);
     $this->addFilterItem($si);
     $si->readFromSession();
     $this->filter['lng'] = $si->getValue();
     include_once 'Services/Form/classes/class.ilDateDurationInputGUI.php';
     $tpl->addJavaScript('./Services/Form/js/date_duration.js');
     $duration = new ilDateDurationInputGUI($this->lng->txt('tos_period'), 'period');
     $duration->setStartText($this->lng->txt('tos_period_from'));
     $duration->setEndText($this->lng->txt('tos_period_until'));
     $duration->setStart(new ilDateTime(strtotime('-1 year', time()), IL_CAL_UNIX));
     $duration->setEnd(new ilDateTime(time(), IL_CAL_UNIX));
     $duration->setShowTime(true);
     $this->addFilterItem($duration, true);
     $duration->readFromSession();
     $this->optional_filter['period'] = $duration->getValue();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:42,代码来源:class.ilTermsOfServiceAcceptanceHistoryTableGUI.php

示例7: showForm


//.........这里部分代码省略.........
             $_POST["additional_message_text"] = "";
             $_SESSION['mail_roles'] = "";
             break;
         case 'address':
             $mailData["rcp_to"] = urldecode($_GET["rcp"]);
             break;
         default:
             // GET DATA FROM POST
             $mailData = $_POST;
             // strip slashes
             foreach ($mailData as $key => $value) {
                 if (is_string($value)) {
                     // Note: For security reasons, ILIAS only allows Plain text strings in E-Mails.
                     $mailData[$key] = ilUtil::securePlainString($value);
                 }
             }
             break;
     }
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form_gui = new ilPropertyFormGUI();
     $form_gui->setTitle($this->lng->txt('compose'));
     $form_gui->setOpenTag(false);
     $this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, 'sendMessage'));
     $this->tpl->setVariable('BUTTON_TO', $lng->txt("search_recipients"));
     $this->tpl->setVariable('BUTTON_COURSES_TO', $lng->txt("mail_my_courses"));
     $this->tpl->setVariable('BUTTON_GROUPS_TO', $lng->txt("mail_my_groups"));
     $this->tpl->setVariable('BUTTON_MAILING_LISTS_TO', $lng->txt("mail_my_mailing_lists"));
     $dsDataLink = $ilCtrl->getLinkTarget($this, 'lookupRecipientAsync', '', true);
     // RECIPIENT
     $inp = new ilTextInputGUI($this->lng->txt('mail_to'), 'rcp_to');
     $inp->setRequired(true);
     $inp->setSize(50);
     $inp->setValue($mailData["rcp_to"]);
     $inp->setDataSource($dsDataLink, ",");
     $inp->setMaxLength(null);
     $form_gui->addItem($inp);
     // CC
     $inp = new ilTextInputGUI($this->lng->txt('cc'), 'rcp_cc');
     $inp->setSize(50);
     $inp->setValue($mailData["rcp_cc"]);
     $inp->setDataSource($dsDataLink, ",");
     $inp->setMaxLength(null);
     $form_gui->addItem($inp);
     // BCC
     $inp = new ilTextInputGUI($this->lng->txt('bc'), 'rcp_bcc');
     $inp->setSize(50);
     $inp->setValue($mailData["rcp_bcc"]);
     $inp->setDataSource($dsDataLink, ",");
     $inp->setMaxLength(null);
     $form_gui->addItem($inp);
     // SUBJECT
     $inp = new ilTextInputGUI($this->lng->txt('subject'), 'm_subject');
     $inp->setSize(50);
     $inp->setRequired(true);
     $inp->setValue($mailData["m_subject"]);
     $form_gui->addItem($inp);
     // Attachments
     include_once 'Services/Mail/classes/class.ilMailFormAttachmentFormPropertyGUI.php';
     $att = new ilMailFormAttachmentPropertyGUI($this->lng->txt($mailData["attachments"] ? 'edit' : 'add'));
     if (is_array($mailData["attachments"]) && count($mailData["attachments"])) {
         foreach ($mailData["attachments"] as $data) {
             if (is_file($this->mfile->getMailPath() . '/' . $ilUser->getId() . "_" . $data)) {
                 $hidden = new ilHiddenInputGUI('attachments[]');
                 $form_gui->addItem($hidden);
                 $size = filesize($this->mfile->getMailPath() . '/' . $ilUser->getId() . "_" . $data);
                 $label = $data . " [" . ilFormat::formatSize($size) . "]";
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilMailFormGUI.php

示例8: createParticipantsMultiTextInput

 private function createParticipantsMultiTextInput()
 {
     $participants_input = new ilTextInputGUI($this->lng->txt("rep_robj_xrs_participants_list"), "participants");
     $participants_input->setMulti(true);
     $ajax_datasource = $this->ctrl->getLinkTarget($this, 'doUserAutoComplete', '', true);
     $participants_input->setDataSource($ajax_datasource);
     $participants_input->setInfo($this->getMaxRoomAllocationInfo());
     return $participants_input;
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:9,代码来源:class.ilRoomSharingBookGUI.php

示例9: initSearchForm

 protected function initSearchForm()
 {
     global $ilCtrl;
     if ($_GET["ref"] != "wsp") {
         $this->saveMailData();
         $title = $this->lng->txt('search_recipients');
     } else {
         $this->lng->loadLanguageModule("wsp");
         $title = $this->lng->txt("wsp_share_search_users");
     }
     // searchform
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($title);
     $form->setId('search_rcp');
     $form->setFormAction($ilCtrl->getFormAction($this, 'search'));
     $inp = new ilTextInputGUI($this->lng->txt("search_for"), 'search');
     $inp->setSize(30);
     $dsDataLink = $ilCtrl->getLinkTarget($this, 'lookupRecipientAsync', '', true, false);
     $inp->setDataSource($dsDataLink);
     if (strlen(trim($_SESSION["mail_search_search"])) > 0) {
         $inp->setValue(ilUtil::prepareFormOutput(trim($_SESSION["mail_search_search"]), true));
     }
     $form->addItem($inp);
     $form->addCommandButton('search', $this->lng->txt("search"));
     $form->addCommandButton('cancel', $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:28,代码来源:class.ilMailSearchGUI.php

示例10: initQuickEditForm

 /**
  * Init quick edit form.
  */
 public function initQuickEditForm()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "gen_title");
     $ti->setMaxLength(200);
     $ti->setSize(50);
     $ti->setRequired(true);
     $ti->setValue($this->md_section->getTitle());
     $this->form->addItem($ti);
     // description(s)
     foreach ($ids = $this->md_section->getDescriptionIds() as $id) {
         $md_des = $this->md_section->getDescription($id);
         $ta = new ilTextAreaInputGUI($this->lng->txt("meta_description"), "gen_description[" . $id . "][description]");
         $ta->setCols(50);
         $ta->setRows(4);
         $ta->setValue($md_des->getDescription());
         if (count($ids) > 1) {
             $ta->setInfo($this->lng->txt("meta_l_" . $md_des->getDescriptionLanguageCode()));
         }
         $this->form->addItem($ta);
     }
     // language(s)
     $first = "";
     $options = ilMDLanguageItem::_getLanguages();
     foreach ($ids = $this->md_section->getLanguageIds() as $id) {
         $md_lan = $this->md_section->getLanguage($id);
         $first_lang = $md_lan->getLanguageCode();
         $si = new ilSelectInputGUI($this->lng->txt("meta_language"), "gen_language[" . $id . "][language]");
         $si->setOptions($options);
         $si->setValue($md_lan->getLanguageCode());
         $this->form->addItem($si);
         $first = false;
     }
     if ($first) {
         $si = new ilSelectInputGUI($this->lng->txt("meta_language"), "gen_language[][language]");
         $si->setOptions($options);
         $this->form->addItem($si);
     }
     // keyword(s)
     $first = true;
     $keywords = array();
     foreach ($ids = $this->md_section->getKeywordIds() as $id) {
         $md_key = $this->md_section->getKeyword($id);
         if (trim($md_key->getKeyword()) != "") {
             $keywords[$md_key->getKeywordLanguageCode()][] = $md_key->getKeyword();
         }
     }
     foreach ($keywords as $lang => $keyword_set) {
         $kw = new ilTextInputGUI($this->lng->txt("keywords"), "keywords[value][" . $lang . "]");
         $kw->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
         $kw->setMaxLength(200);
         $kw->setSize(50);
         $kw->setMulti(true);
         if (count($keywords) > 1) {
             $kw->setInfo($this->lng->txt("meta_l_" . $lang));
         }
         $this->form->addItem($kw);
         asort($keyword_set);
         $kw->setValue($keyword_set);
     }
     if (count($keywords) == 0) {
         $kw = new ilTextInputGUI($this->lng->txt("keywords"), "keywords[value][" . $first_lang . "]");
         $kw->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
         $kw->setMaxLength(200);
         $kw->setSize(50);
         $kw->setMulti(true);
         $this->form->addItem($kw);
     }
     // Lifecycle...
     // Authors
     $ta = new ilTextAreaInputGUI($this->lng->txt('authors') . "<br />" . "(" . sprintf($this->lng->txt('md_separated_by'), $this->md_settings->getDelimiter()) . ")", "life_authors");
     $ta->setCols(50);
     $ta->setRows(2);
     if (is_object($this->md_section = $this->md_obj->getLifecycle())) {
         $sep = $ent_str = "";
         foreach ($ids = $this->md_section->getContributeIds() as $con_id) {
             $md_con = $this->md_section->getContribute($con_id);
             if ($md_con->getRole() == "Author") {
                 foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
                     $md_ent = $md_con->getEntity($ent_id);
                     $ent_str = $ent_str . $sep . $md_ent->getEntity();
                     $sep = $this->md_settings->getDelimiter() . " ";
                 }
             }
         }
         $ta->setValue($ent_str);
     }
     $this->form->addItem($ta);
     // copyright
     include_once "./Services/MetaData/classes/class.ilCopyrightInputGUI.php";
     $cp = new ilCopyrightInputGUI($this->lng->txt("meta_copyright"), "copyright");
     $cp->setCols(50);
     $cp->setRows(3);
     $desc = ilMDRights::_lookupDescription($this->md_obj->getRBACId(), $this->md_obj->getObjId());
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilMDEditorGUI.php

示例11: initFilter

 /**
  * Init filter
  */
 function initFilter()
 {
     global $lng, $rbacreview, $ilUser, $ilCtrl;
     // Show context filter
     if ($this->getMode() == self::MODE_LOCAL_USER) {
         include_once './Services/User/classes/class.ilLocalUser.php';
         $parent_ids = ilLocalUser::_getFolderIds();
         if (count($parent_ids) > 1) {
             include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
             $co = new ilSelectInputGUI($lng->txt('context'), 'time_limit_owner');
             $ref_id = $this->getUserFolderId();
             $opt[0] = $this->lng->txt('all_users');
             $opt[$this->getUserFolderId()] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($this->getUserFolderId())) . ')';
             foreach ($parent_ids as $parent_id) {
                 if ($parent_id == $this->getUserFolderId()) {
                     continue;
                 }
                 switch ($parent_id) {
                     case USER_FOLDER_ID:
                         $opt[USER_FOLDER_ID] = $lng->txt('global_user');
                         break;
                     default:
                         $opt[$parent_id] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_id)) . ')';
                         break;
                 }
             }
             $co->setOptions($opt);
             $this->addFilterItem($co);
             $co->readFromSession();
             $this->filter['time_limit_owner'] = $co->getValue();
         }
     }
     // User name, login, email filter
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" . $lng->txt("name"), "query");
     $ul->setDataSource($ilCtrl->getLinkTarget($this->getParentObject(), "addUserAutoComplete", "", true));
     $ul->setSize(20);
     $ul->setSubmitFormOnEnter(true);
     $this->addFilterItem($ul);
     $ul->readFromSession();
     $this->filter["query"] = $ul->getValue();
     /*
     include_once("./Services/Form/classes/class.ilTextInputGUI.php");
     $ti = new ilTextInputGUI($lng->txt("login")."/".$lng->txt("email")."/".$lng->txt("name"), "query");
     $ti->setMaxLength(64);
     $ti->setSize(20);
     $ti->setSubmitFormOnEnter(true);
     $this->addFilterItem($ti);
     $ti->readFromSession();
     $this->filter["query"] = $ti->getValue();
     */
     // activation
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $options = array("" => $lng->txt("user_all"), "active" => $lng->txt("active"), "inactive" => $lng->txt("inactive"));
     $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
     $si->setOptions($options);
     $this->addFilterItem($si);
     $si->readFromSession();
     $this->filter["activation"] = $si->getValue();
     // limited access
     include_once "./Services/Form/classes/class.ilCheckboxInputGUI.php";
     $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
     $this->addFilterItem($cb);
     $cb->readFromSession();
     $this->filter["limited_access"] = $cb->getChecked();
     // last login
     include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
     $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
     $default_date = new ilDateTime(time(), IL_CAL_UNIX);
     $default_date->increment(IL_CAL_DAY, 1);
     $di->setDate($default_date);
     $this->addFilterItem($di);
     $di->readFromSession();
     $this->filter["last_login"] = $di->getDate();
     if ($this->getMode() == self::MODE_USER_FOLDER) {
         // no assigned courses
         include_once "./Services/Form/classes/class.ilCheckboxInputGUI.php";
         $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
         $this->addFilterItem($cb);
         $cb->readFromSession();
         $this->filter["no_courses"] = $cb->getChecked();
         // no assigned groups
         include_once "./Services/Form/classes/class.ilCheckboxInputGUI.php";
         $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
         $this->addFilterItem($ng);
         $ng->readFromSession();
         $this->filter['no_groups'] = $ng->getChecked();
         // course/group members
         include_once "./Services/Form/classes/class.ilRepositorySelectorInputGUI.php";
         $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
         $rs->setSelectText($lng->txt("user_select_course_group"));
         $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
         $rs->setClickableTypes(array("crs", "grp"));
         $this->addFilterItem($rs);
         $rs->readFromSession();
         $this->filter["course_group"] = $rs->getValue();
     }
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilUserTableGUI.php

示例12: showAddressbook

 /**
  * Show user's addressbook
  */
 public function showAddressbook()
 {
     global $rbacsystem, $lng, $ilUser, $ilCtrl, $ilias;
     $this->tpl->setTitle($this->lng->txt("mail_addressbook"));
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.mail_addressbook.html", "Services/Contact");
     // check if current user may send mails
     include_once "Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail($_SESSION["AccountId"]);
     $mailing_allowed = $rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId());
     // searchbox
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $searchform = new ilPropertyFormGUI();
     $searchform->setFormAction($this->ctrl->getFormAction($this, "saveEntry"));
     $dsDataLink = $ilCtrl->getLinkTarget($this, 'lookupAddressbookAsync', '', true, false);
     $inp = new ilTextInputGUI($this->lng->txt('search_for'), 'search_qry');
     $inp->setDataSource($dsDataLink);
     $searchform->addItem($inp);
     $searchform->addCommandButton('search', $this->lng->txt("send"));
     $this->tpl->setVariable('SEARCHFORM', $searchform->getHtml());
     $this->tpl->setVariable('ACTION', $this->ctrl->getFormAction($this, "saveEntry"));
     $this->tpl->setVariable("TXT_SEARCH_FOR", $this->lng->txt("search_for"));
     $this->tpl->setVariable("BUTTON_SEARCH", $this->lng->txt("send"));
     if (strlen(trim($_SESSION["addr_search"])) > 0) {
         $this->tpl->setVariable("VALUE_SEARCH_FOR", ilUtil::prepareFormOutput(trim($_SESSION["addr_search"]), true));
     }
     $tbl = new ilAddressbookTableGUI($this);
     $tbl->setTitle($lng->txt("mail_addr_entries"));
     $tbl->setRowTemplate("tpl.mail_addressbook_row.html", "Services/Contact");
     $tbl->setDefaultOrderField('login');
     $result = array();
     $this->abook->setSearchQuery($_SESSION['addr_search']);
     $entries = $this->abook->getEntries();
     $tbl->addColumn('', 'check', '10%', true);
     $tbl->addColumn($this->lng->txt('login'), 'login', '20%');
     $tbl->addColumn($this->lng->txt('firstname'), 'firstname', '20%');
     $tbl->addColumn($this->lng->txt('lastname'), 'lastname', '20%');
     $tbl->addColumn($this->lng->txt('email'), 'email', '20%');
     $tbl->addColumn($this->lng->txt('actions'), '', '10%');
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     if (count($entries)) {
         $tbl->enable('select_all');
         $tbl->setSelectAllCheckbox('addr_id');
         $chatSettings = new ilSetting('chatroom');
         $chat_active = $chatSettings->get("chat_enabled", false);
         $counter = 0;
         foreach ($entries as $entry) {
             $result[$counter]['check'] = ilUtil::formCheckbox(0, 'addr_id[]', $entry["addr_id"]);
             $this->ctrl->setParameter($this, 'addr_id', $entry['addr_id']);
             $result[$counter]['login'] = '';
             if ($entry["login"] != "") {
                 if ($mailing_allowed) {
                     $result[$counter]['login_linked_link'] = $this->ctrl->getLinkTarget($this, 'mailToUsers');
                     $result[$counter]['login'] = $result[$counter]['login_linked_login'] = $entry["login"];
                 } else {
                     $result[$counter]['login'] = $result[$counter]['login_unliked'] = $entry["login"];
                 }
             }
             $result[$counter]['firstname'] = $entry["firstname"];
             $result[$counter]['lastname'] = $entry["lastname"];
             if ($_GET["baseClass"] == "ilMailGUI" && $rbacsystem->checkAccess("smtp_mail", $this->umail->getMailObjectReferenceId())) {
                 $result[$counter]['email'] = $result[$counter]['email_linked_email'] = $entry["email"];
                 $result[$counter]['email_linked_link'] = $this->ctrl->getLinkTarget($this, "mailToUsers");
             } else {
                 $result[$counter]['email'] = $result[$counter]['email_unlinked'] = $entry["email"];
             }
             $current_selection_list = new ilAdvancedSelectionListGUI();
             $current_selection_list->setListTitle($this->lng->txt("actions"));
             $current_selection_list->setId("act_" . $counter);
             $current_selection_list->addItem($this->lng->txt("edit"), '', $this->ctrl->getLinkTarget($this, "showAddressForm"));
             if ($mailing_allowed) {
                 $current_selection_list->addItem($this->lng->txt("send_mail_to"), '', $this->ctrl->getLinkTarget($this, "mailToUsers"));
             }
             $current_selection_list->addItem($this->lng->txt("delete"), '', $this->ctrl->getLinkTarget($this, "confirmDelete"));
             if ($chat_active) {
                 $current_selection_list->addItem($this->lng->txt("invite_to_chat"), '', $this->ctrl->getLinkTarget($this, "inviteToChat"));
             }
             $this->ctrl->clearParameters($this);
             $result[$counter]['COMMAND_SELECTION_LIST'] = $current_selection_list->getHTML();
             ++$counter;
         }
         if ($mailing_allowed) {
             $tbl->addMultiCommand('mailToUsers', $this->lng->txt('send_mail_to'));
         }
         $tbl->addMultiCommand('confirmDelete', $this->lng->txt('delete'));
         if ($chat_active) {
             $tbl->addMultiCommand('inviteToChat', $this->lng->txt('invite_to_chat'));
         }
     } else {
         $tbl->disable('header');
         $tbl->disable('footer');
         $tbl->setNoEntriesText($this->lng->txt('mail_search_no'));
     }
     $tbl->setData($result);
     $tbl->addCommandButton('showAddressForm', $this->lng->txt('add'));
     $this->tpl->setVariable('TABLE', $tbl->getHTML());
     $this->tpl->show();
     unset($_SESSION['addr_search']);
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilMailAddressbookGUI.php

示例13: initKeywordsForm

 protected function initKeywordsForm()
 {
     global $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "saveKeywordsForm"));
     $form->setTitle($this->lng->txt("blog_edit_keywords"));
     $txt = new ilTextInputGUI($this->lng->txt("blog_keywords"), "keywords");
     // $txt->setRequired(true); #10504
     $txt->setMulti(true);
     $txt->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
     $txt->setMaxLength(200);
     $txt->setSize(50);
     $txt->setInfo($this->lng->txt("blog_keywords_info"));
     $form->addItem($txt);
     $md_section = $this->getBlogPosting()->getMDSection();
     $keywords = array();
     foreach ($ids = $md_section->getKeywordIds() as $id) {
         $md_key = $md_section->getKeyword($id);
         if (trim($md_key->getKeyword()) != "") {
             $keywords[$md_key->getKeywordLanguageCode()][] = $md_key->getKeyword();
         }
     }
     // language is not "used" anywhere
     $ulang = $ilUser->getLanguage();
     if ($keywords[$ulang]) {
         asort($keywords[$ulang]);
         $txt->setValue($keywords[$ulang]);
     }
     // other keywords in blog
     $other = array();
     foreach (array_keys(ilBlogPosting::getAllPostings($this->getBlogPosting()->getBlogId())) as $posting_id) {
         if ($posting_id != $this->getBlogPosting()->getId()) {
             $other = array_merge($other, ilBlogPosting::getKeywords($this->getBlogPosting()->getBlogId(), $posting_id));
         }
     }
     if (is_array($keywords[$ulang])) {
         $other = array_diff($other, $keywords[$ulang]);
     }
     if (sizeof($other)) {
         $html = "";
         foreach ($other as $item) {
             $html .= '<span class="ilTag">' . $item . '</span>';
         }
         $info = new ilNonEditableValueGUI($this->lng->txt("blog_keywords_other"), "", true);
         $info->setInfo($this->lng->txt("blog_keywords_other_info"));
         $info->setValue($html);
         $form->addItem($info);
     }
     $form->addCommandButton("saveKeywordsForm", $this->lng->txt("save"));
     $form->addCommandButton("preview", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:53,代码来源:class.ilBlogPostingGUI.php

示例14: insertWikiLink

 /**
  * Returns form to insert a wiki link per ajax
  */
 function insertWikiLink()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->addCommandButton("addWikiLink", $lng->txt("wiki_add_link"));
     $form->addCommandButton("searchWikiLink", $lng->txt("search"));
     // Target page
     $tp = new ilTextInputGUI($this->lng->txt("wiki_target_page"), "target_page");
     $tp->setSize(18);
     $tp->setRequired(true);
     $tp->setInfo("...");
     $tp->setDataSource($ilCtrl->getLinkTarget($this, "insertWikiLinkAC", "", true));
     $form->addItem($tp);
     // Link text
     $lt = new ilTextInputGUI($this->lng->txt("wiki_link_text"), "link_text");
     $lt->setSize(18);
     $form->addItem($lt);
     //$form->setTitle($lng->txt("wiki_link"));
     echo $form->getHTML();
     exit;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilWikiPageGUI.php

示例15: initAddCodesForm

 function initAddCodesForm()
 {
     global $rbacreview, $ilObjDataCache, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($this->lng->txt('registration_codes_edit_header'));
     $count = new ilNumberInputGUI($this->lng->txt('registration_codes_number'), 'reg_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('registration_codes_roles_title'));
     $this->form_gui->addItem($sec);
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $options = array("" => $this->lng->txt('registration_codes_no_assigned_role'));
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if (!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID))) {
             $options[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $roles = new ilSelectInputGUI($this->lng->txt("registration_codes_roles"), "reg_codes_role");
     $roles->setInfo($this->lng->txt("registration_codes_override_info"));
     $roles->setOptions($options);
     $this->form_gui->addItem($roles);
     $local = new ilTextInputGUI($this->lng->txt("registration_codes_roles_local"), "reg_codes_local");
     $local->setMulti(true);
     $local->setDataSource($this->ctrl->getLinkTarget($this, "getLocalRoleAutoComplete", "", true));
     $this->form_gui->addItem($local);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('reg_access_limitations'));
     $this->form_gui->addItem($sec);
     $limit = new ilRadioGroupInputGUI($this->lng->txt("reg_access_limitation_mode"), "reg_limit");
     $limit->setInfo($this->lng->txt("registration_codes_override_info"));
     $this->form_gui->addItem($limit);
     $opt = new ilRadioOption($this->lng->txt("registration_codes_roles_limitation_none"), "none");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_none"), "unlimited");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_absolute"), "absolute");
     $limit->addOption($opt);
     $dt = new ilDateTimeInputGUI($this->lng->txt("reg_access_limitation_mode_absolute_target"), "abs_date");
     $dt->setRequired(true);
     $opt->addSubItem($dt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_relative"), "relative");
     $limit->addOption($opt);
     $days = new ilTextInputGUI("", "rel_date[d]");
     $days->setSize(5);
     $days->setSuffix($this->lng->txt("days"));
     $mon = new ilTextInputGUI("", "rel_date[m]");
     $mon->setSize(5);
     $mon->setSuffix($this->lng->txt("months"));
     $yr = new ilTextInputGUI("", "rel_date[y]");
     $yr->setSize(5);
     $yr->setSuffix($this->lng->txt("years"));
     // custom input won't reload
     if (is_array($_POST["rel_date"])) {
         $days->setValue($_POST["rel_date"]["d"]);
         $mon->setValue($_POST["rel_date"]["m"]);
         $yr->setValue($_POST["rel_date"]["y"]);
     }
     $dur = new ilCustomInputGUI($this->lng->txt("reg_access_limitation_mode_relative_target"));
     $dur->setRequired(true);
     $dur->setHTML($days->getToolbarHTML() . " " . $mon->getToolbarHTML() . " " . $yr->getToolbarHTML());
     $opt->addSubItem($dur);
     $this->form_gui->addCommandButton('createCodes', $this->lng->txt('create'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:70,代码来源:class.ilRegistrationSettingsGUI.php


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