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


PHP ilPropertyFormGUI::addItem方法代码示例

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


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

示例1: addFieldsToEditForm

 protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
 {
     // orientation
     $orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
     $orientation->setRequired(false);
     $orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
     $orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
     $orientation->addOption(new ilRadioOption($this->lng->txt('combobox'), 2));
     $a_form->addItem($orientation);
     // Answers
     include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
     $answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
     $answers->setRequired(false);
     $answers->setAllowMove(true);
     $answers->setShowWizard(true);
     $answers->setShowSavePhrase(true);
     $answers->setUseOtherAnswer(true);
     $answers->setShowNeutralCategory(true);
     $answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
     $answers->setDisabledScale(false);
     $a_form->addItem($answers);
     // values
     $orientation->setValue($this->object->getOrientation());
     if (!$this->object->getCategories()->getCategoryCount()) {
         $this->object->getCategories()->addCategory("");
     }
     $answers->setValues($this->object->getCategories());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:28,代码来源:class.SurveySingleChoiceQuestionGUI.php

示例2: addFieldsToEditForm

 protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
 {
     // maximum number of characters
     $maxchars = new ilNumberInputGUI($this->lng->txt("maxchars"), "maxchars");
     $maxchars->setRequired(false);
     $maxchars->setSize(5);
     $maxchars->setDecimals(0);
     $a_form->addItem($maxchars);
     // textwidth
     $textwidth = new ilNumberInputGUI($this->lng->txt("width"), "textwidth");
     $textwidth->setRequired(true);
     $textwidth->setSize(3);
     $textwidth->setDecimals(0);
     $textwidth->setMinValue(10);
     $a_form->addItem($textwidth);
     // textheight
     $textheight = new ilNumberInputGUI($this->lng->txt("height"), "textheight");
     $textheight->setRequired(true);
     $textheight->setSize(3);
     $textheight->setDecimals(0);
     $textheight->setMinValue(1);
     $a_form->addItem($textheight);
     // values
     if ($this->object->getMaxChars() > 0) {
         $maxchars->setValue($this->object->getMaxChars());
     }
     $textwidth->setValue($this->object->getTextWidth());
     $textheight->setValue($this->object->getTextHeight());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:29,代码来源:class.SurveyTextQuestionGUI.php

示例3: initServiceSettingsForm

 /**
  * Init service settings form
  * @param ilPropertyFormGUI $form
  * @param type $services
  */
 public static function initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
 {
     global $ilSetting;
     if (in_array(self::CALENDAR_VISIBILITY, $services)) {
         include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
         if (ilCalendarSettings::_getInstance()->isEnabled()) {
             // Container tools (calendar, news, ... activation)
             $cal = new ilCheckboxInputGUI('', self::CALENDAR_VISIBILITY);
             $cal->setValue(1);
             include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
             $cal->setChecked(ilCalendarSettings::lookupCalendarActivated($a_obj_id));
             $cal->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_calendar'));
             $form->addItem($cal);
         }
     }
     if (in_array(self::NEWS_VISIBILITY, $services)) {
         if ($ilSetting->get('block_activated_news')) {
             // Container tools (calendar, news, ... activation)
             $news = new ilCheckboxInputGUI('', self::NEWS_VISIBILITY);
             $news->setValue(1);
             $news->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::NEWS_VISIBILITY, $ilSetting->get('block_activated_news', true)));
             $news->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_news'));
             $form->addItem($news);
         }
     }
     return $form;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:32,代码来源:class.ilObjectServiceSettingsGUI.php

示例4: initPluginSettings

 protected function initPluginSettings()
 {
     $n = new ilNonEditableValueGUI($this->getPluginHookObject()->txt('info_token_expires'));
     $n->setValue(date(DATE_ISO8601, $this->getPluginObject()->getValidThrough()));
     $this->form->addItem($n);
     $this->form->getItemByPostVar('root_folder')->setDisabled(true);
 }
开发者ID:pschmitt77,项目名称:OneDrive,代码行数:7,代码来源:class.ilOneDriveSettingsGUI.php

示例5: initEditCustomForm

 protected function initEditCustomForm(ilPropertyFormGUI $a_form)
 {
     global $lng, $ilSetting;
     if ($this->id_type == self::REPOSITORY_NODE_ID) {
         $appr = new ilCheckboxInputGUI($lng->txt("blog_enable_approval"), "approval");
         $appr->setInfo($lng->txt("blog_enable_approval_info"));
         $a_form->addItem($appr);
     }
     $notes = new ilCheckboxInputGUI($lng->txt("blog_enable_notes"), "notes");
     $a_form->addItem($notes);
     if ($ilSetting->get('enable_global_profiles')) {
         $rss = new ilCheckboxInputGUI($lng->txt("blog_enable_rss"), "rss");
         $rss->setInfo($lng->txt("blog_enable_rss_info"));
         $a_form->addItem($rss);
     }
     $ppic = new ilCheckboxInputGUI($lng->txt("blog_profile_picture"), "ppic");
     $a_form->addItem($ppic);
     $blga_set = new ilSetting("blga");
     if ($blga_set->get("banner")) {
         $dimensions = " (" . $blga_set->get("banner_width") . "x" . $blga_set->get("banner_height") . ")";
         $img = new ilImageFileInputGUI($lng->txt("blog_banner") . $dimensions, "banner");
         $a_form->addItem($img);
         // show existing file
         $file = $this->object->getImageFullPath(true);
         if ($file) {
             $img->setImage($file);
         }
     }
     $bg_color = new ilColorPickerInputGUI($lng->txt("blog_background_color"), "bg_color");
     $a_form->addItem($bg_color);
     $font_color = new ilColorPickerInputGUI($lng->txt("blog_font_color"), "font_color");
     $a_form->addItem($font_color);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:33,代码来源:class.ilObjBlogGUI.php

示例6: initLicenseForm

 protected function initLicenseForm()
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "updateLicense"));
     $form->setTitle($this->lng->txt('edit_license'));
     $exist = new ilNumberInputGUI($this->lng->txt("existing_licenses"), "licenses");
     $exist->setInfo($this->lng->txt("zero_licenses_explanation"));
     $exist->setMaxLength(10);
     $exist->setSize(10);
     $exist->setValue($this->license->getLicenses());
     $form->addItem($exist);
     $info_used = new ilNonEditableValueGUI($this->lng->txt("used_licenses"));
     $info_used->setInfo($this->lng->txt("used_licenses_explanation"));
     $info_used->setValue($this->license->getAccesses());
     $form->addItem($info_used);
     $remaining_licenses = $this->license->getLicenses() == "0" ? $this->lng->txt("arbitrary") : $this->license->getRemainingLicenses();
     $info_remain = new ilNonEditableValueGUI($this->lng->txt("remaining_licenses"));
     $info_remain->setInfo($this->lng->txt("remaining_licenses_explanation"));
     $info_remain->setValue($remaining_licenses);
     $form->addItem($info_remain);
     $info_potential = new ilNonEditableValueGUI($this->lng->txt("potential_accesses"));
     $info_potential->setInfo($this->lng->txt("potential_accesses_explanation"));
     $info_potential->setValue($this->license->getPotentialAccesses());
     $form->addItem($info_potential);
     $comm = new ilTextAreaInputGUI($this->lng->txt("comment"), "remarks");
     $comm->setRows(5);
     $comm->setValue($this->license->getRemarks());
     $form->addItem($comm);
     $form->addCommandButton('updateLicense', $this->lng->txt('save'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilLicenseGUI.php

示例7: completeSpecificFormProperties

 /**
  * completes a given form object with the specific form properties
  * required by this question type
  * 
  * @access public
  * @param ilPropertyFormGUI $form
  */
 public function completeSpecificFormProperties(ilPropertyFormGUI $form)
 {
     $header = new ilFormSectionHeaderGUI();
     $header->setTitle($this->lng->txt('feedback_answers'));
     $form->addItem($header);
     if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
         foreach ($this->getAnswerOptionsByAnswerIndex() as $index => $answer) {
             $propertyLabel = $this->questionOBJ->prepareTextareaOutput($this->buildAnswerOptionLabel($index, $answer), true);
             $propertyPostVar = "feedback_answer_{$index}";
             $form->addItem($this->buildFeedbackContentFormProperty($propertyLabel, $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()));
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:20,代码来源:class.ilAssMultiOptionQuestionFeedback.php

示例8: initServiceSettingsForm

 /**
  * Init service settings form
  * @param ilPropertyFormGUI $form
  * @param type $services
  */
 public static function initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
 {
     global $ilSetting;
     // info tab
     if (in_array(self::INFO_TAB_VISIBILITY, $services)) {
         $info = new ilCheckboxInputGUI('', self::INFO_TAB_VISIBILITY);
         $info->setValue(1);
         $info->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::INFO_TAB_VISIBILITY, true));
         $info->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_info_tab'));
         $form->addItem($info);
     }
     // calendar
     if (in_array(self::CALENDAR_VISIBILITY, $services)) {
         include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
         if (ilCalendarSettings::_getInstance()->isEnabled()) {
             // Container tools (calendar, news, ... activation)
             $cal = new ilCheckboxInputGUI('', self::CALENDAR_VISIBILITY);
             $cal->setValue(1);
             include_once './Services/Calendar/classes/class.ilObjCalendarSettings.php';
             $cal->setChecked(ilCalendarSettings::lookupCalendarActivated($a_obj_id));
             $cal->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_calendar'));
             $form->addItem($cal);
         }
     }
     // news
     if (in_array(self::NEWS_VISIBILITY, $services)) {
         if ($ilSetting->get('block_activated_news')) {
             // Container tools (calendar, news, ... activation)
             $news = new ilCheckboxInputGUI('', self::NEWS_VISIBILITY);
             $news->setValue(1);
             $news->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::NEWS_VISIBILITY, $ilSetting->get('block_activated_news', true)));
             $news->setOptionTitle($GLOBALS['lng']->txt('obj_tool_setting_news'));
             $form->addItem($news);
         }
     }
     // auto rating
     if (in_array(self::AUTO_RATING_NEW_OBJECTS, $services)) {
         $GLOBALS['lng']->loadLanguageModule("rating");
         // auto rating for new objects
         $rate = new ilCheckboxInputGUI('', self::AUTO_RATING_NEW_OBJECTS);
         $rate->setValue(1);
         $rate->setOptionTitle($GLOBALS['lng']->txt('rating_new_objects_auto'));
         $rate->setInfo($GLOBALS['lng']->txt('rating_new_objects_auto_info'));
         $rate->setChecked(ilContainer::_lookupContainerSetting($a_obj_id, self::AUTO_RATING_NEW_OBJECTS, false));
         $form->addItem($rate);
     }
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilObjectServiceSettingsGUI.php

示例9: addFieldsToEditForm

 protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
 {
     // orientation
     $orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
     $orientation->setRequired(false);
     $orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
     $orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
     $a_form->addItem($orientation);
     // minimum answers
     $minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
     $minanswers->setValue(1);
     $minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
     $minanswers->setRequired(FALSE);
     $nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
     $nranswers->setSize(5);
     $nranswers->setDecimals(0);
     $nranswers->setRequired(false);
     $nranswers->setMinValue(1);
     $minanswers->addSubItem($nranswers);
     $nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
     $nrmaxanswers->setSize(5);
     $nrmaxanswers->setDecimals(0);
     $nrmaxanswers->setRequired(false);
     $nrmaxanswers->setMinValue(1);
     $minanswers->addSubItem($nrmaxanswers);
     $a_form->addItem($minanswers);
     // Answers
     include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
     $answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
     $answers->setRequired(false);
     $answers->setAllowMove(true);
     $answers->setShowWizard(false);
     $answers->setShowSavePhrase(false);
     $answers->setUseOtherAnswer(true);
     $answers->setShowNeutralCategory(true);
     $answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
     $answers->setDisabledScale(false);
     $a_form->addItem($answers);
     // values
     $orientation->setValue($this->object->getOrientation());
     $minanswers->setChecked($this->object->use_min_answers);
     $nranswers->setValue($this->object->nr_min_answers);
     $nrmaxanswers->setValue($this->object->nr_max_answers);
     if (!$this->object->getCategories()->getCategoryCount()) {
         $this->object->getCategories()->addCategory("");
     }
     $answers->setValues($this->object->getCategories());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:48,代码来源:class.SurveyMultipleChoiceQuestionGUI.php

示例10: initFormSettings

 /**
  * Init property form
  *
  * @return ilPropertyFormGUI $form
  */
 protected function initFormSettings()
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt('tracking_settings'));
     $form->setFormAction($this->ctrl->getFormAction($this));
     // Mode
     $mod = new ilRadioGroupInputGUI($this->lng->txt('trac_mode'), 'modus');
     $mod->setRequired(true);
     $mod->setValue($this->obj_lp->getCurrentMode());
     $form->addItem($mod);
     foreach ($this->obj_lp->getValidModes() as $mode_key) {
         $opt = new ilRadioOption($this->obj_lp->getModeText($mode_key), $mode_key, $this->obj_lp->getModeInfoText($mode_key));
         $opt->setValue($mode_key);
         $mod->addOption($opt);
         // :TODO: Subitem for visits ?!
         if ($mode_key == ilLPObjSettings::LP_MODE_VISITS) {
             $vis = new ilNumberInputGUI($this->lng->txt('trac_visits'), 'visits');
             $vis->setSize(3);
             $vis->setMaxLength(4);
             $vis->setInfo(sprintf($this->lng->txt('trac_visits_info'), ilObjUserTracking::_getValidTimeSpan()));
             $vis->setRequired(true);
             $vis->setValue($this->obj_settings->getVisits());
             $opt->addSubItem($vis);
         }
     }
     $form->addCommandButton('saveSettings', $this->lng->txt('save'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilLPListOfSettingsGUI.php

示例11: getMultiLangForm

 /**
  * Get multi language form
  */
 function getMultiLangForm()
 {
     global $tpl, $lng, $ilCtrl, $ilUser;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     // master language
     include_once "./Services/MetaData/classes/class.ilMDLanguageItem.php";
     $options = ilMDLanguageItem::_getLanguages();
     $si = new ilSelectInputGUI($lng->txt("cont_master_lang"), "master_lang");
     $si->setOptions($options);
     $si->setValue($ilUser->getLanguage());
     $form->addItem($si);
     // additional languages
     include_once "./Services/MetaData/classes/class.ilMDLanguageItem.php";
     $options = ilMDLanguageItem::_getLanguages();
     $options = array("" => $lng->txt("please_select")) + $options;
     $si = new ilSelectInputGUI($lng->txt("cont_additional_langs"), "additional_langs");
     $si->setOptions($options);
     $si->setMulti(true);
     $form->addItem($si);
     $form->addCommandButton("saveMultilingualitySettings", $lng->txt("save"));
     $form->addCommandButton("cancel", $lng->txt("cancel"));
     $form->setTitle($lng->txt("cont_activate_multi_lang"));
     $form->setFormAction($ilCtrl->getFormAction($this));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:29,代码来源:class.ilPageMultiLangGUI.php

示例12: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     global $tpl, $ilTabs, $ilCtrl, $lng;
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     // add link button if a link is defined in the settings
     $set = new ilSetting("bibl");
     $link = $set->get(strtolower($this->bibl_obj->getFiletype()));
     if (!empty($link)) {
         $form->addCommandButton('autoLink', 'Link');
     }
     $attributes = $this->entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $is_standard_field = false;
             switch ($arrKey[0]) {
                 case 'bib':
                     $is_standard_field = ilBibTex::isStandardField($arrKey[2]);
                     break;
                 case 'ris':
                     $is_standard_field = ilRis::isStandardField($arrKey[2]);
                     break;
             }
             //				var_dump($is_standard_field); // FSX
             if ($is_standard_field) {
                 $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
             } else {
                 $strDescTranslated = $arrKey[2];
             }
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // generate/render links to libraries
     $settings = ilBibliographicSetting::getAll();
     foreach ($settings as $set) {
         $ci = new ilCustomInputGUI($set->getName());
         $ci->setHtml($set->getButton($this->bibl_obj, $this->entry));
         $form->addItem($ci);
     }
     $tpl->setPermanentLink("bibl", $this->bibl_obj->getRefId(), "_" . $_GET[ilObjBibliographicGUI::P_ENTRY_ID]);
     // set content and title
     return $form->getHTML();
     //Permanent Link
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:63,代码来源:class.ilBibliographicDetailsGUI.php

示例13: showDetails

 /**
  * @param ilObjBibliographic $bibl_obj
  * @return void
  *
  */
 public function showDetails(ilObjBibliographic $bibl_obj)
 {
     global $tpl, $ilTabs, $ilCtrl, $lng;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget("back", $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     $entry = new ilBibliographicEntry($bibl_obj->getFiletype(), $_GET['entryId']);
     $attributes = $entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // set content and title
     $tpl->setContent($form->getHTML());
     //Permanent Link
     $tpl->setPermanentLink("bibl", $bibl_obj->getRefId(), "_" . $_GET['entryId']);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:40,代码来源:class.ilBibliographicDetailsGUI.php

示例14: _initForm

 /**
  * Init Social Bookmark edit/create Form
  *
  * @param        ilObjectGUI	$formhandlerObject        taken as form target
  * @param        int        	$mode        "create" / "edit"
  */
 public static function _initForm($formhandlerObject, $mode = "create", $id = 0)
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setMultipart(true);
     // File Title
     $in_title = new ilTextInputGUI($lng->txt("title"), "title");
     $in_title->setMaxLength(128);
     $in_title->setSize(40);
     $in_title->setRequired(true);
     $form->addItem($in_title);
     // Link
     $in_link = new ilTextInputGUI($lng->txt("link"), "link");
     $in_link->setMaxLength(300);
     $in_link->setSize(40);
     $in_link->setRequired(true);
     $in_link->setInfo($lng->txt('socialbm_link_description'));
     $form->addItem($in_link);
     // File
     $in_file = new ilFileInputGUI($lng->txt("file"), "image_file");
     $in_file->setSuffixes(array('bmp', 'gif', 'jpg', 'jpeg', 'png'));
     $form->addItem($in_file);
     // Activate on submit
     $in_activate = new ilCheckboxInputGUI($lng->txt("activate"), "activate");
     $in_activate->setValue('1');
     $form->addItem($in_activate);
     // save and cancel commands
     if ($mode == "create") {
         $form->addCommandButton("createSocialBookmark", $lng->txt("create"));
         $form->addCommandButton("editSocialBookmarks", $lng->txt("cancel"));
         $form->setTitle($lng->txt("adm_social_bm_create"));
         $in_file->setRequired(true);
     } else {
         if ($mode == "update") {
             $in_hidden = new ilHiddenInputGUI("sbm_id", $id);
             $form->addItem($in_hidden);
             $form->addCommandButton("updateSocialBookmark", $lng->txt("update"));
             $form->addCommandButton("cancel", $lng->txt("cancel"));
             $form->setTitle($lng->txt("adm_social_bm_edit"));
             $in_file->setRequired(false);
         }
     }
     $form->setTableWidth("60%");
     $form->setFormAction($ilCtrl->getFormAction($formhandlerObject));
     return $form;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:53,代码来源:class.ilSocialBookmarks.php

示例15: addCustomSettingsToForm

 public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
 {
     global $lng, $ilSetting;
     $cb = new ilCheckboxInputGUI($lng->txt("cron_mail_notification_message"), "mail_notification_message");
     $cb->setInfo($lng->txt("cron_mail_notification_message_info"));
     $cb->setChecked($ilSetting->get("mail_notification_message"));
     $a_form->addItem($cb);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilMailCronNotification.php


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