本文整理汇总了PHP中ilPropertyFormGUI::setTableWidth方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setTableWidth方法的具体用法?PHP ilPropertyFormGUI::setTableWidth怎么用?PHP ilPropertyFormGUI::setTableWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::setTableWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editQuestion
/**
* Creates an output of the edit form for the question
*
* @param bool $checkonly
*
* @return bool
*/
public function editQuestion($checkonly = FALSE)
{
$save = $this->isSaveCommand();
$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(TRUE);
$form->setTableWidth("100%");
$form->setId("assnumeric");
$this->addBasicQuestionFormProperties($form);
$this->populateQuestionSpecificFormPart($form);
$this->populateAnswerSpecificFormPart($form);
$this->populateTaxonomyFormSection($form);
$this->addQuestionFormCommandButtons($form);
$errors = false;
if ($save) {
$form->setValuesByPost();
$errors = !$form->checkInput();
$form->setValuesByPost();
// again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
if ($errors) {
$checkonly = false;
}
}
if (!$checkonly) {
$this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
}
return $errors;
}
示例2: initUploadForm
public function initUploadForm()
{
global $ilCtrl, $lng;
include_once "./Services/Form/classes/class.ilDragDropFileInputGUI.php";
include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
$this->form = new ilPropertyFormGUI();
$this->form->setId("upload");
$this->form->setMultipart(true);
$this->form->setHideLabels();
$file = new ilDragDropFileInputGUI($lng->txt("cld_upload_flies"), "upload_files");
$file->setRequired(true);
$this->form->addItem($file);
$this->form->addCommandButton("uploadFiles", $lng->txt("upload"));
$this->form->addCommandButton("cancelAll", $lng->txt("cancel"));
$this->form->setTableWidth("100%");
$this->form->setTitle($lng->txt("upload_files_title"));
$this->form->setTitleIcon(ilUtil::getImagePath('icon_file.gif'), $lng->txt('obj_file'));
$this->form->setTitle($lng->txt("upload_files"));
$this->form->setFormAction($ilCtrl->getFormAction($this, "uploadFiles"));
$this->form->setTarget("cld_blank_target");
}
示例3: _initForm
/**
* Init Social Bookmark edit/create Form
*
* @param ilObjectGUI $formhandlerObject taken as form target
* @param int $mode "create" / "edit"
*/
public static function _initForm($formhandlerObject, $mode = "create", $id = 0)
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setMultipart(true);
// File Title
$in_title = new ilTextInputGUI($lng->txt("title"), "title");
$in_title->setMaxLength(128);
$in_title->setSize(40);
$in_title->setRequired(true);
$form->addItem($in_title);
// Link
$in_link = new ilTextInputGUI($lng->txt("link"), "link");
$in_link->setMaxLength(300);
$in_link->setSize(40);
$in_link->setRequired(true);
$in_link->setInfo($lng->txt('socialbm_link_description'));
$form->addItem($in_link);
// File
$in_file = new ilFileInputGUI($lng->txt("file"), "image_file");
$in_file->setSuffixes(array('bmp', 'gif', 'jpg', 'jpeg', 'png'));
$form->addItem($in_file);
// Activate on submit
$in_activate = new ilCheckboxInputGUI($lng->txt("activate"), "activate");
$in_activate->setValue('1');
$form->addItem($in_activate);
// save and cancel commands
if ($mode == "create") {
$form->addCommandButton("createSocialBookmark", $lng->txt("create"));
$form->addCommandButton("editSocialBookmarks", $lng->txt("cancel"));
$form->setTitle($lng->txt("adm_social_bm_create"));
$in_file->setRequired(true);
} else {
if ($mode == "update") {
$in_hidden = new ilHiddenInputGUI("sbm_id", $id);
$form->addItem($in_hidden);
$form->addCommandButton("updateSocialBookmark", $lng->txt("update"));
$form->addCommandButton("cancel", $lng->txt("cancel"));
$form->setTitle($lng->txt("adm_social_bm_edit"));
$in_file->setRequired(false);
}
}
$form->setTableWidth("60%");
$form->setFormAction($ilCtrl->getFormAction($formhandlerObject));
return $form;
}
示例4: editQuestion
/**
* Creates an output of the edit form for the question
*
* @param bool $checkonly
*
* @return bool
*/
public function editQuestion($checkonly = FALSE)
{
$save = $this->isSaveCommand();
$this->getQuestionTemplate();
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->outQuestionType());
$isSingleline = $this->object->lastChange == 0 && !array_key_exists('types', $_POST) ? $this->object->getMultilineAnswerSetting() ? false : true : $this->object->isSingleline;
if ($checkonly) {
$isSingleline = $_POST['types'] == 0 ? true : false;
}
if ($isSingleline) {
$form->setMultipart(TRUE);
} else {
$form->setMultipart(FALSE);
}
$form->setTableWidth("100%");
$form->setId("assmultiplechoice");
// title, author, description, question, working time (assessment mode)
$this->addBasicQuestionFormProperties($form);
$this->populateQuestionSpecificFormPart($form);
$this->populateAnswerSpecificFormPart($form);
$this->populateTaxonomyFormSection($form);
$this->addQuestionFormCommandButtons($form);
$errors = false;
if ($save) {
$form->setValuesByPost();
$errors = !$form->checkInput();
$form->setValuesByPost();
// again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
if ($errors) {
$checkonly = false;
}
}
if (!$checkonly) {
$this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
}
return $errors;
}
示例5: certificateEditor
/**
* Shows the certificate editor for ILIAS tests
*/
public function certificateEditor()
{
global $ilAccess;
$form_fields = array();
if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
$form_fields = $this->getFormFieldsFromPOST();
} else {
$form_fields = $this->getFormFieldsFromFO();
}
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setPreventDoubleSubmission(false);
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("certificate_edit"));
$form->setMultipart(TRUE);
$form->setTableWidth("100%");
$form->setId("certificate");
$active = new ilCheckboxInputGUI($this->lng->txt("active"), "active");
$active->setChecked($form_fields["active"]);
$form->addItem($active);
$import = new ilFileInputGUI($this->lng->txt("import"), "certificate_import");
$import->setRequired(FALSE);
$import->setSuffixes(array("zip"));
// handle the certificate import
if (strlen($_FILES["certificate_import"]["tmp_name"])) {
if ($import->checkInput()) {
$result = $this->object->importCertificate($_FILES["certificate_import"]["tmp_name"], $_FILES["certificate_import"]["name"]);
if ($result == FALSE) {
$import->setAlert($this->lng->txt("certificate_error_import"));
} else {
$this->ctrl->redirect($this, "certificateEditor");
}
}
}
$form->addItem($import);
$pageformat = new ilRadioGroupInputGUI($this->lng->txt("certificate_page_format"), "pageformat");
$pageformats = $this->object->getPageFormats();
$pageformat->setValue($form_fields["pageformat"]);
foreach ($pageformats as $format) {
$option = new ilRadioOption($format["name"], $format["value"]);
if (strcmp($format["value"], "custom") == 0) {
$pageheight = new ilTextInputGUI($this->lng->txt("certificate_pageheight"), "pageheight");
$pageheight->setValue($form_fields["pageheight"]);
$pageheight->setSize(6);
$pageheight->setValidationRegexp("/[0123456789\\.](cm|mm|in|pt|pc|px|em)/is");
$pageheight->setInfo($this->lng->txt("certificate_unit_description"));
$pageheight->setRequired(true);
$option->addSubitem($pageheight);
$pagewidth = new ilTextInputGUI($this->lng->txt("certificate_pagewidth"), "pagewidth");
$pagewidth->setValue($form_fields["pagewidth"]);
$pagewidth->setSize(6);
$pagewidth->setValidationRegexp("/[0123456789\\.](cm|mm|in|pt|pc|px|em)/is");
$pagewidth->setInfo($this->lng->txt("certificate_unit_description"));
$pagewidth->setRequired(true);
$option->addSubitem($pagewidth);
}
$pageformat->addOption($option);
}
$pageformat->setRequired(true);
if (strcmp($this->ctrl->getCmd(), "certificateSave") == 0) {
$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");
//.........这里部分代码省略.........
示例6: editQuestion
/**
* Creates an output of the edit form for the question
*
* @access public
*/
public function editQuestion($checkonly = FALSE)
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt($this->getQuestionType()));
$form->setMultipart(FALSE);
$form->setTableWidth("100%");
$form->setId("multiplechoice");
// title
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setValue($this->object->getTitle());
$title->setRequired(TRUE);
$form->addItem($title);
// label
$label = new ilTextInputGUI($this->lng->txt("label"), "label");
$label->setValue($this->object->label);
$label->setInfo($this->lng->txt("label_info"));
$label->setRequired(false);
$form->addItem($label);
// author
$author = new ilTextInputGUI($this->lng->txt("author"), "author");
$author->setValue($this->object->getAuthor());
$author->setRequired(TRUE);
$form->addItem($author);
// description
$description = new ilTextInputGUI($this->lng->txt("description"), "description");
$description->setValue($this->object->getDescription());
$description->setRequired(FALSE);
$form->addItem($description);
// questiontext
$question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
$question->setValue($this->object->prepareTextareaOutput($this->object->getQuestiontext()));
$question->setRequired(TRUE);
$question->setRows(10);
$question->setCols(80);
$question->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$question->addPlugin("latex");
$question->addButton("latex");
$question->addButton("pastelatex");
$question->setRTESupport($this->object->getId(), "spl", "survey", null, false, "3.4.7");
$form->addItem($question);
// subtype
$subtype = new ilRadioGroupInputGUI($this->lng->txt("subtype"), "type");
$subtype->setRequired(false);
$subtype->setValue($this->object->getSubtype());
$subtypes = array("0" => "matrix_subtype_sr", "1" => "matrix_subtype_mr");
foreach ($subtypes as $idx => $st) {
$subtype->addOption(new ilRadioOption($this->lng->txt($st), $idx));
}
$form->addItem($subtype);
// obligatory
$shuffle = new ilCheckboxInputGUI($this->lng->txt("obligatory"), "obligatory");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getObligatory());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("matrix_appearance"));
$form->addItem($header);
// column separators
$column_separators = new ilCheckboxInputGUI($this->lng->txt("matrix_column_separators"), "column_separators");
$column_separators->setValue(1);
$column_separators->setInfo($this->lng->txt("matrix_column_separators_description"));
$column_separators->setChecked($this->object->getColumnSeparators());
$column_separators->setRequired(false);
$form->addItem($column_separators);
// row separators
$row_separators = new ilCheckboxInputGUI($this->lng->txt("matrix_row_separators"), "row_separators");
$row_separators->setValue(1);
$row_separators->setInfo($this->lng->txt("matrix_row_separators_description"));
$row_separators->setChecked($this->object->getRowSeparators());
$row_separators->setRequired(false);
$form->addItem($row_separators);
// neutral column separators
$neutral_column_separator = new ilCheckboxInputGUI($this->lng->txt("matrix_neutral_column_separator"), "neutral_column_separator");
$neutral_column_separator->setValue(1);
$neutral_column_separator->setInfo($this->lng->txt("matrix_neutral_column_separator_description"));
$neutral_column_separator->setChecked($this->object->getNeutralColumnSeparator());
$neutral_column_separator->setRequired(false);
$form->addItem($neutral_column_separator);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("matrix_columns"));
$form->addItem($header);
// Answers
include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
$columns = new ilCategoryWizardInputGUI("", "columns");
$columns->setRequired(false);
$columns->setAllowMove(true);
$columns->setShowWizard(true);
$columns->setShowNeutralCategory(true);
$columns->setDisabledScale(false);
$columns->setNeutralCategoryTitle($this->lng->txt('matrix_neutral_answer'));
//.........这里部分代码省略.........
示例7: StatutoryRegulationsObject
public function StatutoryRegulationsObject()
{
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'saveStatutoryRegulations'));
$form->setTitle($this->lng->txt('statutory_regulations'));
$form->setTableWidth('100%');
// message
$post_gui = new ilTextAreaInputGUI($this->lng->txt('content'), 'statutory_regulations');
$post_gui->setCols(50);
$post_gui->setRows(15);
$post_gui->setUseRte(true);
$post_gui->addPlugin('latex');
$post_gui->addButton('latex');
$post_gui->addButton('pastelatex');
$post_gui->addPlugin('ilimgupload');
$post_gui->addButton('ilimgupload');
$post_gui->removePlugin('advlink');
$post_gui->removePlugin(ilRTE::ILIAS_IMG_MANAGER_PLUGIN);
$post_gui->removePlugin('image');
$post_gui->usePurifier(true);
$post_gui->setRTERootBlockElement('');
$post_gui->setRTESupport(ilObject::_lookupObjId($this->ref_id), 'pays~', 'frm_post', 'tpl.tinymce_frm_post.html', false, '3.4.7');
$post_gui->disableButtons(array('charmap', 'undo', 'redo', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'anchor', 'fullscreen', 'cut', 'copy', 'paste', 'pastetext', 'formatselect', 'image'));
// purifier
require_once 'Services/Html/classes/class.ilHtmlPurifierFactory.php';
require_once 'Services/RTE/classes/class.ilRTE.php';
$post_gui->setPurifier(ilHtmlPurifierFactory::_getInstanceByType('frm_post'));
$post_gui->setValue(ilRTE::_replaceMediaObjectImageSrc($this->genSetData->get('statutory_regulations'), 1));
$form->addItem($post_gui);
// show staturaltyio regulations in shoppingcart
$cb_showShoppingCart = new ilCheckboxInputGUI($this->lng->txt('show_sr_shoppingcart'), 'show_sr_shoppingcart');
$cb_showShoppingCart->setInfo($this->lng->txt('show_sr_shoppingcart_info'));
$cb_showShoppingCart->setValue(1);
$cb_showShoppingCart->setChecked($this->genSetData->get('show_sr_shoppingcart'));
$form->addItem($cb_showShoppingCart);
// attach staturaltyio regulations at invoice
$cb_attachInvoice = new ilCheckboxInputGUI($this->lng->txt('attach_sr_invoice'), 'attach_sr_invoice');
$cb_attachInvoice->setInfo($this->lng->txt('attach_sr_invoice_info'));
$cb_attachInvoice->setValue(1);
$cb_attachInvoice->setChecked($this->genSetData->get('attach_sr_invoice'));
$form->addItem($cb_attachInvoice);
$form->addCommandButton('saveStatutoryRegulations', $this->lng->txt('save'));
$this->tpl->setVariable('FORM', $form->getHTML());
}
示例8: editQuestion
/**
* Creates an output of the edit form for the question
*
* @access public
*/
function editQuestion($checkonly = FALSE)
{
$save = $this->isSaveCommand();
$this->getQuestionTemplate();
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$orderingtype = array_key_exists('ordering_type', $_POST) ? $_POST['ordering_type'] : $this->object->getOrderingType();
if (strcmp($this->ctrl->getCmd(), 'changeToText') == 0) {
$orderingtype = OQ_TERMS;
}
if (strcmp($this->ctrl->getCmd(), 'changeToPictures') == 0) {
$orderingtype = OQ_PICTURES;
}
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->outQuestionType());
$form->setMultipart($orderingtype == OQ_PICTURES ? TRUE : FALSE);
$form->setTableWidth("100%");
$form->setId("ordering");
// Edit mode
$hidden = new ilHiddenInputGUI("ordering_type");
$hidden->setValue($orderingtype);
$form->addItem($hidden);
// title, author, description, question, working time (assessment mode)
$this->addBasicQuestionFormProperties($form);
if (!$this->getSelfAssessmentEditingMode()) {
$element_height = new ilNumberInputGUI($this->lng->txt("element_height"), "element_height");
$element_height->setValue($this->object->getElementHeight());
$element_height->setRequired(false);
$element_height->setMaxLength(6);
$element_height->setMinValue(20);
$element_height->setSize(6);
$element_height->setInfo($this->lng->txt("element_height_info"));
$form->addItem($element_height);
}
if ($orderingtype == OQ_PICTURES) {
$geometry = new ilNumberInputGUI($this->lng->txt("thumb_geometry"), "thumb_geometry");
$geometry->setValue($this->object->getThumbGeometry());
$geometry->setRequired(true);
$geometry->setMaxLength(6);
$geometry->setMinValue(20);
$geometry->setSize(6);
$geometry->setInfo($this->lng->txt("thumb_geometry_info"));
$form->addItem($geometry);
}
if (count($this->object->getAnswers()) == 0) {
$this->object->addAnswer();
}
// Answers
if ($orderingtype == OQ_PICTURES) {
include_once "./Modules/TestQuestionPool/classes/class.ilImageWizardInputGUI.php";
$answers = new ilImageWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(TRUE);
$answers->setQuestionObject($this->object);
$answers->setInfo($this->lng->txt('ordering_answer_sequence_info'));
$answers->setAllowMove(TRUE);
$answervalues = array();
foreach ($this->object->getAnswers() as $index => $answervalue) {
$answervalues[$index] = $answervalue->getAnswertext();
}
$answers->setValues($answervalues);
$form->addItem($answers);
} else {
$answers = new ilTextWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(TRUE);
$answers->setInfo($this->lng->txt('ordering_answer_sequence_info'));
$answers->setAllowMove(TRUE);
$answervalues = array();
foreach ($this->object->getAnswers() as $index => $answervalue) {
$answervalues[$index] = $answervalue->getAnswertext();
}
ksort($answervalues);
$answers->setValues($answervalues);
$form->addItem($answers);
}
// points
$points = new ilNumberInputGUI($this->lng->txt("points"), "points");
$points->setValue($this->object->getPoints());
$points->setRequired(TRUE);
$points->setSize(3);
$points->setMinValue(0);
$points->setMinvalueShouldBeGreater(true);
$form->addItem($points);
if (true || !$this->getSelfAssessmentEditingMode()) {
if ($orderingtype == OQ_PICTURES) {
$form->addCommandButton("changeToText", $this->lng->txt("order_terms"));
} else {
$form->addCommandButton("changeToPictures", $this->lng->txt("order_pictures"));
}
}
$this->addQuestionFormCommandButtons($form);
$errors = false;
if ($save) {
$form->setValuesByPost();
$errors = !$form->checkInput();
$form->setValuesByPost();
//.........这里部分代码省略.........
示例9: buildBasicEditFormObject
/**
* @return ilPropertyFormGUI
*/
protected function buildBasicEditFormObject()
{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setId($this->getType());
$form->setTitle($this->outQuestionType());
$form->setTableWidth('100%');
$form->setMultipart(true);
return $form;
}
示例10: initPropertiesForm
/**
* Init survey settings form
*
* @return ilPropertyFormGUI
*/
function initPropertiesForm()
{
$template_settings = $hide_rte_switch = null;
$template = $this->object->getTemplate();
if ($template) {
include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
$template = new ilSettingsTemplate($template);
$template_settings = $template->getSettings();
$hide_rte_switch = $template_settings["rte_switch"]["hide"];
}
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("survey_properties");
// general properties
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("settings"));
$form->addItem($header);
// title & description (meta data)
include_once 'Services/MetaData/classes/class.ilMD.php';
$md_obj = new ilMD($this->object->getId(), 0, "svy");
$md_section = $md_obj->getGeneral();
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setRequired(true);
$title->setValue($md_section->getTitle());
$form->addItem($title);
$ids = $md_section->getDescriptionIds();
if ($ids) {
$desc_obj = $md_section->getDescription(array_pop($ids));
$desc = new ilTextAreaInputGUI($this->lng->txt("description"), "description");
$desc->setCols(50);
$desc->setRows(4);
$desc->setValue($desc_obj->getDescription());
$form->addItem($desc);
}
// pool usage
$pool_usage = new ilRadioGroupInputGUI($this->lng->txt("survey_question_pool_usage"), "use_pool");
$opt = new ilRadioOption($this->lng->txt("survey_question_pool_usage_active"), 1);
$opt->setInfo($this->lng->txt("survey_question_pool_usage_active_info"));
$pool_usage->addOption($opt);
$opt = new ilRadioOption($this->lng->txt("survey_question_pool_usage_inactive"), 0);
$opt->setInfo($this->lng->txt("survey_question_pool_usage_inactive_info"));
$pool_usage->addOption($opt);
$pool_usage->setValue($this->object->getPoolUsage());
$form->addItem($pool_usage);
// 360°: appraisees
if ($this->object->get360Mode()) {
$self_eval = new ilCheckboxInputGUI($this->lng->txt("survey_360_self_evaluation"), "self_eval");
$self_eval->setInfo($this->lng->txt("survey_360_self_evaluation_info"));
$self_eval->setChecked($this->object->get360SelfEvaluation());
$form->addItem($self_eval);
$self_rate = new ilCheckboxInputGUI($this->lng->txt("survey_360_self_raters"), "self_rate");
$self_rate->setInfo($this->lng->txt("survey_360_self_raters_info"));
$self_rate->setChecked($this->object->get360SelfRaters());
$form->addItem($self_rate);
$self_appr = new ilCheckboxInputGUI($this->lng->txt("survey_360_self_appraisee"), "self_appr");
$self_appr->setInfo($this->lng->txt("survey_360_self_appraisee_info"));
$self_appr->setChecked($this->object->get360SelfAppraisee());
$form->addItem($self_appr);
}
// activation
include_once "Services/Object/classes/class.ilObjectActivation.php";
$this->lng->loadLanguageModule('rep');
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('rep_activation_availability'));
$form->addItem($section);
// additional info only with multiple references
$act_obj_info = $act_ref_info = "";
if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
$act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
$act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
}
$online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
$online->setInfo($this->lng->txt('svy_activation_online_info') . $act_obj_info);
$online->setChecked($this->object->isOnline());
$form->addItem($online);
$act_type = new ilCheckboxInputGUI($this->lng->txt('rep_visibility_until'), 'access_type');
// $act_type->setInfo($this->lng->txt('svy_availability_until_info'));
$act_type->setChecked($this->object->isActivationLimited());
$this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
$dur = new ilDateDurationInputGUI($this->lng->txt('rep_time_period'), "access_period");
$dur->setShowTime(true);
$date = $this->object->getActivationStartDate();
$dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setStartText($this->lng->txt('rep_activation_limited_start'));
$date = $this->object->getActivationEndDate();
$dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setEndText($this->lng->txt('rep_activation_limited_end'));
$act_type->addSubItem($dur);
$visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
$visible->setInfo($this->lng->txt('svy_activation_limited_visibility_info'));
$visible->setChecked($this->object->getActivationVisibility());
$act_type->addSubItem($visible);
//.........这里部分代码省略.........
示例11: feedback
/**
* Creates the output of the feedback page for a single choice question
*
* @access public
*/
function feedback($checkonly = false)
{
$save = strcmp($this->ctrl->getCmd(), "saveFeedback") == 0 ? TRUE : FALSE;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('feedback_answers'));
$form->setTableWidth("98%");
$form->setId("feedback");
$complete = new ilTextAreaInputGUI($this->lng->txt("feedback_complete_solution"), "feedback_complete");
$complete->setValue($this->object->prepareTextareaOutput($this->object->getFeedbackGeneric(1)));
$complete->setRequired(false);
$complete->setRows(10);
$complete->setCols(80);
if (!$this->getPreventRteUsage()) {
$complete->setUseRte(true);
}
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$complete->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
$complete->addPlugin("latex");
$complete->addButton("latex");
$complete->addButton("pastelatex");
$complete->setRTESupport($this->object->getId(), "qpl", "assessment", null, false, '3.4.7');
$form->addItem($complete);
$incomplete = new ilTextAreaInputGUI($this->lng->txt("feedback_incomplete_solution"), "feedback_incomplete");
$incomplete->setValue($this->object->prepareTextareaOutput($this->object->getFeedbackGeneric(0)));
$incomplete->setRequired(false);
$incomplete->setRows(10);
$incomplete->setCols(80);
if (!$this->getPreventRteUsage()) {
$incomplete->setUseRte(true);
}
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$incomplete->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
$incomplete->addPlugin("latex");
$incomplete->addButton("latex");
$incomplete->addButton("pastelatex");
$incomplete->setRTESupport($this->object->getId(), "qpl", "assessment", null, false, '3.4.7');
$form->addItem($incomplete);
if (!$this->getSelfAssessmentEditingMode()) {
foreach ($this->object->getErrorData() as $index => $answer) {
$caption = $ordinal = $index + 1;
$caption .= '. <br />"' . $answer->text_wrong . '" => ';
$caption .= '"' . $answer->text_correct . '"';
$caption .= '</i>';
$answerobj = new ilTextAreaInputGUI($this->object->prepareTextareaOutput($caption, true), "feedback_answer_{$index}");
$answerobj->setValue($this->object->prepareTextareaOutput($this->object->getFeedbackSingleAnswer($index)));
$answerobj->setRequired(false);
$answerobj->setRows(10);
$answerobj->setCols(80);
$answerobj->setUseRte(true);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$answerobj->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
$answerobj->addPlugin("latex");
$answerobj->addButton("latex");
$answerobj->addButton("pastelatex");
$answerobj->setRTESupport($this->object->getId(), "qpl", "assessment", null, false, '3.4.7');
$form->addItem($answerobj);
}
}
global $ilAccess;
if ($ilAccess->checkAccess("write", "", $_GET['ref_id']) || $this->getSelfAssessmentEditingMode()) {
$form->addCommandButton("saveFeedback", $this->lng->txt("save"));
}
if ($save) {
$form->setValuesByPost();
$errors = !$form->checkInput();
$form->setValuesByPost();
// again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
}
if (!$checkonly) {
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
}
return $errors;
}
示例12: editStatistic
public function editStatistic($a_show_confirm_delete = false)
{
global $ilToolbar;
if (!isset($_GET['booking_id'])) {
ilUtil::sendInfo($this->lng->txt('paya_no_booking_id_given'));
$this->showStatistics();
return true;
}
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'showStatistics'));
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$this->ctrl->setParameter($this, 'booking_id', (int) $_GET['booking_id']);
$this->__initBookingObject();
$bookings = $this->booking_obj->getBookings();
$booking = $bookings[(int) $_GET['booking_id']];
// confirm delete
if ($a_show_confirm_delete) {
$pobject_data = ilPaymentObject::_getObjectData($booking['pobject_id']);
$tmp_obj = ilObject::_lookupTitle(ilObject::_lookupObjId($pobject_data['ref_id']));
$type = ilObject::_lookupType(ilObject::_lookupObjId($pobject_data['ref_id']));
$oConfirmationGUI = new ilConfirmationGUI();
// set confirm/cancel commands
$oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, "performDelete"));
$oConfirmationGUI->setHeaderText($this->lng->txt("paya_sure_delete_stat"));
$oConfirmationGUI->setCancel($this->lng->txt("cancel"), "editStatistic");
if ($type == 'crs') {
$oConfirmationGUI->addButton($this->lng->txt("confirm"), "performDeleteDeassignCrs");
} else {
$oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "performDelete");
}
$oConfirmationGUI->addItem('booking_id', $_GET['booking_id'], $tmp_obj);
$this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHTML());
return true;
}
// get customer_obj
$tmp_user = ilObjectFactory::getInstanceByObjId($booking['customer_id'], false);
$oForm = new ilPropertyFormGUI();
$oForm->setFormAction($this->ctrl->getFormAction($this));
$oForm->setId('stat_form');
$oForm->setTableWidth('50 %');
if (is_object($tmp_user)) {
$frm_user = $tmp_user->getFullname() . ' [' . $tmp_user->getLogin() . ']';
} else {
$frm_user = $this->lng->txt('user_deleted');
}
$oForm->setTitle($frm_user);
$pObj = new ilPaymentObject($this->user_obj, $booking['pobject_id']);
$tmp_obj = ilObject::_lookupTitle(ilObject::_lookupObjId($pObj->getRefId()));
// object_title
$oTitleGUI = new ilNonEditableValueGUI($this->lng->txt('title'));
$oTitleGUI->setValue($tmp_obj != '' ? $tmp_obj : $this->lng->txt('object_deleted'));
$oForm->addItem($oTitleGUI);
// transaction
$oTransactionGUI = new ilNonEditableValueGUI($this->lng->txt('paya_transaction'));
$oTransactionGUI->setValue($booking['transaction']);
$oForm->addItem($oTransactionGUI);
//vendor
$oVendorGUI = new ilNonEditableValueGUI($this->lng->txt('paya_vendor'));
$tmp_vendor = ilObjectFactory::getInstanceByObjId($booking['b_vendor_id'], false);
if (is_object($tmp_vendor)) {
$frm_vendor = $tmp_vendor->getFullname() . ' [' . $tmp_vendor->getLogin() . ']';
} else {
$frm_vendor = $this->lng->txt('user_deleted');
}
$oVendorGUI->setValue($frm_vendor);
$oForm->addItem($oVendorGUI);
// paymethod
$oPaymethodGUI = new ilNonEditableValueGUI($this->lng->txt('paya_pay_method'));
$oPaymethodGUI->setValue(ilPayMethods::getStringByPaymethod($booking['b_pay_method']));
$oForm->addItem($oPaymethodGUI);
// order_date
$oOrderdateGUI = new ilNonEditableValueGUI($this->lng->txt('paya_order_date'));
$oOrderdateGUI->setValue(ilDatePresentation::formatDate(new ilDateTime($booking["order_date"], IL_CAL_UNIX)));
$oForm->addItem($oOrderdateGUI);
// duration
$oDurationGUI = new ilNonEditableValueGUI($this->lng->txt('duration'));
if ($booking['duration'] == 0 && $booking['access_enddate'] == NULL) {
$frm_duration = $this->lng->txt("unlimited_duration");
} else {
if ($booking['duration'] > 0) {
$frm_duration = $booking['duration'] . ' ' . $this->lng->txt('paya_months');
}
$frm_duration .= ilDatePresentation::formatDate(new ilDate($booking['access_startdate'], IL_CAL_DATETIME)) . ' - ' . ilDatePresentation::formatDate(new ilDate($booking['access_enddate'], IL_CAL_DATETIME));
}
$oDurationGUI->setValue($frm_duration);
$oForm->addItem($oDurationGUI);
// price
$oPriceGUI = new ilNonEditableValueGUI($this->lng->txt('price_a'));
$oPriceGUI->setValue($booking['price'] . ' ' . $booking['currency_unit']);
$oForm->addItem($oPriceGUI);
// payed
$oPayedGUI = new ilSelectInputGUI();
$payed_option = array(0 => $this->lng->txt('no'), 1 => $this->lng->txt('yes'));
$oPayedGUI->setTitle($this->lng->txt('paya_payed'));
$oPayedGUI->setOptions($payed_option);
$oPayedGUI->setValue($booking['payed']);
$oPayedGUI->setPostVar('payed');
$oForm->addItem($oPayedGUI);
// access
$oAccessGUI = new ilSelectInputGUI();
//.........这里部分代码省略.........
示例13: editQuestion
/**
* Creates an output of the edit form for the question
*
* @access public
*/
public function editQuestion($checkonly = FALSE)
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt($this->getQuestionType()));
$form->setMultipart(FALSE);
$form->setTableWidth("100%");
$form->setId("multiplechoice");
// title
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setValue($this->object->getTitle());
$title->setRequired(TRUE);
$form->addItem($title);
// label
$label = new ilTextInputGUI($this->lng->txt("label"), "label");
$label->setValue($this->object->label);
$label->setInfo($this->lng->txt("label_info"));
$label->setRequired(false);
$form->addItem($label);
// author
$author = new ilTextInputGUI($this->lng->txt("author"), "author");
$author->setValue($this->object->getAuthor());
$author->setRequired(TRUE);
$form->addItem($author);
// description
$description = new ilTextInputGUI($this->lng->txt("description"), "description");
$description->setValue($this->object->getDescription());
$description->setRequired(FALSE);
$form->addItem($description);
// questiontext
$question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
$question->setValue($this->object->prepareTextareaOutput($this->object->getQuestiontext()));
$question->setRequired(TRUE);
$question->setRows(10);
$question->setCols(80);
$question->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$question->addPlugin("latex");
$question->addButton("latex");
$question->addButton("pastelatex");
$question->setRTESupport($this->object->getId(), "spl", "survey", null, false, "3.4.7");
$form->addItem($question);
// obligatory
$shuffle = new ilCheckboxInputGUI($this->lng->txt("obligatory"), "obligatory");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getObligatory());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
// orientation
$orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
$orientation->setRequired(false);
$orientation->setValue($this->object->getOrientation());
$orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
$orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
$form->addItem($orientation);
// minimum answers
$minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
$minanswers->setValue(1);
$minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
$minanswers->setChecked($this->object->use_min_answers);
$minanswers->setRequired(FALSE);
$nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
$nranswers->setSize(5);
$nranswers->setDecimals(0);
$nranswers->setRequired(false);
$nranswers->setMinValue(1);
$nranswers->setValue($this->object->nr_min_answers);
$minanswers->addSubItem($nranswers);
$nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
$nrmaxanswers->setSize(5);
$nrmaxanswers->setDecimals(0);
$nrmaxanswers->setRequired(false);
$nrmaxanswers->setMinValue(1);
$nrmaxanswers->setValue($this->object->nr_max_answers);
$minanswers->addSubItem($nrmaxanswers);
$form->addItem($minanswers);
// Answers
include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
$answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(false);
$answers->setAllowMove(true);
$answers->setShowWizard(false);
$answers->setShowSavePhrase(false);
$answers->setUseOtherAnswer(true);
$answers->setShowNeutralCategory(true);
$answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
if (!$this->object->getCategories()->getCategoryCount()) {
$this->object->getCategories()->addCategory("");
}
$answers->setValues($this->object->getCategories());
$answers->setDisabledScale(false);
$form->addItem($answers);
$this->addCommandButtons($form);
//.........这里部分代码省略.........
示例14: initMultiUploadForm
/**
* Initializes the upload form for multiple files.
*
* @return object The created property form.
*/
public function initMultiUploadForm()
{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$dnd_form_gui = new ilPropertyFormGUI();
$dnd_form_gui->setMultipart(true);
$dnd_form_gui->setHideLabels();
// file input
include_once "Services/Form/classes/class.ilDragDropFileInputGUI.php";
$dnd_input = new ilDragDropFileInputGUI($this->lng->txt("files"), "upload_files");
$dnd_input->setArchiveSuffixes(array("zip"));
$dnd_input->setCommandButtonNames("uploadFiles", "cancel");
$dnd_form_gui->addItem($dnd_input);
// add commands
$dnd_form_gui->addCommandButton("uploadFiles", $this->lng->txt("upload_files"));
$dnd_form_gui->addCommandButton("cancel", $this->lng->txt("cancel"));
$dnd_form_gui->setTableWidth("100%");
$dnd_form_gui->setTarget($this->getTargetFrame("save"));
$dnd_form_gui->setTitle($this->lng->txt("upload_files_title"));
$dnd_form_gui->setTitleIcon(ilUtil::getImagePath('icon_file.gif'), $this->lng->txt('obj_file'));
$this->ctrl->setParameter($this, "new_type", "file");
$dnd_form_gui->setFormAction($this->ctrl->getFormAction($this, "uploadFiles"));
return $dnd_form_gui;
}
示例15: showMail
/**
* Detail view of a mail
*/
public function showMail()
{
/**
* @var $ilUser ilObjUser
* @var $ilToolbar ilToolbarGUI
* @var $ilTabs ilTabsGUI
*/
global $ilUser, $ilToolbar, $ilTabs;
if ($_SESSION['mail_id']) {
$_GET['mail_id'] = $_SESSION['mail_id'];
$_SESSION['mail_id'] = '';
}
$ilTabs->clearTargets();
$ilTabs->setBackTarget($this->lng->txt('back_to_folder'), $this->ctrl->getFormAction($this, 'showFolder'));
$this->umail->markRead(array((int) $_GET['mail_id']));
$mailData = $this->umail->getMail((int) $_GET['mail_id']);
$this->tpl->setTitle($this->lng->txt('mail_mails_of'));
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setPreventDoubleSubmission(false);
$form->setTableWidth('100%');
$this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
$form->setFormAction($this->ctrl->getFormAction($this, 'showMail'));
$this->ctrl->clearParameters($this);
$form->setTitle($this->lng->txt('mail_mails_of'));
if ('tree' == ilSession::get(ilMailGUI::VIEWMODE_SESSION_KEY)) {
$this->tpl->setVariable('FORM_TARGET', ilFrameTargetInfo::_getFrame('MainContent'));
}
include_once 'Services/Accessibility/classes/class.ilAccessKeyGUI.php';
/**
* @var $sender ilObjUser
*/
$sender = ilObjectFactory::getInstanceByObjId($mailData['sender_id'], false);
if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
$this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']);
$this->ctrl->setParameterByClass('ilmailformgui', 'type', 'reply');
$this->ctrl->clearParametersByClass('iliasmailformgui');
$ilToolbar->addButton($this->lng->txt('reply'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::REPLY);
$this->ctrl->clearParameters($this);
}
$this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']);
$this->ctrl->setParameterByClass('ilmailformgui', 'type', 'forward');
$this->ctrl->clearParametersByClass('iliasmailformgui');
$ilToolbar->addButton($this->lng->txt('forward'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::FORWARD_MAIL);
$this->ctrl->clearParameters($this);
$this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
$ilToolbar->addButton($this->lng->txt('print'), $this->ctrl->getLinkTarget($this, 'printMail'), '_blank');
$this->ctrl->clearParameters($this);
$this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
$this->ctrl->setParameter($this, 'selected_cmd', 'deleteMails');
$ilToolbar->addButton($this->lng->txt('delete'), $this->ctrl->getLinkTarget($this), '', ilAccessKey::DELETE);
$this->ctrl->clearParameters($this);
if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
$linked_fullname = $sender->getPublicName();
$picture = ilUtil::img($sender->getPersonalPicturePath('xsmall'), $sender->getPublicName());
$add_to_addb_button = '';
if (in_array(ilObjUser::_lookupPref($sender->getId(), 'public_profile'), array('y', 'g'))) {
$this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
$this->ctrl->setParameter($this, 'user', $sender->getId());
$linked_fullname = '<br /><a href="' . $this->ctrl->getLinkTarget($this, 'showUser') . '" title="' . $linked_fullname . '">' . $linked_fullname . '</a>';
$this->ctrl->clearParameters($this);
}
if ($sender->getId() != $ilUser->getId()) {
require_once 'Services/Contact/classes/class.ilAddressbook.php';
$abook = new ilAddressbook($ilUser->getId());
if ($abook->checkEntryByLogin($sender->getLogin()) == 0) {
$tplbtn = new ilTemplate('tpl.buttons.html', true, true);
$tplbtn->setCurrentBlock('btn_cell');
$this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
$tplbtn->setVariable('BTN_LINK', $this->ctrl->getLinkTarget($this, 'add'));
$this->ctrl->clearParameters($this);
$tplbtn->setVariable('BTN_TXT', $this->lng->txt('mail_add_to_addressbook'));
$tplbtn->parseCurrentBlock();
$add_to_addb_button = '<br />' . $tplbtn->get();
}
}
$from = new ilCustomInputGUI($this->lng->txt('from'));
$from->setHtml($picture . ' ' . $linked_fullname . $add_to_addb_button);
$form->addItem($from);
} else {
if (!$sender || !$sender->getId()) {
$from = new ilCustomInputGUI($this->lng->txt('from'));
$from->setHtml($mailData['import_name'] . ' (' . $this->lng->txt('user_deleted') . ')');
$form->addItem($from);
} else {
$from = new ilCustomInputGUI($this->lng->txt('from'));
$from->setHtml(ilUtil::img(ilUtil::getImagePath('HeaderIconAvatar.svg'), ilMail::_getIliasMailerName()) . '<br />' . ilMail::_getIliasMailerName());
$form->addItem($from);
}
}
$to = new ilCustomInputGUI($this->lng->txt('mail_to'));
$to->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_to']), false));
$form->addItem($to);
if ($mailData['rcp_cc']) {
$cc = new ilCustomInputGUI($this->lng->txt('cc'));
$cc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_cc']), false));
$form->addItem($cc);
//.........这里部分代码省略.........