/**
  * 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());
 }
 /**
  * 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));
 }
 /**
  * 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"));
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
 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);
 }
Ejemplo n.º 7
0
 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();
 }
 /**
  *	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();
 }
 /**
  * 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;
 }
 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');
 }
 public function setValueByArray($value)
 {
     parent::setValueByArray($value);
     include_once './Services/Tree/classes/class.ilPathGUI.php';
     $path = new ilPathGUI();
     $reference = $value[$this->getPostVar()];
     if ($reference) {
         $pathString = $path->getPath(ROOT_FOLDER_ID, $reference);
         $id = ilObject::_lookupObjId($reference);
         $this->title_input->setValue($pathString . " > " . ilObject::_lookupTitle($id));
         $this->hidden_input->setValue($reference);
     }
 }
 /**
  * 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();
 }
Ejemplo n.º 13
0
 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());
     }
 }
 /**
  * Constructor
  *
  * @param	string	$a_title	Title
  * @param	string	$a_postvar	Post Variable
  */
 function __construct($a_title = "", $a_postvar = "")
 {
     parent::__construct($a_title, $a_postvar);
     $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
     $this->setSize('25');
     $this->validationRegexp = "";
 }
Ejemplo n.º 15
0
 /**
  * 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());
 }
 /**
  * @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);
 }
Ejemplo n.º 17
0
 /**
  * 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;
 }
 /**
  * Constructor
  *
  * @param	string	$a_title	Title
  * @param	string	$a_postvar	Post Variable
  * 
  * @return \ilMatchingWizardInputGUI
  */
 function __construct($a_title = "", $a_postvar = "")
 {
     global $lng;
     parent::__construct($a_title, $a_postvar);
     $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
     $this->setSize('50');
     $this->text_name = $lng->txt('answer_text');
     $this->image_name = $lng->txt('answer_image');
 }
 /**
  * Constructor
  *
  * @param	string	$a_title	Title
  * @param	string	$a_postvar	Post Variable
  */
 function __construct($a_title = "", $a_postvar = "")
 {
     parent::__construct($a_title, $a_postvar);
     global $lng;
     $this->show_wizard = false;
     $this->show_save_phrase = false;
     $this->categorytext = $lng->txt('row_text');
     $this->use_other_answer = false;
 }
 /**
  * Init  form.
  *
  * @param        int $a_mode        Edit Mode
  */
 public function initCreateFolder()
 {
     global $ilCtrl, $lng;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setId("cld_create_folder");
     $name = new ilTextInputGUI($lng->txt("cld_folder_name"), "folder_name");
     $name->setRequired(true);
     $this->form->addItem($name);
     // folder id
     $id = new ilHiddenInputGUI("parent_folder_id");
     $id->setValue($_POST["id"]);
     $this->form->addItem($id);
     $this->form->addCommandButton("createFolder", $lng->txt("cld_create_folder"));
     $this->form->addCommandButton("cancel", $lng->txt("cancel"));
     $this->form->setTitle($lng->txt("cld_create_folder"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
     $this->form->setTarget("cld_blank_target");
 }
 /**
  * set value
  *
  * @access public
  * @param string $a_value color hexcode 
  * @return
  */
 public function setValue($a_value)
 {
     $a_value = trim($a_value);
     if ($this->getAcceptNamedColors() && substr($a_value, 0, 1) == "!") {
         parent::setValue($a_value);
     } else {
         $this->hex = ilColorPickerInputGUI::determineHexcode($a_value);
         parent::setValue($this->getHexcode());
     }
 }
 /**
  * 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 1 (a checkbox)
     $cb = new ilCheckboxInputGUI($pl->txt("setting_1"), "setting_1");
     $form->addItem($cb);
     // setting 2 (text)
     $ti = new ilTextInputGUI($pl->txt("setting_2"), "setting_2");
     $ti->setRequired(true);
     $ti->setMaxLength(10);
     $ti->setSize(10);
     $form->addItem($ti);
     $form->addCommandButton("save", $lng->txt("save"));
     $form->setTitle($pl->txt("example_plugin_configuration"));
     $form->setFormAction($ilCtrl->getFormAction($this));
     return $form;
 }
 /**
  * Init filter
  */
 public function initFilter()
 {
     global $lng;
     $this->setDisableFilterHiding(true);
     // object type selection
     include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
     $si = new ilSelectInputGUI($lng->txt("obj_type"), "type");
     $si->setOptions($this->getPossibleTypes(true, false, true));
     $this->addFilterItem($si);
     $si->readFromSession();
     if (!$si->getValue()) {
         $si->setValue("crs");
     }
     $this->filter["type"] = $si->getValue();
     // title/description
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $ti = new ilTextInputGUI($lng->txt("trac_title_description"), "query");
     $ti->setMaxLength(64);
     $ti->setSize(20);
     $this->addFilterItem($ti);
     $ti->readFromSession();
     $this->filter["query"] = $ti->getValue();
     // read_count/spent_seconds
     $si = new ilSelectInputGUI($lng->txt("trac_figure"), "figure");
     $si->setOptions(array("read_count" => $lng->txt("trac_read_count"), "spent_seconds" => $lng->txt("trac_spent_seconds")));
     $this->addFilterItem($si);
     $si->readFromSession();
     if (!$si->getValue()) {
         $si->setValue("read_count");
     }
     $this->filter["measure"] = $si->getValue();
     // year/month
     $si = new ilSelectInputGUI($lng->txt("year") . " / " . $lng->txt("month"), "yearmonth");
     $si->setOptions($this->getMonthsFilter());
     $this->addFilterItem($si);
     $si->readFromSession();
     if (!$si->getValue()) {
         $si->setValue(date("Y-m"));
     }
     $this->filter["yearmonth"] = $si->getValue();
 }
 /**
  * @param ilRadioOption $option
  * @throws ilCloudPluginConfigException
  */
 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), "dropbox_base_folder");
     $sub_selection->setRequired(true);
     $option_default = new ilRadioOption($this->txt("default_base_folder"), self::F_DROPBOX_DEFAULT_BASE_FOLDER);
     $option_custom = new ilRadioOption($this->txt("custom_base_folder"), self::F_DROPBOX_CUSTOM_FOLDER_SELECTION);
     $custom_base_folder_input = new ilTextInputGUI($this->txt("custom_base_folder_input"), self::F_DROPBOX_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_DROPBOX_DEFAULT_BASE_FOLDER);
     $option->addSubItem($sub_selection);
     $sub_selection2 = new ilCheckboxInputGUI($this->txt(self::F_ONLINE), self::F_ONLINE);
     if ($this->getAdminConfigObject()->getValue('config_default_online')) {
         $sub_selection2->setChecked(true);
     }
     $option->addSubItem($sub_selection2);
 }
 /**
  * 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;
 }
 /**
  * Constructor
  *
  * @param	string	$a_title	Title
  * @param	string	$a_postvar	Post Variable
  */
 function __construct($a_title, $a_postvar, $a_class, $a_autocomplete_cmd)
 {
     global $ilCtrl;
     if (is_object($a_class)) {
         $a_class = get_class($a_class);
     }
     $a_class = strtolower($a_class);
     parent::__construct($a_title, $a_postvar);
     $this->setInputType("raci");
     $this->setMaxLength(70);
     $this->setSize(30);
     $this->setDataSource($ilCtrl->getLinkTargetByClass($a_class, $a_autocomplete_cmd, "", true));
 }
 public function addToForm()
 {
     $text = new ilTextInputGUI($this->getTitle(), $this->getElementId());
     $text->setSize(20);
     $text->setMaxLength(512);
     $text->setSubmitFormOnEnter(true);
     $text->setValue($this->getADT()->getText());
     $this->addToParentElement($text);
 }
Ejemplo n.º 28
0
 public function showTopicForm()
 {
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     if ($this->objCurrentTopic->getId()) {
         $this->ctrl->setParameter($this, 'topic_id', $this->objCurrentTopic->getId());
     }
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveTopic'));
     $form->setTitle($this->lng->txt($this->objCurrentTopic->getId() ? 'edit_topic' : 'new_topic'));
     $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $title->setValue($this->objCurrentTopic->getTitle());
     $title->setRequired(true);
     $form->addItem($title);
     $sorting = new ilTextInputGUI($this->lng->txt('pay_sorting_value'), 'sorting');
     $sorting->setValue($this->objCurrentTopic->getSorting());
     $sorting->setMaxLength(11);
     $sorting->setSize(11);
     $form->addItem($sorting);
     $form->addCommandButton('saveTopic', $this->lng->txt('save'));
     $form->addCommandButton('showTopicsList', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $form->getHTML());
     return true;
 }
Ejemplo n.º 29
0
 public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
 {
     global $lng;
     $lng->loadLanguageModule("file");
     require_once 'Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php';
     $disk_quota_obj = ilObjDiskQuotaSettings::getInstance();
     // Enable disk quota reminder mail
     $cb_prop_reminder = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_reminder_mail"), "enable_disk_quota_reminder_mail");
     $cb_prop_reminder->setValue('1');
     $cb_prop_reminder->setChecked($disk_quota_obj->isDiskQuotaReminderMailEnabled());
     $cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
     $a_form->addItem($cb_prop_reminder);
     // Enable summary mail for certain users
     $cb_prop_summary = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_summary_mail"), "enable_disk_quota_summary_mail");
     $cb_prop_summary->setValue(1);
     $cb_prop_summary->setChecked($disk_quota_obj->isDiskQuotaSummaryMailEnabled());
     $cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
     $a_form->addItem($cb_prop_summary);
     // Edit disk quota recipients
     $summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
     $summary_rcpt->setValue($disk_quota_obj->getSummaryRecipients());
     $summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
     $cb_prop_summary->addSubItem($summary_rcpt);
 }
 /**
  * Init filter
  */
 function initFilter()
 {
     global $lng, $rbacreview, $ilUser, $ilDB;
     // term
     include_once "./Services/Form/classes/class.ilTextInputGUI.php";
     $ti = new ilTextInputGUI($lng->txt("cont_term"), "term");
     $ti->setMaxLength(64);
     $ti->setSize(20);
     $ti->setSubmitFormOnEnter(true);
     $this->addFilterItem($ti);
     $ti->readFromSession();
     $this->filter["term"] = $ti->getValue();
     // definition
     if ($ilDB->getDBType() != "oracle") {
         include_once "./Services/Form/classes/class.ilTextInputGUI.php";
         $ti = new ilTextInputGUI($lng->txt("cont_definition"), "defintion");
         $ti->setMaxLength(64);
         $ti->setSize(20);
         $ti->setSubmitFormOnEnter(true);
         $this->addFilterItem($ti);
         $ti->readFromSession();
         $this->filter["definition"] = $ti->getValue();
     }
 }