本文整理汇总了PHP中ilTextInputGUI类的典型用法代码示例。如果您正苦于以下问题:PHP ilTextInputGUI类的具体用法?PHP ilTextInputGUI怎么用?PHP ilTextInputGUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilTextInputGUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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());
}
示例2: initForm
/**
* Init form.
*
* @param string $a_mode edit mode
*/
public function initForm($a_mode = "edit")
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(200);
$ti->setSize(50);
$ti->setRequired(true);
$this->form->addItem($ti);
// order nr
$ni = new ilNumberInputGUI($lng->txt("skmg_order_nr"), "order_nr");
$ni->setMaxLength(6);
$ni->setSize(6);
$ni->setRequired(true);
$this->form->addItem($ni);
// save and cancel commands
if ($a_mode == "create") {
$this->form->addCommandButton("save", $lng->txt("save"));
$this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("skmg_create_skll"));
} else {
$this->form->addCommandButton("update", $lng->txt("save"));
$this->form->setTitle($lng->txt("skmg_edit_skll"));
}
$ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$this->form->setFormAction($ilCtrl->getFormAction($this));
}
示例3: 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"));
}
示例4: 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);
}
示例5: showTrustees
public function showTrustees($a_show_delete = false)
{
global $ilToolbar;
$_SESSION['paya_delete_trustee'] = $_SESSION['paya_delete_trustee'] ? $_SESSION['paya_delete_trustee'] : array();
$actions = array(0 => $this->lng->txt("paya_disabled"), 1 => $this->lng->txt("paya_enabled"));
include_once "./Services/Form/classes/class.ilTextInputGUI.php";
$ul = new ilTextInputGUI($this->lng->txt("user"), "search_str");
$ul->setDataSource($this->ctrl->getLinkTarget($this, "performSearch", "", true));
$ul->setSize(20);
$ilToolbar->addInputItem($ul, true);
$ilToolbar->addFormButton($this->lng->txt("add"), "performSearch");
$ilToolbar->setFormAction($this->ctrl->getFormAction($this));
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
if ($a_show_delete) {
$oConfirmationGUI = new ilConfirmationGUI();
// set confirm/cancel commands
$oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, "performDeleteTrustee"));
$oConfirmationGUI->setHeaderText($this->lng->txt("paya_sure_delete_selected_trustees"));
$oConfirmationGUI->setCancel($this->lng->txt("cancel"), "cancelDelete");
$oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "performDeleteTrustee");
foreach ($this->trustee_obj->getTrustees() as $trustee) {
$delete_row = '';
if (in_array($trustee['trustee_id'], $_POST['trustee'])) {
if ($tmp_obj = ilObjectFactory::getInstanceByObjId($trustee['trustee_id'], false)) {
$delete_row = $tmp_obj->getLogin() . ' -> ' . $tmp_obj->getFirstname() . ' ' . $tmp_obj->getLastname();
}
}
$oConfirmationGUI->addItem('', $delete_row, $delete_row);
}
$this->tpl->setVariable("CONFIRMATION", $oConfirmationGUI->getHTML());
}
if (!count($this->trustee_obj->getTrustees())) {
ilUtil::sendInfo($this->lng->txt('paya_no_trustees'));
return true;
}
$counter = 0;
$f_result = array();
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
foreach ($this->trustee_obj->getTrustees() as $trustee) {
// GET USER OBJ
if ($tmp_obj = ilObjectFactory::getInstanceByObjId($trustee['trustee_id'], false)) {
$f_result[$counter]['trustee_id'] = ilUtil::formCheckbox(in_array($trustee['trustee_id'], $_SESSION['paya_delete_trustee']) ? 1 : 0, "trustee[]", $trustee['trustee_id']);
$f_result[$counter]['login'] = $tmp_obj->getLogin();
$f_result[$counter]['firstname'] = $tmp_obj->getFirstname();
$f_result[$counter]['lastname'] = $tmp_obj->getLastname();
$f_result[$counter]['perm_stat'] = ilUtil::formSelect((int) $trustee['perm_stat'], 'perm_stat[' . $trustee['trustee_id'] . ']', $actions, false, true);
$f_result[$counter]['perm_obj'] = ilUtil::formSelect((int) $trustee['perm_obj'], 'perm_obj[' . $trustee['trustee_id'] . ']', $actions, false, true);
$f_result[$counter]['perm_coupons'] = ilUtil::formSelect((int) $trustee['perm_coupons'], 'perm_coupons[' . $trustee['trustee_id'] . ']', $actions, false, true);
# $link_mail = "<a target=\"_blank\" href=\"./ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".
# $tmp_obj->getLogin()."\"".$img_mail."</a>";
$url_mail = ilMailFormCall::getLinkTarget($this, '', array(), array('type' => 'new', 'rcp_to' => $tmp_obj->getLogin()));
$link_mail = "<div class=\"il_ContainerItemCommands\"><a class=\"il_ContainerItemCommand\" href=\"" . $url_mail . "\">" . $this->lng->txt("mail") . "</a></div>";
$f_result[$counter]['options'] = $link_mail;
unset($tmp_obj);
++$counter;
}
}
return $this->__showTrusteesTable($f_result);
}
示例6: addToForm
public function addToForm()
{
$text = new ilTextInputGUI($this->getTitle(), $this->getElementId());
$text->setMulti(true);
$this->addBasicFieldProperties($text, $this->getADT()->getCopyOfDefinition());
$text->setValue($this->getADT()->getTextElements());
$this->addToParentElement($text);
}
示例7: initForm
protected function initForm()
{
$this->setTitle($this->lng->txt('admin_form_title'));
$te = new ilTextInputGUI($this->lng->txt('admin_origins_path'), 'path');
$te->setInfo($this->lng->txt('admin_origins_path_info'));
$this->addItem($te);
$this->addCommandButtons();
}
示例8: initFilter
/**
* Initialize the table filters.
*
* This method is called internally to initialize
* the filters from present on the top of the table.
*/
public function initFilter()
{
include_once 'Services/Form/classes/class.ilTextInputGUI.php';
$tname = new ilTextInputGUI($this->lng->txt('rep_robj_xtov_test_list_flt_tst_name'), 'flt_tst_name');
$tname->setSubmitFormOnEnter(true);
$this->addFilterItem($tname);
$tname->readFromSession();
$this->filter['flt_tst_name'] = $tname->getValue();
}
示例9: initConfigurationForm
/**
* Init configuration form.
*
* @return object form object
*/
public function initConfigurationForm()
{
global $lng, $ilCtrl, $ilDB;
$pl = $this->getPluginObject();
$this->getPluginObject()->includeClass('class.ilOpenmeetingsConfig.php');
$this->object = ilOpenmeetingsConfig::getInstance();
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
$this->form->setTitle($pl->txt("openmeetings_plugin_configuration"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->addCommandButton("save", $lng->txt("save"));
// url (text)
$ti = new ilTextInputGUI($pl->txt("url"), "frmurl");
$ti->setRequired(true);
$ti->setMaxLength(256);
$ti->setSize(60);
$this->form->addItem($ti);
// port (text)
$ti = new ilTextInputGUI($pl->txt("port"), "frmport");
$ti->setRequired(true);
$ti->setMaxLength(10);
$ti->setSize(10);
$this->form->addItem($ti);
// appname
$ti = new ilTextInputGUI($pl->txt("appname"), "frmappname");
$ti->setRequired(true);
$ti->setMaxLength(32);
$ti->setSize(20);
$this->form->addItem($ti);
// username (text)
$ti = new ilTextInputGUI($pl->txt("username"), "frmusername");
$ti->setRequired(true);
$ti->setMaxLength(256);
$ti->setSize(20);
$this->form->addItem($ti);
// password (text)
$ti = new ilPasswordInputGUI($pl->txt("password"), "frmpassword");
$ti->setRequired(true);
$ti->setMaxLength(256);
$ti->setSize(20);
$ti->setRetype(false);
$this->form->addItem($ti);
foreach ($this->fields as $key => $item) {
$field = new $item["type"]($this->plugin_object->txt('conf_' . $key), $key);
$field->setInfo($this->plugin_object->txt($item["info"]));
if (is_array($item["subelements"])) {
foreach ($item["subelements"] as $subkey => $subitem) {
$subfield = new $subitem["type"]($this->plugin_object->txt('conf_' . $key . "_" . $subkey), $subkey);
$subfield->setInfo($this->plugin_object->txt($subitem["info"]));
$field->addSubItem($subfield);
}
}
$this->form->addItem($field);
}
return $this->form;
}
示例10: 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');
}
示例11: initFilter
/**
* Init filter
*/
function initFilter()
{
global $lng, $rbacreview, $ilUser;
// title
include_once "./Services/Form/classes/class.ilTextInputGUI.php";
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(64);
$ti->setSize(20);
$ti->setValidationRegexp('/^[^%]+$/is');
$this->addFilterItem($ti);
$ti->readFromSession();
$this->filter["title"] = $ti->getValue();
}
示例12: 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());
}
}
示例13: create
/**
* structure / page object creation form
*/
function create()
{
$new_type = $_REQUEST["new_type"];
$this->ctrl->setParameter($this, "new_type", $new_type);
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, "save"));
$form->setTitle($this->lng->txt($new_type . "_new"));
$title = new ilTextInputGUI($this->lng->txt("title"), "Fobject[title]");
$title->setRequired(true);
$form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject[desc]");
$form->addItem($desc);
$form->addCommandButton("save", $this->lng->txt($new_type . "_add"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
$this->tpl->setContent($form->getHTML());
}
示例14: initPluginCreationFormSection
/**
* @param ilRadioOption $option
*/
public function initPluginCreationFormSection(ilRadioOption $option)
{
// $option->setInfo($this->txt('create_info1') . '</br>' . $this->txt('create_info2') . $this->getAdminConfigObject()->getAppName()
// . $this->txt('create_info3'));
$sub_selection = new ilRadioGroupInputGUI($this->txt(self::F_BASE_FOLDER), self::F_BASE_FOLDER);
$sub_selection->setRequired(true);
$option_default = new ilRadioOption($this->txt(self::F_DEFAULT_BASE_FOLDER), self::F_DEFAULT_BASE_FOLDER);
$option_custom = new ilRadioOption($this->txt('custom_base_folder'), self::F_CUSTOM_FOLDER_SELECTION);
$custom_base_folder_input = new ilTextInputGUI($this->txt(self::F_CUSTOM_BASE_FOLDER_INPUT), self::F_CUSTOM_BASE_FOLDER_INPUT);
$custom_base_folder_input->setRequired(true);
$custom_base_folder_input->setInfo($this->txt('custom_base_folder_input_info'));
$option_custom->addSubItem($custom_base_folder_input);
$sub_selection->addOption($option_default);
$sub_selection->addOption($option_custom);
$sub_selection->setValue(self::F_DEFAULT_BASE_FOLDER);
$option->addSubItem($sub_selection);
}
示例15: initFormRoleTemplate
/**
* Init create form
* @param bool creation mode
* @return ilPropertyFormGUI $form
*/
protected function initFormRoleTemplate($a_mode = self::FORM_MODE_CREATE)
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
if ($this->creation_mode) {
$this->ctrl->setParameter($this, "new_type", 'rolt');
}
$form->setFormAction($this->ctrl->getFormAction($this));
if ($a_mode == self::FORM_MODE_CREATE) {
$form->setTitle($this->lng->txt('rolt_new'));
$form->addCommandButton('save', $this->lng->txt('rolt_new'));
} else {
$form->setTitle($this->lng->txt('rolt_edit'));
$form->addCommandButton('update', $this->lng->txt('save'));
}
$form->addCommandButton('cancel', $this->lng->txt('cancel'));
$title = new ilTextInputGUI($this->lng->txt('title'), 'title');
if ($a_mode != self::FORM_MODE_CREATE) {
if ($this->object->isInternalTemplate()) {
$title->setDisabled(true);
}
$title->setValue($this->object->getTitle());
}
$title->setSize(40);
$title->setMaxLength(70);
$title->setRequired(true);
$form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
if ($a_mode != self::FORM_MODE_CREATE) {
$desc->setValue($this->object->getDescription());
}
$desc->setCols(40);
$desc->setRows(3);
$form->addItem($desc);
if ($a_mode != self::FORM_MODE_CREATE) {
$ilias_id = new ilNonEditableValueGUI($this->lng->txt("ilias_id"), "ilias_id");
$ilias_id->setValue('il_' . IL_INST_ID . '_' . ilObject::_lookupType($this->object->getId()) . '_' . $this->object->getId());
$form->addItem($ilias_id);
}
$pro = new ilCheckboxInputGUI($this->lng->txt('role_protect_permissions'), 'protected');
$pro->setChecked($GLOBALS['rbacreview']->isProtected($this->rolf_ref_id, $this->object->getId()));
$pro->setValue(1);
$form->addItem($pro);
return $form;
}