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


PHP ilTextAreaInputGUI类代码示例

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


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

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

示例2: addToForm

 public function addToForm()
 {
     $def = $this->getADT()->getCopyOfDefinition();
     if (!$this->isMulti()) {
         $text = new ilTextInputGUI($this->getTitle(), $this->getElementId());
         if ($def->getMaxLength()) {
             $max = $def->getMaxLength();
             $size = $text->getSize();
             $text->setMaxLength($max);
             if ($size && $max < $size) {
                 $text->setSize($max);
             }
         }
     } else {
         $text = new ilTextAreaInputGUI($this->getTitle(), $this->getElementId());
         if ($this->multi_rows) {
             $text->setRows($this->multi_rows);
         }
         if ($this->multi_cols) {
             $text->setCols($this->multi_cols);
         }
     }
     $this->addBasicFieldProperties($text, $def);
     $text->setValue($this->getADT()->getText());
     $this->addToParentElement($text);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilADTTextFormBridge.php

示例3: initForm

 /**
  * Add all fields to the form
  */
 protected function initForm()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $this->setTitle($this->lng->txt('orgu_settings'));
     $item = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $item->setRequired(true);
     $item->setValue($this->obj_orgu->getTitle());
     $this->addItem($item);
     $item = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
     $item->setValue($this->obj_orgu->getDescription());
     $this->addItem($item);
     $item = new ilFormSectionHeaderGUI();
     $item->setTitle($this->lng->txt('orgu_type'));
     $this->addItem($item);
     $types = ilOrgUnitType::getAllTypes();
     $options = array(0 => '');
     /** @var ilOrgUnitType $type */
     foreach ($types as $type) {
         $options[$type->getId()] = $type->getTitle();
     }
     asort($options);
     $item = new ilSelectInputGUI($this->lng->txt('orgu_type'), 'orgu_type');
     $item->setOptions($options);
     $item->setValue($this->obj_orgu->getOrgUnitTypeId());
     $this->addItem($item);
     $item = new ilFormSectionHeaderGUI();
     $item->setTitle($this->lng->txt('ext_id'));
     $this->addItem($item);
     $item = new ilTextInputGUI($this->lng->txt('ext_id'), 'ext_id');
     $item->setValue($this->obj_orgu->getImportId());
     $this->addItem($item);
     $this->addCommandButton('updateSettings', $this->lng->txt('save'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilObjOrgUnitSettingsFormGUI.php

示例4: createObject

 /**
  * create
  */
 function createObject()
 {
     global $rbacsystem, $lng, $tpl, $ilHelp;
     $forms = array();
     $ilHelp->setScreenIdComponent("sty");
     $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create");
     // --- create
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_create_new_stylesheet"));
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
     $ti->setMaxLength(128);
     $ti->setSize(40);
     $ti->setRequired(true);
     $form->addItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
     $ta->setCols(40);
     $ta->setRows(2);
     $form->addItem($ta);
     $form->addCommandButton("save", $this->lng->txt("save"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     // --- import
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_import_stylesheet"));
     // title
     $ti = new ilFileInputGUI($this->lng->txt("import_file"), "stylefile");
     $ti->setRequired(true);
     $form->addItem($ti);
     $form->addCommandButton("importStyle", $this->lng->txt("import"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     // --- clone
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_copy_other_stylesheet"));
     // source
     $ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style");
     $ti->setRequired(true);
     $ti->setOptions(ilObjStyleSheet::_getClonableContentStyles());
     $form->addItem($ti);
     $form->addCommandButton("copyStyle", $this->lng->txt("copy"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     $this->tpl->setContent($this->getCreationFormsHTML($forms));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilObjStyleSheetGUI.php

示例5: initConfigurationForm

 /**
  * Init configuration form.
  *
  * @return object form object
  */
 public function initConfigurationForm()
 {
     global $lng, $ilCtrl;
     $pl = $this->getPluginObject();
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     // Setting for the ephorus logging
     $ephorus_logging = new ilCheckboxInputGUI($pl->txt("ephorus_logging"), "ephorus_logging");
     $ephorus_logging->setValue(1);
     $ephorus_logging->setInfo($pl->txt("ephorus_logging_description"));
     $form->addItem($ephorus_logging);
     // Setting for the hand-in code
     $handin_code = new ilTextInputGUI($pl->txt("handin_code"), "handin_code");
     $handin_code->setRequired(true);
     $form->addItem($handin_code);
     // Setting for the hand-in address
     $handin_address = new ilTextInputGUI($pl->txt("handin_address"), "handin_address");
     $handin_address->setSize(80);
     $handin_address->setRequired(true);
     $form->addItem($handin_address);
     // Setting for the index address
     $index_address = new ilTextInputGUI($pl->txt("index_address"), "index_address");
     $index_address->setSize(80);
     $index_address->setRequired(true);
     $form->addItem($index_address);
     // Setting for the processtype
     $processtype = new ilSelectInputGUI($pl->txt("default_processtype"), "processtype");
     $processtype->setOptions(array(1 => $pl->txt("default"), 3 => $pl->txt("private")));
     $processtype->setInfo($pl->txt("default_processtype_description"));
     $form->addItem($processtype);
     // Setting for the disclosure
     $disclosure = new ilTextAreaInputGUI($pl->txt("disclosure"), "disclosure");
     $disclosure->setCols(79);
     $disclosure->setRows(4);
     $form->addItem($disclosure);
     $form->addCommandButton("save", $lng->txt("save") . " / " . $pl->txt("check_connection"));
     $form->setTitle($pl->txt("ephorus_plugin_configuration"));
     $form->setFormAction($ilCtrl->getFormAction($this));
     return $form;
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:45,代码来源:class.ilEphorusConfigGUI.php

示例6: addFormProperties

 /**
  * add the configuration elements to a property form
  * @param object	property form
  */
 public function addFormProperties(ilPropertyFormGUI $a_form)
 {
     global $lng;
     $lng->loadLanguageModule('adve');
     $availability = new ilRadioGroupInputGUI($lng->txt('char_selector'), 'char_selector_availability');
     $inactive = new ilRadioOption($lng->txt('char_selector_inactive'), ilCharSelectorConfig::INACTIVE);
     $inactive->setInfo($lng->txt('char_selector_inactive_info_' . $this->config->getContext()));
     $inherit = new ilRadioOption($lng->txt('char_selector_inherit'), ilCharSelectorConfig::INHERIT);
     $inherit->setInfo($lng->txt('char_selector_inherit_info_' . $this->config->getContext()));
     $enabled = new ilRadioOption($lng->txt('char_selector_enabled'), ilCharSelectorConfig::ENABLED);
     $enabled->setInfo($lng->txt('char_selector_enabled_info_' . $this->config->getContext()));
     $disabled = new ilRadioOption($lng->txt('char_selector_disabled'), ilCharSelectorConfig::DISABLED);
     $disabled->setInfo($lng->txt('char_selector_disabled_info_' . $this->config->getContext()));
     $blocks = new ilSelectInputGUI($lng->txt('char_selector_blocks'), 'char_selector_blocks');
     $blocks->setInfo($lng->txt('char_selector_blocks_info'));
     $blocks->setOptions($this->config->getBlockOptions());
     $blocks->setMulti(true);
     $enabled->addSubItem($blocks);
     $custom_items = new ilTextAreaInputGUI($lng->txt('char_selector_custom_items'), 'char_selector_custom_items');
     $tpl = new ilTemplate("tpl.char_selector_custom_info.html", true, true, "Services/UIComponent/CharSelector");
     $tpl->setVariable('1', $lng->txt('char_selector_custom_items_info1'));
     $tpl->setVariable('2a', $lng->txt('char_selector_custom_items_info2a'));
     $tpl->setVariable('2b', $lng->txt('char_selector_custom_items_info2b'));
     $tpl->setVariable('3a', $lng->txt('char_selector_custom_items_info3a'));
     $tpl->setVariable('3b', $lng->txt('char_selector_custom_items_info3b'));
     $tpl->setVariable('4a', $lng->txt('char_selector_custom_items_info4a'));
     $tpl->setVariable('4b', $lng->txt('char_selector_custom_items_info4b'));
     $tpl->setVariable('5a', $lng->txt('char_selector_custom_items_info5a'));
     $tpl->setVariable('5b', $lng->txt('char_selector_custom_items_info5b'));
     $tpl->setVariable('6a', $lng->txt('char_selector_custom_items_info6a'));
     $tpl->setVariable('6b', $lng->txt('char_selector_custom_items_info6b'));
     $custom_items->setInfo($tpl->get());
     $enabled->addSubItem($custom_items);
     switch ($this->config->getContext()) {
         case ilCharSelectorConfig::CONTEXT_ADMIN:
             $availability->addOption($inactive);
             $availability->addOption($enabled);
             $availability->addOption($disabled);
             $a_form->addItem($availability);
             break;
         case ilCharSelectorConfig::CONTEXT_USER:
         case ilCharSelectorConfig::CONTEXT_TEST:
             $availability->addOption($inherit);
             $availability->addOption($enabled);
             $availability->addOption($disabled);
             $a_form->addItem($availability);
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilCharSelectorGUI.php

示例7: initFormSequence

 /**
  * Init form
  * @param int $a_mode
  * @return 
  */
 protected function initFormSequence($a_mode)
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     include_once './Services/YUI/classes/class.ilYuiUtil.php';
     ilYuiUtil::initDomEvent();
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     switch ($a_mode) {
         case self::MODE_CREATE:
             $this->form->setTitle($this->lng->txt('cal_ch_add_sequence'));
             $this->form->addCommandButton('saveSequence', $this->lng->txt('save'));
             $this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             break;
             /*
             			case self::MODE_UPDATE:
             				$this->form->setTitle($this->lng->txt('cal_ch_edit_sequence'));
             				$this->form->addCommandButton('updateSequence', $this->lng->txt('save'));
             				$this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             				break;
             */
         /*
         			case self::MODE_UPDATE:
         				$this->form->setTitle($this->lng->txt('cal_ch_edit_sequence'));
         				$this->form->addCommandButton('updateSequence', $this->lng->txt('save'));
         				$this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
         				break;
         */
         case self::MODE_MULTI:
             $this->form->setTitle($this->lng->txt('cal_ch_multi_edit_sequence'));
             $this->form->addCommandButton('updateMulti', $this->lng->txt('save'));
             $this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             break;
     }
     // in case of existing groups show a selection
     include_once './Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
     if (count($options = ilConsultationHourGroups::getGroupSelectOptions($this->getUserId()))) {
         $group = new ilSelectInputGUI($this->lng->txt('cal_ch_grp_selection'), 'grp');
         $group->setOptions($options);
         $group->setRequired(false);
         $this->form->addItem($group);
     }
     // Title
     $ti = new ilTextInputGUI($this->lng->txt('title'), 'ti');
     $ti->setSize(32);
     $ti->setMaxLength(128);
     $ti->setRequired(true);
     $this->form->addItem($ti);
     if ($a_mode != self::MODE_MULTI) {
         // Start
         include_once './Services/Form/classes/class.ilDateTimeInputGUI.php';
         $dur = new ilDateTimeInputGUI($this->lng->txt('cal_start'), 'st');
         $dur->setShowTime(true);
         $dur->setMinuteStepSize(5);
         $this->form->addItem($dur);
         // Duration
         $du = new ilDurationInputGUI($this->lng->txt('cal_ch_duration'), 'du');
         $du->setShowMinutes(true);
         $du->setShowHours(true);
         $this->form->addItem($du);
         // Number of appointments
         $nu = new ilNumberInputGUI($this->lng->txt('cal_ch_num_appointments'), 'ap');
         $nu->setInfo($this->lng->txt('cal_ch_num_appointments_info'));
         $nu->setSize(2);
         $nu->setMaxLength(2);
         $nu->setRequired(true);
         $nu->setMinValue(1);
         $this->form->addItem($nu);
         // Recurrence
         include_once './Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php';
         $rec = new ilRecurrenceInputGUI($this->lng->txt('cal_recurrences'), 'frequence');
         $rec->setEnabledSubForms(array(IL_CAL_FREQ_DAILY, IL_CAL_FREQ_WEEKLY, IL_CAL_FREQ_MONTHLY));
         $this->form->addItem($rec);
     }
     // Number of bookings
     $nu = new ilNumberInputGUI($this->lng->txt('cal_ch_num_bookings'), 'bo');
     $nu->setSize(2);
     $nu->setMaxLength(2);
     $nu->setMinValue(1);
     $nu->setRequired(true);
     $this->form->addItem($nu);
     // Deadline
     $dead = new ilDurationInputGUI($this->lng->txt('cal_ch_deadline'), 'dead');
     $dead->setInfo($this->lng->txt('cal_ch_deadline_info'));
     $dead->setShowMinutes(false);
     $dead->setShowHours(true);
     $dead->setShowDays(true);
     $this->form->addItem($dead);
     // Location
     $lo = new ilTextInputGUI($this->lng->txt('cal_where'), 'lo');
     $lo->setSize(32);
     $lo->setMaxLength(128);
     $this->form->addItem($lo);
     // Description
     $de = new ilTextAreaInputGUI($this->lng->txt('description'), 'de');
     $de->setRows(10);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilConsultationHoursGUI.php

示例8: initLoginForm

 /**
  * Init login form
  */
 protected function initLoginForm()
 {
     global $rbacsystem, $lng, $ilSetting;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveLoginInfo'));
     $this->form->setTableWidth('80%');
     $this->form->setTitle($this->lng->txt('login_information'));
     $this->form->addCommandButton('saveLoginInfo', $this->lng->txt('save'));
     include_once 'Services/LDAP/classes/class.ilLDAPServer.php';
     include_once 'Services/Radius/classes/class.ilRadiusSettings.php';
     $rad_settings = ilRadiusSettings::_getInstance();
     if ($ldap_id = ilLDAPServer::_getFirstActiveServer() or $rad_settings->isActive()) {
         $select = new ilSelectInputGUI($this->lng->txt('default_auth_mode'), 'default_auth_mode');
         $select->setValue($ilSetting->get('default_auth_mode', AUTH_LOCAL));
         $select->setInfo($this->lng->txt('default_auth_mode_info'));
         $options[AUTH_LOCAL] = $this->lng->txt('auth_local');
         if ($ldap_id) {
             $options[AUTH_LDAP] = $this->lng->txt('auth_ldap');
         }
         if ($rad_settings->isActive()) {
             $options[AUTH_RADIUS] = $this->lng->txt('auth_radius');
         }
         $select->setOptions($options);
         $this->form->addItem($select);
     }
     if (!is_object($this->loginSettings)) {
         $this->loginSettings = new ilSetting("login_settings");
     }
     $login_settings = $this->loginSettings->getAll();
     $languages = $lng->getInstalledLanguages();
     $def_language = $lng->getDefaultLanguage();
     foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key) {
         $add = "";
         if ($lang_key == $def_language) {
             $add = " (" . $lng->txt("default") . ")";
         }
         $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
         $textarea->setRows(10);
         $textarea->setValue($login_settings["login_message_" . $lang_key]);
         $textarea->setUseRte(true);
         $textarea->setRteTagSet("extended");
         $this->form->addItem($textarea);
         unset($login_settings["login_message_" . $lang_key]);
     }
     foreach ($login_settings as $key => $message) {
         $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_"));
         $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
         $textarea->setRows(10);
         $textarea->setValue($message);
         $textarea->setUseRte(true);
         $textarea->setRteTagSet("extended");
         if (!in_array($lang_key, $languages)) {
             $textarea->setAlert($lng->txt("not_installed"));
         }
         $this->form->addItem($textarea);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:61,代码来源:class.ilAuthLoginPageEditorGUI.php

示例9: initEditForm

 /**
  * Init object edit form
  *
  * @return ilPropertyFormGUI
  */
 protected function initEditForm()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule($this->object->getType());
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "update"));
     $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
     $ti->setSize(min(40, ilObject::TITLE_LENGTH));
     $ti->setMaxLength(ilObject::TITLE_LENGTH);
     $ti->setRequired(true);
     $form->addItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
     $ta->setCols(40);
     $ta->setRows(2);
     $form->addItem($ta);
     $this->initEditCustomForm($form);
     $form->addCommandButton("update", $this->lng->txt("save"));
     //$this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilObjectGUI.php

示例10: initForm

 public function initForm($a_as_multi_assignment = FALSE)
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt('crs_loc_tst_assignment'));
     $form->setFormAction($this->ctrl->getFormAction($this->getGUI()));
     if ($a_as_multi_assignment) {
         $form->addCommandButton('saveMultiTestAssignment', $this->lng->txt('save'));
     } else {
         $form->addCommandButton('saveTest', $this->lng->txt('save'));
     }
     switch ($this->getTestType()) {
         case ilLOSettings::TYPE_TEST_INITIAL:
             $form->setTitle($this->lng->txt('crs_loc_settings_itest_tbl'));
             break;
         case ilLOSettings::TYPE_TEST_QUALIFIED:
             $form->setTitle($this->lng->txt('crs_loc_settings_qtest_tbl'));
             break;
     }
     $assignable = $this->getAssignableTests();
     $cr_mode = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_form_assign_it'), 'mode');
     $cr_mode->setRequired(true);
     $cr_mode->setValue(self::TEST_NEW);
     $new = new ilRadioOption($this->lng->txt('crs_loc_form_tst_new'), self::TEST_NEW);
     switch ($this->getTestType()) {
         case ilLOSettings::TYPE_TEST_INITIAL:
             $new->setInfo($this->lng->txt("crs_loc_form_tst_new_initial_info"));
             break;
         case ilLOSettings::TYPE_TEST_QUALIFIED:
             $new->setInfo($this->lng->txt("crs_loc_form_tst_new_qualified_info"));
             break;
     }
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
     $ti->setMaxLength(128);
     $ti->setSize(40);
     $ti->setRequired(true);
     $new->addSubItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
     $ta->setCols(40);
     $ta->setRows(2);
     $new->addSubItem($ta);
     // Question assignment type
     include_once './Modules/Test/classes/class.ilObjTest.php';
     $this->lng->loadLanguageModule('assessment');
     $qst = new ilRadioGroupInputGUI($this->lng->txt('tst_question_set_type'), 'qtype');
     $qst->setRequired(true);
     $random = new ilRadioOption($this->lng->txt('tst_question_set_type_random'), ilObjTest::QUESTION_SET_TYPE_RANDOM);
     $qst->addOption($random);
     $fixed = new ilRadioOption($this->lng->txt('tst_question_set_type_fixed'), ilObjTest::QUESTION_SET_TYPE_FIXED);
     $qst->addOption($fixed);
     $new->addSubItem($qst);
     $cr_mode->addOption($new);
     // assign existing
     $existing = new ilRadioOption($this->lng->txt('crs_loc_form_assign'), self::TEST_ASSIGN);
     switch ($this->getTestType()) {
         case ilLOSettings::TYPE_TEST_INITIAL:
             $existing->setInfo($this->lng->txt("crs_loc_form_assign_initial_info"));
             break;
         case ilLOSettings::TYPE_TEST_QUALIFIED:
             $existing->setInfo($this->lng->txt("crs_loc_form_assign_qualified_info"));
             break;
     }
     if (!$assignable) {
         $existing->setDisabled(true);
     }
     $cr_mode->addOption($existing);
     $options = array();
     $options[''] = $this->lng->txt('select_one');
     foreach ((array) $assignable as $tst_ref_id) {
         $tst_obj_id = ilObject::_lookupObjId($tst_ref_id);
         $options[$tst_ref_id] = ilObject::_lookupTitle($tst_obj_id);
     }
     $selectable = new ilSelectInputGUI($this->lng->txt('crs_loc_form_available_tsts'), 'tst');
     $selectable->setRequired(true);
     $selectable->setOptions($options);
     $existing->addSubItem($selectable);
     $form->addItem($cr_mode);
     if ($a_as_multi_assignment) {
         include_once './Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
         $assignments = ilLOTestAssignments::getInstance($this->getContainer()->getId());
         include_once './Modules/Course/classes/class.ilCourseObjective.php';
         $objective_ids = ilCourseObjective::_getObjectiveIds($this->getContainer()->getId(), FALSE);
         $options = array();
         $options[''] = $this->lng->txt('select_one');
         foreach ($objective_ids as $oid) {
             $already_assigned_tst = $assignments->getTestByObjective($oid, $this->getTestType());
             if (!$already_assigned_tst) {
                 $options[$oid] = ilCourseObjective::lookupObjectiveTitle($oid);
             }
         }
         $objective = new ilSelectInputGUI($this->lng->txt('crs_objectives'), 'objective');
         $objective->setRequired(TRUE);
         $objective->setOptions($options);
         $form->addItem($objective);
     }
     return $form;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:99,代码来源:class.ilLOTestAssignmentForm.php

示例11: initForm

 private function initForm($a_type = 'create')
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'saveForm'));
     $this->form_gui->setTitle($this->lng->txt('mail_mailing_list'));
     $titleGui = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $titleGui->setRequired(true);
     $this->form_gui->addItem($titleGui);
     $descriptionGui = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
     $descriptionGui->setCols(40);
     $descriptionGui->setRows(8);
     $this->form_gui->addItem($descriptionGui);
     $this->form_gui->addCommandButton('saveForm', $this->lng->txt('save'));
     $this->form_gui->addCommandButton('showMailingLists', $this->lng->txt('cancel'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilMailingListsGUI.php

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

示例13: initQuestionForm

 protected function initQuestionForm($a_read_only = false)
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this, "saveQuestion"));
     $form->setTitle($lng->txt("obj_poll"));
     $question = new ilTextAreaInputGUI($lng->txt("poll_question"), "question");
     $question->setRequired(true);
     $question->setCols(40);
     $question->setRows(2);
     $question->setValue($this->object->getQuestion());
     $question->setDisabled($a_read_only);
     $form->addItem($question);
     $dimensions = " (" . ilObjPoll::getImageSize() . "px)";
     $img = new ilImageFileInputGUI($lng->txt("poll_image") . $dimensions, "image");
     $img->setDisabled($a_read_only);
     $form->addItem($img);
     // show existing file
     $file = $this->object->getImageFullPath(true);
     if ($file) {
         $img->setImage($file);
     }
     $anonymous = new ilRadioGroupInputGUI($lng->txt("poll_mode"), "mode");
     $anonymous->setRequired(true);
     $option = new ilRadioOption($lng->txt("poll_mode_anonymous"), 0);
     $option->setInfo($lng->txt("poll_mode_anonymous_info"));
     $anonymous->addOption($option);
     $option = new ilRadioOption($lng->txt("poll_mode_personal"), 1);
     $option->setInfo($lng->txt("poll_mode_personal_info"));
     $anonymous->addOption($option);
     $anonymous->setValue($this->object->getNonAnonymous());
     $anonymous->setDisabled($a_read_only);
     $form->addItem($anonymous);
     $nanswers = new ilNumberInputGUI($lng->txt("poll_max_number_of_answers"), "nanswers");
     $nanswers->setRequired(true);
     $nanswers->setMinValue(1);
     $nanswers->setSize(3);
     $nanswers->setValue($this->object->getMaxNumberOfAnswers());
     $nanswers->setDisabled($a_read_only);
     $form->addItem($nanswers);
     $answers = new ilTextInputGUI($lng->txt("poll_answers"), "answers");
     $answers->setRequired(true);
     $answers->setMulti(true, true);
     $answers->setDisabled($a_read_only);
     $form->addItem($answers);
     $multi_answers = array();
     foreach ($this->object->getAnswers() as $idx => $item) {
         if (!$idx) {
             $answers->setValue($item["answer"]);
         }
         $multi_answers[] = $item["answer"];
     }
     $answers->setMultiValues($multi_answers);
     if (!$a_read_only) {
         $form->addCommandButton("saveQuestion", $lng->txt("save"));
     }
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:59,代码来源:class.ilObjPollGUI.php

示例14: certificateEditor


//.........这里部分代码省略.........
         $pageformat->checkInput();
     }
     $form->addItem($pageformat);
     $bgimage = new ilImageFileInputGUI($this->lng->txt("certificate_background_image"), "background");
     $bgimage->setRequired(FALSE);
     $bgimage->setUseCache(false);
     if (count($_POST)) {
         // handle the background upload
         if (strlen($_FILES["background"]["tmp_name"])) {
             if ($bgimage->checkInput()) {
                 $result = $this->object->uploadBackgroundImage($_FILES["background"]["tmp_name"]);
                 if ($result == FALSE) {
                     $bgimage->setAlert($this->lng->txt("certificate_error_upload_bgimage"));
                 }
             }
         }
     }
     if (!$this->object->hasBackgroundImage()) {
         include_once "./Services/Certificate/classes/class.ilObjCertificateSettingsAccess.php";
         if (ilObjCertificateSettingsAccess::hasBackgroundImage()) {
             $bgimage->setImage(ilObjCertificateSettingsAccess::getBackgroundImageThumbPathWeb());
         }
     } else {
         $bgimage->setImage($this->object->getBackgroundImageThumbPathWeb());
     }
     $form->addItem($bgimage);
     $padding_top = new ilTextInputGUI($this->lng->txt("certificate_padding_top"), "padding_top");
     $padding_top->setRequired(TRUE);
     $padding_top->setValue($form_fields["padding_top"]);
     $padding_top->setSize(6);
     $padding_top->setValidationRegexp("/[0123456789\\.](cm|mm|in|pt|pc|px|em)/is");
     $padding_top->setInfo($this->lng->txt("certificate_unit_description"));
     if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
         $padding_top->checkInput();
     }
     $form->addItem($padding_top);
     $rect = new ilCSSRectInputGUI($this->lng->txt("certificate_margin_body"), "margin_body");
     $rect->setRequired(TRUE);
     $rect->setUseUnits(TRUE);
     $rect->setTop($form_fields["margin_body_top"]);
     $rect->setBottom($form_fields["margin_body_bottom"]);
     $rect->setLeft($form_fields["margin_body_left"]);
     $rect->setRight($form_fields["margin_body_right"]);
     $rect->setInfo($this->lng->txt("certificate_unit_description"));
     if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
         $rect->checkInput();
     }
     $form->addItem($rect);
     $certificate = new ilTextAreaInputGUI($this->lng->txt("certificate_text"), "certificate_text");
     $certificate->removePlugin('ilimgupload');
     $certificate->setValue($form_fields["certificate_text"]);
     $certificate->setRequired(TRUE);
     $certificate->setRows(20);
     $certificate->setCols(80);
     // fraunhpatch start
     $common_desc_tpl = new ilTemplate("tpl.common_desc.html", true, true, "Services/Certificate");
     foreach (ilCertificate::getCustomCertificateFields() as $f) {
         $common_desc_tpl->setCurrentBlock("cert_field");
         $common_desc_tpl->setVariable("PH", $f["ph"]);
         $common_desc_tpl->setVariable("PH_TXT", $f["name"]);
         $common_desc_tpl->parseCurrentBlock();
     }
     $common_desc = $common_desc_tpl->get();
     // fraunhpatch start
     $certificate->setInfo($this->object->getAdapter()->getCertificateVariablesDescription() . $common_desc);
     $certificate->setUseRte(TRUE, '3.4.7');
     $tags = array("br", "em", "font", "li", "ol", "p", "span", "strong", "u", "ul");
     $certificate->setRteTags($tags);
     if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
         $certificate->checkInput();
     }
     $form->addItem($certificate);
     $this->object->getAdapter()->addAdditionalFormElements($form, $form_fields);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         if ($this->object->isComplete() || $this->object->hasBackgroundImage()) {
             $form->addCommandButton("certificatePreview", $this->lng->txt("certificate_preview"));
             $form->addCommandButton("certificateExportFO", $this->lng->txt("certificate_export"));
             $form->addCommandButton("certificateDelete", $this->lng->txt("delete"));
         }
         $form->addCommandButton("certificateSave", $this->lng->txt("save"));
     }
     $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
     if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
         if ($_POST["background_delete"]) {
             $this->object->deleteBackgroundImage();
         }
         if ($form->checkInput()) {
             try {
                 $xslfo = $this->object->processXHTML2FO($form_fields);
                 $this->object->getAdapter()->saveFormFields($form_fields);
                 $this->object->saveCertificate($xslfo);
                 $this->object->writeActive($form_fields["active"]);
                 ilUtil::sendSuccess($this->lng->txt("saved_successfully"), TRUE);
                 $this->ctrl->redirect($this, "certificateEditor");
             } catch (Exception $e) {
                 ilUtil::sendFailure($e->getMessage());
             }
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilCertificateGUI.php

示例15: buildFeedbackContentFormProperty

 /**
  * builds and returns a form property gui object with the given label and postvar
  * that is addable to property forms
  * depending on the given flag "asNonEditable" it returns a ...
  * - non editable gui
  * - textarea input gui
  * 
  * @final
  * @access protected
  * @param string $label
  * @param string $postVar
  * @param boolean $asNonEditable
  * @return ilTextAreaInputGUI|ilNonEditableValueGUI $formProperty
  */
 protected final function buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
 {
     if ($asNonEditable) {
         require_once 'Services/Form/classes/class.ilNonEditableValueGUI.php';
         $property = new ilNonEditableValueGUI($label, $postVar, true);
     } else {
         require_once 'Services/Form/classes/class.ilTextAreaInputGUI.php';
         require_once 'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
         $property = new ilTextAreaInputGUI($label, $postVar);
         $property->setRequired(false);
         $property->setRows(10);
         $property->setCols(80);
         if (!$this->questionOBJ->getPreventRteUsage()) {
             $property->setUseRte(true);
             $property->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
             $property->addPlugin("latex");
             $property->addButton("latex");
             $property->addButton("pastelatex");
         }
         $property->setRTESupport($this->questionOBJ->getId(), "qpl", "assessment");
     }
     return $property;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilAssQuestionFeedback.php


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