本文整理汇总了PHP中ilPropertyFormGUI::setTarget方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setTarget方法的具体用法?PHP ilPropertyFormGUI::setTarget怎么用?PHP ilPropertyFormGUI::setTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::setTarget方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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");
}
示例2: initImportForm
/**
* Init object import form
*
* @param string new type
* @return ilPropertyFormGUI
*/
protected function initImportForm($a_new_type)
{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTarget("_top");
$form->setFormAction($this->ctrl->getFormAction($this, "importFile"));
$form->setTitle($this->lng->txt($a_new_type . "_import"));
include_once "./Services/Form/classes/class.ilFileInputGUI.php";
$fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$form->addItem($fi);
$form->addCommandButton("importFile", $this->lng->txt("import"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
return $form;
}
示例3: initImportForm
/**
* Init import form.
*/
public function initImportForm()
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
$this->ctrl->setParameter($this, "new_type", $new_type);
$form->setTarget(ilFrameTargetInfo::_getFrame("MainContent"));
$form->setTableWidth("600px");
// import file
$fi = new ilFileInputGUI($this->lng->txt("file"), "xmldoc");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$fi->setSize(30);
$form->addItem($fi);
// validation
$cb = new ilCheckboxInputGUI($this->lng->txt("cont_validate_file"), "validate");
$cb->setInfo($this->lng->txt(""));
$form->addItem($cb);
$form->addCommandButton("importFile", $lng->txt("import"));
$form->addCommandButton("cancel", $lng->txt("cancel"));
$form->setTitle($this->lng->txt("import_" . $new_type));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}
示例4: initImportForm
protected function initImportForm($a_new_type)
{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTarget("_top");
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("import_svy"));
include_once "./Services/Form/classes/class.ilFileInputGUI.php";
$fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$form->addItem($fi);
include_once "./Modules/Survey/classes/class.ilObjSurvey.php";
$svy = new ilObjSurvey();
$questionspools = $svy->getAvailableQuestionpools(true, true, true);
$pools = new ilSelectInputGUI($this->lng->txt("select_questionpool_short"), "spl");
$pools->setOptions(array("" => $this->lng->txt("dont_use_questionpool")) + $questionspools);
$pools->setRequired(false);
$form->addItem($pools);
$form->addCommandButton("importFile", $this->lng->txt("import"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
return $form;
}
示例5: initForm
/**
* Init form
*
* @param string $a_cmd
* @return ilPropertyFormGUI
*/
public function initForm($a_cmd = "")
{
global $ilCtrl, $lng;
$lng->loadLanguageModule('crs');
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this->parent_obj, $a_cmd));
$form->setTarget('_blank');
$form->setTitle($lng->txt('sess_gen_attendance_list'));
$title = new ilTextInputGUI($lng->txt('title'), 'title');
$title->setValue($this->title);
$form->addItem($title);
$desc = new ilTextInputGUI($lng->txt('description'), 'desc');
$desc->setValue($this->description);
$form->addItem($desc);
if (sizeof($this->presets)) {
$preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset');
$preset_value = array();
foreach ($this->presets as $id => $item) {
$preset->addOption(new ilCheckboxOption($item[0], $id));
if ($item[1]) {
$preset_value[] = $id;
}
}
$preset->setValue($preset_value);
$form->addItem($preset);
}
$blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank');
$blank->setMulti(true);
$form->addItem($blank);
if ($this->pre_blanks) {
$blank->setValue($this->pre_blanks);
}
$part = new ilFormSectionHeaderGUI();
$part->setTitle($lng->txt('event_participant_selection'));
$form->addItem($part);
// Admins
$admin = new ilCheckboxInputGUI($lng->txt('event_tbl_admins'), 'show_admins');
$admin->setOptionTitle($lng->txt('event_inc_admins'));
$admin->setValue(1);
$form->addItem($admin);
// Tutors
$tutor = new ilCheckboxInputGUI($lng->txt('event_tbl_tutors'), 'show_tutors');
$tutor->setOptionTitle($lng->txt('event_inc_tutors'));
$tutor->setValue(1);
$form->addItem($tutor);
// Members
$member = new ilCheckboxInputGUI($lng->txt('event_tbl_members'), 'show_members');
$member->setOptionTitle($lng->txt('event_inc_members'));
$member->setValue(1);
$member->setChecked(true);
$form->addItem($member);
$form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list'));
if ($this->id && $a_cmd) {
include_once "Services/User/classes/class.ilUserFormSettings.php";
$settings = new ilUserFormSettings($this->id);
$settings->exportToForm($form);
}
return $form;
}
示例6: initImportForm
function initImportForm($a_new_type)
{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTarget("_top");
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
$this->ctrl->setParameter($this, "new_type", $new_type);
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("import_tst"));
// file
include_once "./Services/Form/classes/class.ilFileInputGUI.php";
$fi = new ilFileInputGUI($this->lng->txt("import_file"), "xmldoc");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$form->addItem($fi);
// question pool
include_once "./Modules/Test/classes/class.ilObjTest.php";
$tst = new ilObjTest();
$questionpools = $tst->getAvailableQuestionpools(TRUE, FALSE, TRUE, TRUE);
if (count($questionpools)) {
$options = array("-1" => $this->lng->txt("dont_use_questionpool"));
foreach ($questionpools as $key => $value) {
$options[$key] = $value["title"];
}
$pool = new ilSelectInputGUI($this->lng->txt("select_questionpool"), "qpl");
$pool->setOptions($options);
$form->addItem($pool);
}
$form->addCommandButton("importFile", $this->lng->txt("import"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
return $form;
}
示例7: 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;
}
示例8: initCreateForm
/**
* Init object creation form
*
* @param string $a_new_type
*
* @return ilPropertyFormGUI
*/
protected function initCreateForm($a_new_type)
{
global $lng;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTarget("_top");
$form->setFormAction($this->ctrl->getFormAction($this, "save"));
$form->setTitle($this->lng->txt($a_new_type . "_new"));
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setSize(min(40, ilObject::TITLE_LENGTH));
$ti->setMaxLength(ilObject::TITLE_LENGTH);
$ti->setRequired(true);
$form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$form->addItem($ta);
$services_group = new ilRadioGroupInputGUI($lng->txt("cld_service"), "service");
$services_group->setRequired(true);
foreach (ilCloudConnector::getActiveServices() as $service) {
$option = new ilRadioOption($service, $service);
$hook_object = ilCloudConnector::getPluginHookClass($option->getValue());
$option->setTitle($hook_object->txt($service));
$option->setInfo($hook_object->txt("create_info"));
$this->plugin_service = ilCloudConnector::getServiceClass($service, 0, false);
$init_gui = ilCloudConnector::getCreationGUIClass($this->plugin_service);
if ($init_gui) {
$init_gui->initPluginCreationFormSection($option);
}
$services_group->addOption($option);
}
//Select first radio-button by default
$services_group->setValue(array_shift($services_group->getOptions())->getValue());
$form->addItem($services_group);
$form = $this->initDidacticTemplate($form);
$form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
return $form;
}
示例9: initCreateForm
function initCreateForm($a_new_type)
{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTarget("_top");
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt($a_new_type . "_new"));
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setSize(min(40, ilObject::TITLE_LENGTH));
$ti->setMaxLength(ilObject::TITLE_LENGTH);
$ti->setRequired(true);
$form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$form->addItem($ta);
// mode
$stati = array("none" => $this->lng->txt("glo_mode_normal"), "level" => $this->lng->txt("glo_mode_level"), "subtree" => $this->lng->txt("glo_mode_subtree"));
$tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
$tm->setOptions($stati);
$tm->setInfo($this->lng->txt("glo_mode_desc"));
$tm->setRequired(true);
$form->addItem($tm);
$form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
return $form;
}
示例10: initForm
/**
* Init form
*
* @param string $a_cmd
* @return ilPropertyFormGUI
*/
public function initForm($a_cmd = "")
{
global $ilCtrl, $lng;
$lng->loadLanguageModule('crs');
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this->parent_obj, $a_cmd));
$form->setTarget('_blank');
$form->setTitle($lng->txt('sess_gen_attendance_list'));
$title = new ilTextInputGUI($lng->txt('title'), 'title');
$title->setValue($this->title);
$form->addItem($title);
$desc = new ilTextInputGUI($lng->txt('description'), 'desc');
$desc->setValue($this->description);
$form->addItem($desc);
if (sizeof($this->presets)) {
$preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset');
$preset_value = array();
foreach ($this->presets as $id => $item) {
$preset->addOption(new ilCheckboxOption($item[0], $id));
if ($item[1]) {
$preset_value[] = $id;
}
}
$preset->setValue($preset_value);
$form->addItem($preset);
}
$blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank');
$blank->setMulti(true);
$form->addItem($blank);
if ($this->pre_blanks) {
$blank->setValue($this->pre_blanks);
}
$part = new ilFormSectionHeaderGUI();
$part->setTitle($lng->txt('event_participant_selection'));
$form->addItem($part);
// participants by roles
foreach ($this->role_data as $role_id => $role_data) {
$chk = new ilCheckboxInputGUI($role_data[0], 'role_' . $role_id);
$chk->setValue(1);
$chk->setChecked(1);
$form->addItem($chk);
}
// not in sessions
if ($this->waiting_list) {
$chk = new ilCheckboxInputGUI($lng->txt('group_new_registrations'), 'subscr');
$chk->setValue(1);
$form->addItem($chk);
$chk = new ilCheckboxInputGUI($lng->txt('crs_waiting_list'), 'wlist');
$chk->setValue(1);
$form->addItem($chk);
}
if ($this->user_filters) {
foreach ($this->user_filters as $sub_id => $sub_item) {
$sub = new ilCheckboxInputGUI($sub_item[0], 'members_' . $sub_id);
if ($sub_item[1]) {
$sub->setChecked(true);
}
$form->addItem($sub);
}
}
$form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list'));
if ($this->id && $a_cmd) {
include_once "Services/User/classes/class.ilUserFormSettings.php";
$settings = new ilUserFormSettings($this->id);
$settings->deleteValue('desc');
// #11340
$settings->exportToForm($form);
}
return $form;
}
示例11: getUsernameAssistanceForm
/**
* @return ilPropertyFormGUI
*/
protected function getUsernameAssistanceForm()
{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, 'submitUsernameAssistanceForm'));
$form->setTarget('_parent');
$email = new ilTextInputGUI($this->lng->txt('email'), 'email');
$email->setRequired(true);
$form->addItem($email);
$form->addCommandButton('submitUsernameAssistanceForm', $this->lng->txt('submit'));
return $form;
}
示例12: initZipUploadForm
/**
* FORM: Init zip upload form.
*/
public function initZipUploadForm($a_mode = "create")
{
global $lng;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$zip_form_gui = new ilPropertyFormGUI();
$zip_form_gui->setMultipart(true);
// File
$in_file = new ilFileInputGUI($lng->txt("file"), "zip_file");
$in_file->setRequired(true);
$in_file->setSuffixes(array("zip"));
$zip_form_gui->addItem($in_file);
// Take over structure
$in_str = new ilCheckboxInputGUI($this->lng->txt("take_over_structure"), "adopt_structure");
$in_str->setInfo($this->lng->txt("take_over_structure_info"));
$zip_form_gui->addItem($in_str);
$zip_form_gui->addCommandButton("saveUnzip", $this->lng->txt($this->type . "_add"));
$zip_form_gui->addCommandButton("cancel", $lng->txt("cancel"));
$zip_form_gui->setTableWidth("600px");
$zip_form_gui->setTarget($this->getTargetFrame("save"));
$zip_form_gui->setTitle($this->lng->txt("header_zip"));
$zip_form_gui->setTitleIcon(ilUtil::getImagePath('icon_file.png'), $this->lng->txt('obj_file'));
$this->ctrl->setParameter($this, "new_type", "file");
$zip_form_gui->setFormAction($this->ctrl->getFormAction($this, "saveUnzip"));
return $zip_form_gui;
}
示例13: getFileUploadForm
/**
* Prepares Fileupload form and returns it.
* @return ilPropertyFormGUI
*/
public function getFileUploadForm()
{
/**
* @var $lng ilLanguage
*/
global $lng;
$form = new ilPropertyFormGUI();
$file_input = new ilFileInputGUI();
$file_input->setPostVar('file_to_upload');
$file_input->setTitle($lng->txt('upload'));
$form->addItem($file_input);
$form->addCommandButton('UploadFile-uploadFile', $lng->txt('submit'));
$form->setTarget('_blank');
return $form;
}