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


PHP ilFileInputGUI::setInfo方法代码示例

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


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

示例1: initSettingsForm

 /**
  * Init settings form.
  * This command uses the form class to display an input form.
  */
 protected function initSettingsForm()
 {
     $this->settingsForm = new ilPropertyFormGUI();
     // Title and description (Standard)
     $titleField = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $titleField->setMaxLength(128);
     $titleField->setRequired(true);
     $this->settingsForm->addItem($titleField);
     $descField = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
     $descField->setCols(50);
     $descField->setRows(5);
     $this->settingsForm->addItem($descField);
     // Online flag
     $onlineField = new ilCheckboxInputGUI($this->lng->txt('online'), 'online');
     $this->settingsForm->addItem($onlineField);
     // Max booking time
     //		$maxtimeField = new ilRoomSharingTimeInputGUI($this->lng->txt('rep_robj_xrs_max_book_time'), 'max_book_time');
     //		$maxtimeField->setShowTime(true);
     //		$maxtimeField->setMinuteStepSize(5);
     //		$maxtimeField->setShowDate(false);
     //		$this->settingsForm->addItem($maxtimeField);
     require_once './Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing/classes/utils/class.xrsTimeInputGUI.php';
     $xrsTimeInputGUI = new xrsTimeInputGUI($this->lng->txt('rep_robj_xrs_max_book_time'), 'max_book_time');
     $this->settingsForm->addItem($xrsTimeInputGUI);
     // Rooms agreement
     $roomsAgrField = new ilFileInputGUI($this->lng->txt('rep_robj_xrs_rooms_user_agreement'), "rooms_agreement");
     $roomsAgrField->setSize(50);
     $roomsAgrField->setRequired(false);
     $roomsAgrField->setInfo($this->lng->txt("rep_robj_xrs_room_agreement_filetypes") . " .bmp, .jpg, .jpeg, .png, .gif, .txt, .pdf");
     $this->settingsForm->addItem($roomsAgrField);
     $this->settingsForm->addCommandButton('updateSettings', $this->lng->txt('save'));
     $this->settingsForm->setTitle($this->lng->txt('edit_properties'));
     $this->settingsForm->setFormAction($this->ctrl->getFormAction($this));
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:38,代码来源:class.ilObjRoomSharingGUI.php

示例2: ilPropertyFormGUI

 function importExternalMailRecipientsFromFileFormObject()
 {
     global $ilAccess;
     $this->parent_gui->handleWriteAccess();
     $this->setCodesSubtabs();
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form_import_file = new ilPropertyFormGUI();
     $form_import_file->setFormAction($this->ctrl->getFormAction($this));
     $form_import_file->setTableWidth("100%");
     $form_import_file->setId("codes_import_file");
     $headerfile = new ilFormSectionHeaderGUI();
     $headerfile->setTitle($this->lng->txt("import_from_file"));
     $form_import_file->addItem($headerfile);
     $externalmails = new ilFileInputGUI($this->lng->txt("externalmails"), "externalmails");
     $externalmails->setInfo($this->lng->txt('externalmails_info'));
     $externalmails->setRequired(true);
     $form_import_file->addItem($externalmails);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_file->addCommandButton("importExternalRecipientsFromFile", $this->lng->txt("import"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_file->addCommandButton("codes", $this->lng->txt("cancel"));
     }
     $this->tpl->setContent($form_import_file->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilSurveyParticipantsGUI.php

示例3: initImportForm

 /**
  * Create import form
  */
 protected function initImportForm()
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt('cal_import_tbl'));
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->addCommandButton('uploadAppointments', $this->lng->txt('import'));
     $ics = new ilFileInputGUI($this->lng->txt('cal_import_file'), 'file');
     $ics->setALlowDeletion(false);
     $ics->setSuffixes(array('ics'));
     $ics->setInfo($this->lng->txt('cal_import_file_info'));
     $form->addItem($ics);
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:17,代码来源:class.ilCalendarCategoryGUI.php

示例4: createFileInputFormItem

 /**
  * Creates an input field for floor plans that should be uploaded.
  *
  * @return ilFileInputGUI file input form item
  */
 protected function createFileInputFormItem()
 {
     $file = new ilFileInputGUI($this->lng->txt("rep_robj_xrs_room_floor_plans"), "upload_file");
     $file->setSize(50);
     $file->setRequired(true);
     $file->setALlowDeletion(true);
     $file->setInfo($this->lng->txt("rep_robj_xrs_floor_plans_filetypes") . " .bmp, .jpg, .jpeg, .png, .gif");
     return $file;
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:14,代码来源:class.ilRoomSharingFloorPlansGUI.php

示例5: initForm

 /**
  * Init creation form
  */
 function initForm($a_mode = "create")
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     if ($a_mode == "edit") {
         $std_item = $this->object->getMediaItem("Standard");
     }
     $this->form_gui = new ilPropertyFormGUI();
     // standard view resource
     $title = new ilTextInputGUI($lng->txt("title"), "standard_title");
     $title->setSize(40);
     $title->setMaxLength(120);
     $this->form_gui->addItem($title);
     $radio_prop = new ilRadioGroupInputGUI($lng->txt("cont_resource"), "standard_type");
     $op1 = new ilRadioOption($lng->txt("cont_file"), "File");
     $up = new ilFileInputGUI("", "standard_file");
     $up->setSuffixes(ilObjMediaObject::getRestrictedFileTypes());
     $up->setInfo("");
     $op1->addSubItem($up);
     $radio_prop->addOption($op1);
     $op2 = new ilRadioOption($lng->txt("url"), "Reference");
     $ref = new ilTextInputGUI("", "standard_reference");
     $ref->setInfo($lng->txt("cont_ref_helptext"));
     $op2->addSubItem($ref);
     $radio_prop->addOption($op2);
     $radio_prop->setValue("File");
     $this->form_gui->addItem($radio_prop);
     // standard format
     if ($a_mode == "edit") {
         $format = new ilNonEditableValueGUI($lng->txt("cont_format"), "standard_format");
         $format->setValue($std_item->getFormat());
         $this->form_gui->addItem($format);
     }
     // standard size
     $radio_size = new ilRadioGroupInputGUI($lng->txt("size"), "standard_size");
     if ($a_mode == "edit") {
         if ($orig_size = $std_item->getOriginalSize()) {
             $add_str = " (" . $orig_size["width"] . " x " . $orig_size["height"] . ")";
         }
         $op1 = new ilRadioOption($lng->txt("cont_resource_size") . $add_str, "original");
         $op2 = new ilRadioOption($lng->txt("cont_custom_size"), "selected");
     } else {
         $op1 = new ilRadioOption($lng->txt("cont_orig_size"), "original");
         $op2 = new ilRadioOption($lng->txt("cont_adjust_size"), "selected");
     }
     $radio_size->addOption($op1);
     // width height
     include_once "./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php";
     $width_height = new ilWidthHeightInputGUI($lng->txt("cont_width") . " / " . $lng->txt("cont_height"), "standard_width_height");
     $width_height->setConstrainProportions(true);
     $op2->addSubItem($width_height);
     // resize image
     if ($a_mode == "edit") {
         $std_item = $this->object->getMediaItem("Standard");
         if (is_int(strpos($std_item->getFormat(), "image")) && $std_item->getLocationType() == "LocalFile") {
             $resize = new ilCheckboxInputGUI($lng->txt("cont_resize_img"), "standard_resize");
             $op2->addSubItem($resize);
         }
     }
     $radio_size->setValue("original");
     if ($a_mode == "create" && ($this->getHeightPreset() > 0 || $this->getWidthPreset() > 0)) {
         $radio_size->setValue("selected");
         $width_height->setWidth($this->getWidthPreset());
         $width_height->setHeight($this->getHeightPreset());
     }
     $radio_size->addOption($op2);
     $this->form_gui->addItem($radio_size);
     // standard caption
     $caption = new ilTextAreaInputGUI($lng->txt("cont_caption"), "standard_caption");
     $caption->setCols(30);
     $caption->setRows(2);
     $this->form_gui->addItem($caption);
     /*$caption = new ilTextInputGUI($lng->txt("cont_caption"), "standard_caption");
     		$caption->setSize(40);
     		$caption->setMaxLength(200);
     		$this->form_gui->addItem($caption);*/
     // text representation (alt text)
     if ($a_mode == "edit" && is_int(strpos($std_item->getFormat(), "image"))) {
         $ta = new ilTextAreaInputGUI($lng->txt("text_repr"), "text_representation");
         $ta->setCols(30);
         $ta->setRows(2);
         $ta->setInfo($lng->txt("text_repr_info"));
         $this->form_gui->addItem($ta);
     }
     // standard parameters
     if ($a_mode == "edit" && !in_array($std_item->getFormat(), ilObjMediaObject::_getSimpleMimeTypes())) {
         if (ilObjMediaObject::_useAutoStartParameterOnly($std_item->getLocation(), $std_item->getFormat())) {
             $auto = new ilCheckboxInputGUI($lng->txt("cont_autostart"), "standard_autostart");
             $this->form_gui->addItem($auto);
         } else {
             $par = new ilTextAreaInputGUI($lng->txt("cont_parameter"), "standard_parameters");
             $par->setRows(5);
             $par->setCols(50);
             $this->form_gui->addItem($par);
         }
     }
     if ($a_mode == "edit") {
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjMediaObjectGUI.php

示例6: initForm

 /**
  * Init form
  */
 protected function initForm()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $this->setTitle($this->pl->txt('edit_type_template'));
     $types_available = array();
     $types = array(srCertificateTemplateTypeFactory::getById(srCertificateTemplateType::TEMPLATE_TYPE_HTML), srCertificateTemplateTypeFactory::getById(srCertificateTemplateType::TEMPLATE_TYPE_JASPER));
     /** @var $type srCertificateTemplateType */
     foreach ($types as $type) {
         if ($type->isAvailable()) {
             $types_available[$type->getId()] = $type->getTitle();
         }
     }
     if (!count($types_available)) {
         ilUtil::sendInfo($this->pl->txt('msg_no_template_types'));
     }
     $item = new ilSelectInputGUI($this->pl->txt('template_type_id'), 'template_type_id');
     $item->setOptions($types_available);
     $item->setRequired(true);
     $item->setValue($this->type->getTemplateTypeId());
     $this->addItem($item);
     $item = new ilFileInputGUI($this->pl->txt('template_file'), 'template_file');
     $template_file = $this->type->getCertificateTemplatesPath(true);
     if (is_file($template_file)) {
         $item->setValue($template_file);
     }
     $item->setFilename($template_file);
     $item->setInfo($this->pl->txt('template_file_info'));
     $item->setRequired(!is_file($template_file));
     $this->addItem($item);
     $assets = $this->type->getAssets();
     if (count($assets)) {
         $item = new ilMultiSelectInputGUI($this->pl->txt('assets'), 'remove_assets');
         $options = array();
         foreach ($assets as $asset) {
             $options[$asset] = $asset;
         }
         $item->setOptions($options);
         $item->setInfo($this->pl->txt('assets_info'));
         $this->addItem($item);
     }
     $item = new ilFileWizardInputGUI($this->pl->txt('add_assets'), 'add_assets');
     $item->setFilenames(array(0 => ''));
     $this->addItem($item);
     $this->addCommandButton('downloadDefaultTemplate', $this->pl->txt('download_default_template'));
     if (is_file($this->type->getCertificateTemplatesPath(true))) {
         $this->addCommandButton('downloadTemplate', $this->pl->txt('download_template'));
     }
     $this->addCommandButton('updateTemplate', $this->lng->txt('save'));
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:52,代码来源:class.srCertificateTypeTemplateFormGUI.php

示例7: showCodeImport

 public function showCodeImport()
 {
     $this->ctrl->setParameter($this, 'coupon_id', $_GET['coupon_id']);
     $this->__showButtons();
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     $this->coupon_obj->getCouponById(ilUtil::stripSlashes($_GET['coupon_id']));
     $oForm = new ilPropertyFormGUI();
     $oForm->setId('coup_form');
     $oForm->setFormAction($this->ctrl->getFormAction($this), 'importCodes');
     $oForm->setTitle($this->lng->txt("paya_coupons_coupon") . " " . $this->coupon_obj->getTitle() . ": " . $this->lng->txt('paya_coupons_codes_import'));
     $oFile = new ilFileInputGUI($this->lng->txt('file'), 'codesfile');
     $oFile->setSuffixes(array("txt"));
     $oFile->setRequired(true);
     $oFile->setInfo($this->lng->txt('import_use_only_textfile'));
     $oForm->addItem($oFile);
     $oForm->addCommandButton('importCodes', $this->lng->txt('upload'));
     $this->tpl->setVariable('FORM', $oForm->getHTML());
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:19,代码来源:class.ilPaymentCouponGUI.php

示例8: importExternalMailRecipientsObject

 function importExternalMailRecipientsObject($checkonly = false, $formindex = -1)
 {
     global $ilAccess;
     $this->handleWriteAccess();
     $this->setCodesSubtabs();
     $savefields = strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromFile") == 0 || strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromText") == 0 || strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromDataset") == 0 ? TRUE : FALSE;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form_import_file = new ilPropertyFormGUI();
     $form_import_file->setFormAction($this->ctrl->getFormAction($this));
     $form_import_file->setTableWidth("100%");
     $form_import_file->setId("codes_import_file");
     $headerfile = new ilFormSectionHeaderGUI();
     $headerfile->setTitle($this->lng->txt("import_from_file"));
     $form_import_file->addItem($headerfile);
     $externalmails = new ilFileInputGUI($this->lng->txt("externalmails"), "externalmails");
     $externalmails->setInfo($this->lng->txt('externalmails_info'));
     $externalmails->setRequired(true);
     $form_import_file->addItem($externalmails);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_file->addCommandButton("importExternalRecipientsFromFile", $this->lng->txt("import"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_file->addCommandButton("codesMail", $this->lng->txt("cancel"));
     }
     // import text
     $form_import_text = new ilPropertyFormGUI();
     $form_import_text->setFormAction($this->ctrl->getFormAction($this));
     $form_import_text->setTableWidth("100%");
     $form_import_text->setId("codes_import_text");
     $headertext = new ilFormSectionHeaderGUI();
     $headertext->setTitle($this->lng->txt("import_from_text"));
     $form_import_text->addItem($headertext);
     $inp = new ilTextAreaInputGUI($this->lng->txt('externaltext'), 'externaltext');
     if (array_key_exists('externaltext', $_SESSION) && strlen($_SESSION['externaltext'])) {
         $inp->setValue($_SESSION['externaltext']);
     } else {
         $inp->setValue($this->lng->txt('mail_import_example1') . "\n" . $this->lng->txt('mail_import_example2') . "\n" . $this->lng->txt('mail_import_example3') . "\n");
     }
     $inp->setRequired(true);
     $inp->setCols(80);
     $inp->setRows(10);
     $inp->setInfo($this->lng->txt('externaltext_info'));
     $form_import_text->addItem($inp);
     unset($_SESSION['externaltext']);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_text->addCommandButton("importExternalRecipientsFromText", $this->lng->txt("import"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_text->addCommandButton("codesMail", $this->lng->txt("cancel"));
     }
     // import dataset
     $form_import_dataset = new ilPropertyFormGUI();
     $form_import_dataset->setFormAction($this->ctrl->getFormAction($this));
     $form_import_dataset->setTableWidth("100%");
     $form_import_dataset->setId("codes_import_dataset");
     $headerfile = new ilFormSectionHeaderGUI();
     $headerfile->setTitle($this->lng->txt("import_from_dataset"));
     $form_import_dataset->addItem($headerfile);
     $existingdata = $this->object->getExternalCodeRecipients();
     $existingcolumns = array('email');
     if (count($existingdata)) {
         $first = array_shift($existingdata);
         foreach ($first as $key => $value) {
             if (strcmp($key, 'email') != 0 && strcmp($key, 'code') != 0 && strcmp($key, 'sent') != 0) {
                 array_push($existingcolumns, $key);
             }
         }
     }
     foreach ($existingcolumns as $column) {
         $inp = new ilTextInputGUI($column, $column);
         $inp->setSize(50);
         if (strcmp($column, 'email') == 0) {
             $inp->setRequired(true);
         } else {
             $inp->setRequired(false);
         }
         $form_import_dataset->addItem($inp);
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_dataset->addCommandButton("importExternalRecipientsFromDataset", $this->lng->txt("import"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $form_import_dataset->addCommandButton("codesMail", $this->lng->txt("cancel"));
     }
     $errors = false;
     if ($savefields) {
         switch ($formindex) {
             case 0:
                 $errors = !$form_import_file->checkInput();
                 $form_import_file->setValuesByPost();
                 if ($errors) {
                     $checkonly = false;
                 }
                 break;
             case 1:
                 $errors = !$form_import_text->checkInput();
                 $form_import_text->setValuesByPost();
                 if ($errors) {
                     $checkonly = false;
                 }
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjSurveyGUI.php


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