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


PHP ilTextInputGUI::setValue方法代码示例

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


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

示例1: setValueByArray

 public function setValueByArray($value)
 {
     parent::setValueByArray($value);
     include_once './Services/Tree/classes/class.ilPathGUI.php';
     $path = new ilPathGUI();
     $reference = $value[$this->getPostVar()];
     if ($reference) {
         $pathString = $path->getPath(ROOT_FOLDER_ID, $reference);
         $id = ilObject::_lookupObjId($reference);
         $this->title_input->setValue($pathString . " > " . ilObject::_lookupTitle($id));
         $this->hidden_input->setValue($reference);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilDataCollectionTreePickInputGUI.php

示例2: initForm

 /**
  * Init settings property form
  *
  * @access private
  */
 private function initForm()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
     $name->setRequired(true);
     $name->setValue('');
     $this->addItem($name);
     $url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
     $url->setRequired(true);
     $url->setValue('');
     $this->addItem($url);
     $img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
     $img->setValue('');
     $this->addItem($img);
     $show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
     $show_in_list->setValue(1);
     $this->addItem($show_in_list);
     switch ($this->action) {
         case 'create':
             $this->setTitle($this->lng->txt("bibl_settings_new"));
             $this->addCommandButton('create', $this->lng->txt('save'));
             break;
         case 'update':
             $this->addCommandButton('update', $this->lng->txt('save'));
             $this->fillForm();
             $this->setTitle($this->lng->txt("bibl_settings_edit"));
             break;
     }
     $this->addCommandButton('cancel', $this->lng->txt("cancel"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjBibliographicAdminLibrariesFormGUI.php

示例3: editQuestion

 /**
  * Creates an output of the edit form for the question	
  * @access public
  */
 function editQuestion()
 {
     global $ilDB, $tpl;
     $plugin = $this->object->getPlugin();
     $this->getQuestionTemplate();
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->outQuestionType());
     $form->setMultipart(FALSE);
     $form->setTableWidth("100%");
     $form->setId("assJSMEQuestion");
     // Basiseingabefelder: title, author, description, question, working time (assessment mode)
     $this->addBasicQuestionFormProperties($form);
     // points
     $points = new ilNumberInputGUI($plugin->txt("points"), "points");
     $points->setValue($this->object->getPoints());
     $points->setRequired(TRUE);
     $points->setSize(10);
     $points->setMinValue(0.0);
     $form->addItem($points);
     // optionString for the JSME-Applet
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $optionString = new ilTextInputGUI($plugin->txt("optionString"), "optionString");
     $optionString->setValue($this->object->getOptionString());
     $form->addItem($optionString);
     // JSME-Applet for sampleSolution
     include_once "./Services/Form/classes/class.ilCustomInputGUI.php";
     $sampleSolution = new ilCustomInputGUI($plugin->txt("sampleSolution"), "sampleSolution");
     $template = $this->getJsmeOutputTemplate("", $this->object->getOptionString(), $this->object->getSampleSolution());
     $sampleSolution->setHtml($template->get());
     $form->addItem($sampleSolution);
     $form->addCommandButton('save', $plugin->txt("save"));
     $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
 }
开发者ID:ba-al,项目名称:ILIAS-ChemistryQuestion44,代码行数:39,代码来源:class.assJSMEQuestionGUI.php

示例4: addToForm

 public function addToForm()
 {
     $text = new ilTextInputGUI($this->getTitle(), $this->getElementId());
     $text->setSize(20);
     $text->setMaxLength(512);
     $text->setSubmitFormOnEnter(true);
     $text->setValue($this->getADT()->getText());
     $this->addToParentElement($text);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilADTTextSearchBridgeSingle.php

示例5: showSettings

 public function showSettings($item)
 {
     global $lng;
     $txt = new ilTextInputGUI($lng->txt('polling_intervall'), 'osd_polling_intervall');
     $txt->setRequired(true);
     $txt->setInfo($lng->txt('polling_in_seconds'));
     $txt->setValue('300');
     $item->addSubItem($txt);
     return array('osd_polling_intervall');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilNotificationOSDHandler.php

示例6: setValue

 /**
  * set value
  *
  * @access public
  * @param string $a_value color hexcode 
  * @return
  */
 public function setValue($a_value)
 {
     $a_value = trim($a_value);
     if ($this->getAcceptNamedColors() && substr($a_value, 0, 1) == "!") {
         parent::setValue($a_value);
     } else {
         $this->hex = ilColorPickerInputGUI::determineHexcode($a_value);
         parent::setValue($this->getHexcode());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilColorPickerInputGUI.php

示例7: showPersonalData

 function showPersonalData()
 {
     // user_id $this->user_obj->getId()
     // all
     $this->psc_obj = new ilPaymentShoppingCart($this->user_obj);
     if (!count($items = $this->psc_obj->getEntries($this->pm_id))) {
         $this->tpl->setVariable("HEADER", $this->lng->txt('pay_bmf_your_order'));
         $this->tpl->touchBlock("stop_floating");
         ilUtil::sendInfo($this->lng->txt('pay_shopping_cart_empty'));
     } else {
         $this->tpl->setVariable("HEADER", $this->lng->txt('pay_step1'));
         $this->tpl->setVariable("TITLE", $this->lng->txt('pay_bmf_personal_data'));
         $this->tpl->setVariable("DESCRIPTION", $this->lng->txt('pay_bmf_description_personal_data'));
         $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
         $oForm = new ilPropertyFormGUI();
         $oForm->setFormAction($this->ctrl->getFormAction($this, 'getPersonalData'));
         $oForm->setTitle($this->lng->txt('pay_bmf_personal_data'));
         $oFirstname = new ilNonEditableValueGUI($this->lng->txt('firstname'));
         $oFirstname->setValue($this->user_obj->getFirstname());
         $oForm->addItem($oFirstname);
         $oLastname = new ilNonEditableValueGUI($this->lng->txt('lastname'));
         $oLastname->setValue($this->user_obj->getLastname());
         $oForm->addItem($oLastname);
         $oStreet = new ilTextInputGUI($this->lng->txt('street'), 'street');
         $oStreet->setValue($this->error != '' && isset($_POST['street']) ? ilUtil::prepareFormOutput($_POST['street'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['street'], true));
         $oForm->addItem($oStreet);
         $oHouseNumber = new ilTextInputGUI($this->lng->txt('pay_bmf_house_number'), 'house_number');
         $oHouseNumber->setValue($this->error != '' && isset($_POST['house_number']) ? ilUtil::prepareFormOutput($_POST['house_number'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['house_number'], true));
         $oForm->addItem($oHouseNumber);
         $oPoBox = new ilTextInputGUI($this->lng->txt('pay_bmf_or') . '  ' . $this->lng->txt('pay_bmf_po_box'), 'po_box');
         $oPoBox->setValue($this->error != '' && isset($_POST['po_box']) ? ilUtil::prepareFormOutput($_POST['po_box'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['po_box'], true));
         $oForm->addItem($oPoBox);
         $oZipCode = new ilTextInputGUI($this->lng->txt('zipcode'), 'zipcode');
         $oZipCode->setValue($this->error != '' && isset($_POST['zipcode']) ? ilUtil::prepareFormOutput($_POST['zipcode'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['zipcode'], true));
         $oForm->addItem($oZipCode);
         $oCity = new ilTextInputGUI($this->lng->txt('city'), 'city');
         $oCity->setValue($this->error != '' && isset($_POST['city']) ? ilUtil::prepareFormOutput($_POST['city'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['city'], true));
         $oForm->addItem($oCity);
         $oCountry = new ilSelectInputGUI($this->lng->txt('country'), 'country');
         $oCountry->setOptions($this->__getCountries());
         $oCountry->setValue($this->error != '' && isset($_POST['country']) ? $_POST['country'] : $_SESSION['bmf']['personal_data']['country']);
         $oForm->addItem($oCountry);
         $oEmail = new ilNonEditableValueGUI($this->lng->txt('email'));
         $oEmail->setValue($this->user_obj->getEmail());
         $oForm->addItem($oEmail);
         $oForm->addcommandButton('getPersonalData', ucfirst($this->lng->txt('next')));
         $this->tpl->setVariable('FORM', $oForm->getHTML());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:49,代码来源:class.ilPurchaseBMFGUI.php

示例8: 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

示例9: initForm

 /**
  * get html
  *
  * @access public
  * @param
  * @return
  */
 public function initForm()
 {
     $rec = new ilSelectInputGUI($this->lng->txt('cal_recurrences'), 'frequence');
     $rec->setRequired(true);
     $rec->setOptions(array(0 => $this->lng->txt('cal_no_recurrence'), ilCalendarRecurrence::FREQ_DAILY => $this->lng->txt('cal_rec_daily'), ilCalendarRecurrence::FREQ_WEEKLY => $this->lng->txt('cal_rec_weekly'), ilCalendarRecurrence::FREQ_MONTHLY => $this->lng->txt('cal_rec_monthly'), ilCalendarRecurrence::FREQ_YEARLY => $this->lng->txt('cal_rec_yearly')));
     $rec->setValue($this->recurrence->getFrequenceType());
     $this->form->addItem($rec);
     // DAILY part
     $interval = new ilTextInputGUI($this->lng->txt('interval'), 'interval');
     $interval->setSize(2);
     $interval->setMaxLength(3);
     $interval->setValue($this->recurrence->getInterval() ? $this->recurrence->getInterval() : 1);
     $interval->setInfo($this->lng->txt('interval_info'));
     $rec->addSubItem($interval);
     // Weekly
     $check = new ilCheckboxInputGUI($this->lng->txt('Su_short'), 'w_day[0]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('Mo_short'), 'w_day[1]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('Tu_short'), 'w_day[2]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('We_short'), 'w_day[3]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('Th_short'), 'w_day[4]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('Fr_short'), 'w_day[5]');
     $check->setChecked(true);
     $rec->addSubItem($check);
     $check = new ilCheckboxInputGUI($this->lng->txt('Sa_short'), 'w_day[6]');
     $check->setChecked(true);
     $rec->addSubItem($check);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:44,代码来源:class.ilCalendarRecurrenceGUI.php

示例10: addCustomSettingsToForm

 public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
 {
     global $lng;
     $lng->loadLanguageModule("file");
     require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
     $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
     // Enable disk quota reminder mail
     $cb_prop_reminder = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_reminder_mail"), "enable_disk_quota_reminder_mail");
     $cb_prop_reminder->setValue('1');
     $cb_prop_reminder->setChecked($disk_quota_obj->isDiskQuotaReminderMailEnabled());
     $cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
     $a_form->addItem($cb_prop_reminder);
     // Enable summary mail for certain users
     $cb_prop_summary = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_summary_mail"), "enable_disk_quota_summary_mail");
     $cb_prop_summary->setValue(1);
     $cb_prop_summary->setChecked($disk_quota_obj->isDiskQuotaSummaryMailEnabled());
     $cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
     $a_form->addItem($cb_prop_summary);
     // Edit disk quota recipients
     $summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
     $summary_rcpt->setValue($disk_quota_obj->getSummaryRecipients());
     $summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
     $cb_prop_summary->addSubItem($summary_rcpt);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilDAVCronDiskQuota.php

示例11: showTopicForm

 public function showTopicForm()
 {
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     if ($this->objCurrentTopic->getId()) {
         $this->ctrl->setParameter($this, 'topic_id', $this->objCurrentTopic->getId());
     }
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveTopic'));
     $form->setTitle($this->lng->txt($this->objCurrentTopic->getId() ? 'edit_topic' : 'new_topic'));
     $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $title->setValue($this->objCurrentTopic->getTitle());
     $title->setRequired(true);
     $form->addItem($title);
     $sorting = new ilTextInputGUI($this->lng->txt('pay_sorting_value'), 'sorting');
     $sorting->setValue($this->objCurrentTopic->getSorting());
     $sorting->setMaxLength(11);
     $sorting->setSize(11);
     $form->addItem($sorting);
     $form->addCommandButton('saveTopic', $this->lng->txt('save'));
     $form->addCommandButton('showTopicsList', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $form->getHTML());
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:24,代码来源:class.ilShopTopicsGUI.php

示例12: buildForm

 private function buildForm()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt("save"));
     $form->setTableWidth("100%");
     $form->setId("test_properties");
     if (!$this->settingsTemplate || $this->formShowGeneralSection($this->settingsTemplate->getSettings())) {
         // general properties
         $header = new ilFormSectionHeaderGUI();
         $header->setTitle($this->lng->txt("tst_general_properties"));
         $form->addItem($header);
     }
     // title & description (meta data)
     include_once 'Services/MetaData/classes/class.ilMD.php';
     $md_obj = new ilMD($this->testOBJ->getId(), 0, "tst");
     $md_section = $md_obj->getGeneral();
     $title = new ilTextInputGUI($this->lng->txt("title"), "title");
     $title->setRequired(true);
     $title->setValue($md_section->getTitle());
     $form->addItem($title);
     $ids = $md_section->getDescriptionIds();
     if ($ids) {
         $desc_obj = $md_section->getDescription(array_pop($ids));
         $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "description");
         $desc->setCols(50);
         $desc->setRows(4);
         $desc->setValue($desc_obj->getDescription());
         $form->addItem($desc);
     }
     // anonymity
     $anonymity = new ilRadioGroupInputGUI($this->lng->txt('tst_anonymity'), 'anonymity');
     if ($this->testOBJ->participantDataExist()) {
         $anonymity->setDisabled(true);
     }
     $rb = new ilRadioOption($this->lng->txt('tst_anonymity_no_anonymization'), 0);
     $anonymity->addOption($rb);
     $rb = new ilRadioOption($this->lng->txt('tst_anonymity_anonymous_test'), 1);
     $anonymity->addOption($rb);
     $anonymity->setValue((int) $this->testOBJ->getAnonymity());
     $form->addItem($anonymity);
     // test mode (question set type)
     $questSetType = new ilRadioGroupInputGUI($this->lng->txt("tst_question_set_type"), 'question_set_type');
     $questSetTypeFixed = new ilRadioOption($this->lng->txt("tst_question_set_type_fixed"), ilObjTest::QUESTION_SET_TYPE_FIXED, $this->lng->txt("tst_question_set_type_fixed_desc"));
     $questSetType->addOption($questSetTypeFixed);
     $questSetTypeRandom = new ilRadioOption($this->lng->txt("tst_question_set_type_random"), ilObjTest::QUESTION_SET_TYPE_RANDOM, $this->lng->txt("tst_question_set_type_random_desc"));
     $questSetType->addOption($questSetTypeRandom);
     $questSetTypeContinues = new ilRadioOption($this->lng->txt("tst_question_set_type_dynamic"), ilObjTest::QUESTION_SET_TYPE_DYNAMIC, $this->lng->txt("tst_question_set_type_dynamic_desc"));
     $questSetType->addOption($questSetTypeContinues);
     $questSetType->setValue($this->testOBJ->getQuestionSetType());
     if ($this->testOBJ->participantDataExist()) {
         $questSetType->setDisabled(true);
     }
     $form->addItem($questSetType);
     // pool usage
     $pool_usage = new ilCheckboxInputGUI($this->lng->txt("test_question_pool_usage"), "use_pool");
     $pool_usage->setValue(1);
     $pool_usage->setChecked($this->testOBJ->getPoolUsage());
     $form->addItem($pool_usage);
     // enable_archiving
     $enable_archiving = new ilCheckboxInputGUI($this->lng->txt('test_enable_archiving'), 'enable_archiving');
     $enable_archiving->setValue(1);
     $enable_archiving->setChecked($this->testOBJ->getEnableArchiving());
     $form->addItem($enable_archiving);
     // activation/availability  (no template support yet)
     include_once "Services/Object/classes/class.ilObjectActivation.php";
     $this->lng->loadLanguageModule('rep');
     $section = new ilFormSectionHeaderGUI();
     $section->setTitle($this->lng->txt('rep_activation_availability'));
     $form->addItem($section);
     // additional info only with multiple references
     $act_obj_info = $act_ref_info = "";
     if (sizeof(ilObject::_getAllReferences($this->testOBJ->getId())) > 1) {
         $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
         $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
     }
     $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
     $online->setChecked($this->testOBJ->isOnline());
     $online->setInfo($this->lng->txt('tst_activation_online_info') . $act_obj_info);
     $form->addItem($online);
     $act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'activation_type');
     $act_type->setInfo($act_ref_info);
     $act_type->setValue($this->testOBJ->isActivationLimited() ? ilObjectActivation::TIMINGS_ACTIVATION : ilObjectActivation::TIMINGS_DEACTIVATED);
     $opt = new ilRadioOption($this->lng->txt('rep_visibility_limitless'), ilObjectActivation::TIMINGS_DEACTIVATED);
     $opt->setInfo($this->lng->txt('tst_availability_limitless_info'));
     $act_type->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt('rep_visibility_until'), ilObjectActivation::TIMINGS_ACTIVATION);
     $opt->setInfo($this->lng->txt('tst_availability_until_info'));
     $this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
     include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
     $dur = new ilDateDurationInputGUI("", "access_period");
     $dur->setShowTime(true);
     $date = $this->testOBJ->getActivationStartingTime();
     $dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
     $dur->setStartText($this->lng->txt('rep_activation_limited_start'));
     $date = $this->testOBJ->getActivationEndingTime();
     $dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
     $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
     $opt->addSubItem($dur);
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjTestSettingsGeneralGUI.php

示例13: 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

示例14: initSettingsForm

 protected function initSettingsForm()
 {
     global $ilSetting;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt("settings"));
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
     // default repository view
     $options = array("flat" => $this->lng->txt("flatview"), "tree" => $this->lng->txt("treeview"));
     $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
     $si->setOptions($options);
     $si->setInfo($this->lng->txt(""));
     if ($ilSetting->get("default_repository_view") == "tree") {
         $si->setValue("tree");
     } else {
         $si->setValue("flat");
     }
     $form->addItem($si);
     //
     $options = array("" => $this->lng->txt("adm_rep_tree_only_container"), "tree" => $this->lng->txt("adm_all_resource_types"));
     // repository tree
     $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
     $radg->setValue($ilSetting->get("repository_tree_pres"));
     $op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "", $this->lng->txt("adm_rep_tree_only_cntr_info"));
     $radg->addOption($op1);
     $op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types", $this->lng->txt("adm_rep_tree_all_types_info"));
     // limit tree in courses and groups
     $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
     $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
     $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
     $op2->addSubItem($cb);
     $radg->addOption($op2);
     $form->addItem($radg);
     /* OBSOLETE
     		// synchronize repository tree with main view
     		$cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
     		$cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
     		$cb->setChecked($ilSetting->get("rep_tree_synchronize"));
     		$form->addItem($cb);
     		*/
     /* DISABLED
     		// repository access check
     		$options = array(
     			0 => "0",
     			10 => "10",
     			30 => "30",
     			60 => "60",
     			120 => "120"
     			);
     		$si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
     		$si->setOptions($options);
     		$si->setValue($ilSetting->get("rep_cache"));
     		$si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
     			$this->lng->txt("adm_repository_cache_time_info2"));
     		$form->addItem($si);
     		*/
     // trash
     $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
     $cb->setInfo($this->lng->txt("enable_trash_info"));
     if ($ilSetting->get("enable_trash")) {
         $cb->setChecked(true);
     }
     $form->addItem($cb);
     // change event
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     $this->lng->loadLanguageModule("trac");
     $event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
     $event->setChecked(ilChangeEvent::_isActive());
     $form->addItem($event);
     include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
     ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_REPOSITORY, $form, $this);
     // object lists
     $lists = new ilFormSectionHeaderGUI();
     $lists->setTitle($this->lng->txt("rep_object_lists"));
     $form->addItem($lists);
     $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
     $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
     $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
     $form->addItem($sdesc);
     $sdesclen = new ilTextInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
     $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
     $sdesclen->setSize(3);
     $sdesc->addSubItem($sdesclen);
     // load action commands asynchronously
     $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
     $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
     $cb->setChecked($ilSetting->get("item_cmd_asynch"));
     $form->addItem($cb);
     // notes/comments/tagging
     $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
     $pl->setValue(1);
     $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
     $form->addItem($pl);
     $form->addCommandButton('saveSettings', $this->lng->txt('save'));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:96,代码来源:class.ilObjRepositorySettingsGUI.php

示例15: renameFileForm

 /**
  * list files
  */
 function renameFileForm()
 {
     global $lng, $ilCtrl;
     if (!isset($_POST["file"])) {
         $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
     }
     if (count($_POST["file"]) > 1) {
         $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"), $this->ilias->error_obj->MESSAGE);
     }
     if (ilUtil::stripSlashes($_POST["file"][0]) == "..") {
         $this->ilias->raiseError($this->lng->txt("select_a_file"), $this->ilias->error_obj->MESSAGE);
     }
     $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
     $file = !empty($cur_subdir) ? $this->main_dir . "/" . $cur_subdir . "/" . ilUtil::stripSlashes($_POST["file"][0]) : $this->main_dir . "/" . ilUtil::stripSlashes($_POST["file"][0]);
     $this->ctrl->setParameter($this, "old_name", ilUtil::stripSlashes($_POST["file"][0]));
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     // file/dir name
     $ti = new ilTextInputGUI($this->lng->txt("name"), "new_name");
     $ti->setMaxLength(200);
     $ti->setSize(40);
     $ti->setValue(ilUtil::stripSlashes($_POST["file"][0]));
     $form->addItem($ti);
     // save and cancel commands
     $form->addCommandButton("renameFile", $lng->txt("rename"));
     $form->addCommandButton("cancelRename", $lng->txt("cancel"));
     $form->setFormAction($ilCtrl->getFormAction($this, "renameFile"));
     if (@is_dir($file)) {
         $form->setTitle($this->lng->txt("cont_rename_dir"));
     } else {
         $form->setTitle($this->lng->txt("rename_file"));
     }
     $this->tpl->setContent($form->getHTML());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:37,代码来源:class.ilFileSystemGUI.php


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