本文整理汇总了PHP中ilPropertyFormGUI::setFormAction方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setFormAction方法的具体用法?PHP ilPropertyFormGUI::setFormAction怎么用?PHP ilPropertyFormGUI::setFormAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::setFormAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initFormSettings
/**
* Init property form
*
* @return ilPropertyFormGUI $form
*/
protected function initFormSettings()
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt('tracking_settings'));
$form->setFormAction($this->ctrl->getFormAction($this));
// Mode
$mod = new ilRadioGroupInputGUI($this->lng->txt('trac_mode'), 'modus');
$mod->setRequired(true);
$mod->setValue($this->obj_lp->getCurrentMode());
$form->addItem($mod);
foreach ($this->obj_lp->getValidModes() as $mode_key) {
$opt = new ilRadioOption($this->obj_lp->getModeText($mode_key), $mode_key, $this->obj_lp->getModeInfoText($mode_key));
$opt->setValue($mode_key);
$mod->addOption($opt);
// :TODO: Subitem for visits ?!
if ($mode_key == ilLPObjSettings::LP_MODE_VISITS) {
$vis = new ilNumberInputGUI($this->lng->txt('trac_visits'), 'visits');
$vis->setSize(3);
$vis->setMaxLength(4);
$vis->setInfo(sprintf($this->lng->txt('trac_visits_info'), ilObjUserTracking::_getValidTimeSpan()));
$vis->setRequired(true);
$vis->setValue($this->obj_settings->getVisits());
$opt->addSubItem($vis);
}
}
$form->addCommandButton('saveSettings', $this->lng->txt('save'));
return $form;
}
示例2: initLicenseForm
protected function initLicenseForm()
{
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this, "updateLicense"));
$form->setTitle($this->lng->txt('edit_license'));
$exist = new ilNumberInputGUI($this->lng->txt("existing_licenses"), "licenses");
$exist->setInfo($this->lng->txt("zero_licenses_explanation"));
$exist->setMaxLength(10);
$exist->setSize(10);
$exist->setValue($this->license->getLicenses());
$form->addItem($exist);
$info_used = new ilNonEditableValueGUI($this->lng->txt("used_licenses"));
$info_used->setInfo($this->lng->txt("used_licenses_explanation"));
$info_used->setValue($this->license->getAccesses());
$form->addItem($info_used);
$remaining_licenses = $this->license->getLicenses() == "0" ? $this->lng->txt("arbitrary") : $this->license->getRemainingLicenses();
$info_remain = new ilNonEditableValueGUI($this->lng->txt("remaining_licenses"));
$info_remain->setInfo($this->lng->txt("remaining_licenses_explanation"));
$info_remain->setValue($remaining_licenses);
$form->addItem($info_remain);
$info_potential = new ilNonEditableValueGUI($this->lng->txt("potential_accesses"));
$info_potential->setInfo($this->lng->txt("potential_accesses_explanation"));
$info_potential->setValue($this->license->getPotentialAccesses());
$form->addItem($info_potential);
$comm = new ilTextAreaInputGUI($this->lng->txt("comment"), "remarks");
$comm->setRows(5);
$comm->setValue($this->license->getRemarks());
$form->addItem($comm);
$form->addCommandButton('updateLicense', $this->lng->txt('save'));
return $form;
}
示例3: initForm
/**
* Init courses form
*
* @param bool $a_insert
* @return ilPropertyFormGUI
*/
protected function initForm($a_insert = false)
{
global $ilCtrl;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
if ($a_insert) {
$form->setTitle($this->lng->txt("cont_insert_amd_page_list"));
} else {
$form->setTitle($this->lng->txt("cont_update_amd_page_list"));
}
$form->setDescription($this->lng->txt("wiki_page_list_form_info"));
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
$this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_SEARCH, 'wiki', $this->getPage()->getWikiId(), 'wpg', $this->getPage()->getId());
$this->record_gui->setPropertyForm($form);
$this->record_gui->setSelectedOnly(true);
if (!$a_insert) {
$this->record_gui->setSearchFormValues($this->content_obj->getFieldValues());
}
$this->record_gui->parse();
if ($a_insert) {
$form->addCommandButton("create_amd_page_list", $this->lng->txt("select"));
$form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
} else {
$form->addCommandButton("update", $this->lng->txt("select"));
$form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
}
return $form;
}
示例4: initSettingsForm
/**
* Init settings form
*/
protected function initSettingsForm()
{
global $ilCtrl;
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($GLOBALS['lng']->txt('settings'));
$form->addCommandButton('update', $GLOBALS['lng']->txt('save'));
$form->addCommandButton('settings', $GLOBALS['lng']->txt('cancel'));
// activation
$active = new ilCheckboxInputGUI($GLOBALS['lng']->txt('fm_settings_active'), 'active');
$active->setInfo($GLOBALS['lng']->txt('fm_settings_active_info'));
$active->setValue(1);
$active->setChecked(ilFMSettings::getInstance()->isEnabled());
$form->addItem($active);
// one frame
$local = new ilCheckboxInputGUI($GLOBALS['lng']->txt('fm_settings_local'), 'local');
$local->setInfo($GLOBALS['lng']->txt('fm_settings_local_info'));
$local->setValue(1);
$local->setChecked(ilFMSettings::getInstance()->IsLocalFSEnabled());
$form->addItem($local);
$fs = new ilNumberInputGUI($GLOBALS['lng']->txt('fm_settings_filesize'), 'filesize');
$fs->setSuffix('MiB');
$fs->setSize(3);
$fs->setMaxLength(3);
$fs->setMinValue(1);
$fs->setMaxValue(999);
$fs->setInfo($GLOBALS['lng']->txt('fm_settings_filesize_info'));
$fs->setValue(ilFMSettings::getInstance()->getMaxFileSize());
$form->addItem($fs);
return $form;
}
示例5: 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;
}
示例6: initEditForm
function initEditForm($a_job_id)
{
global $ilCtrl, $lng;
$job = ilCronManager::getJobInstanceById($a_job_id);
if (!$job) {
$ilCtrl->redirect($this, "render");
}
$ilCtrl->setParameter($this, "jid", $a_job_id);
$data = array_pop(ilCronManager::getCronJobData($job->getId()));
include_once "Services/Cron/classes/class.ilCronJob.php";
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this, "update"));
$form->setTitle($lng->txt("cron_action_edit") . ': "' . $job->getTitle() . '"');
if ($job->hasFlexibleSchedule()) {
$type = new ilRadioGroupInputGUI($lng->txt("cron_schedule_type"), "type");
$type->setRequired(true);
$type->setValue($data["schedule_type"]);
$type->addOption(new ilRadioOption($lng->txt("cron_schedule_daily"), ilCronJob::SCHEDULE_TYPE_DAILY));
$type->addOption(new ilRadioOption($lng->txt("cron_schedule_weekly"), ilCronJob::SCHEDULE_TYPE_WEEKLY));
$type->addOption(new ilRadioOption($lng->txt("cron_schedule_monthly"), ilCronJob::SCHEDULE_TYPE_MONTHLY));
$type->addOption(new ilRadioOption($lng->txt("cron_schedule_quarterly"), ilCronJob::SCHEDULE_TYPE_QUARTERLY));
$type->addOption(new ilRadioOption($lng->txt("cron_schedule_yearly"), ilCronJob::SCHEDULE_TYPE_YEARLY));
$min = new ilRadioOption(sprintf($lng->txt("cron_schedule_in_minutes"), "x"), ilCronJob::SCHEDULE_TYPE_IN_MINUTES);
$mini = new ilNumberInputGUI($lng->txt("cron_schedule_value"), "smini");
$mini->setRequired(true);
$mini->setSize(5);
if ($data["schedule_type"] == ilCronJob::SCHEDULE_TYPE_IN_MINUTES) {
$mini->setValue($data["schedule_value"]);
}
$min->addSubItem($mini);
$type->addOption($min);
$hr = new ilRadioOption(sprintf($lng->txt("cron_schedule_in_hours"), "x"), ilCronJob::SCHEDULE_TYPE_IN_HOURS);
$hri = new ilNumberInputGUI($lng->txt("cron_schedule_value"), "shri");
$hri->setRequired(true);
$hri->setSize(5);
if ($data["schedule_type"] == ilCronJob::SCHEDULE_TYPE_IN_HOURS) {
$hri->setValue($data["schedule_value"]);
}
$hr->addSubItem($hri);
$type->addOption($hr);
$dy = new ilRadioOption(sprintf($lng->txt("cron_schedule_in_days"), "x"), ilCronJob::SCHEDULE_TYPE_IN_DAYS);
$dyi = new ilNumberInputGUI($lng->txt("cron_schedule_value"), "sdyi");
$dyi->setRequired(true);
$dyi->setSize(5);
if ($data["schedule_type"] == ilCronJob::SCHEDULE_TYPE_IN_DAYS) {
$dyi->setValue($data["schedule_value"]);
}
$dy->addSubItem($dyi);
$type->addOption($dy);
$form->addItem($type);
}
if ($job->hasCustomSettings()) {
$job->addCustomSettingsToForm($form);
}
$form->addCommandButton("update", $lng->txt("save"));
$form->addCommandButton("render", $lng->txt("cancel"));
return $form;
}
示例7: initForm
/**
* Init consultation hours form
*
* @param bool $a_insert
* @return ilPropertyFormGUI
*/
protected function initForm($a_insert = false)
{
global $ilCtrl, $ilUser, $lng;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
if ($a_insert) {
$form->setTitle($this->lng->txt("cont_insert_consultation_hours"));
} else {
$form->setTitle($this->lng->txt("cont_update_consultation_hours"));
}
$mode = new ilRadioGroupInputGUI($this->lng->txt("cont_cach_mode"), "mode");
$mode->setRequired(true);
$form->addItem($mode);
$opt_auto = new ilRadioOption($this->lng->txt("cont_cach_mode_automatic"), "auto");
$opt_auto->setInfo($this->lng->txt("cont_cach_mode_automatic_info"));
$mode->addOption($opt_auto);
$opt_manual = new ilRadioOption($this->lng->txt("cont_cach_mode_manual"), "manual");
$opt_manual->setInfo($this->lng->txt("cont_cach_mode_manual_info"));
$mode->addOption($opt_manual);
if (!$this->getPageConfig()->getEnablePCType("PlaceHolder")) {
include_once "Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php";
$grp_ids = ilConsultationHourGroups::getGroupsOfUser($ilUser->getId());
if (sizeof($grp_ids)) {
$this->lng->loadLanguageModule("dateplaner");
$groups = new ilCheckboxGroupInputGUI($this->lng->txt("cal_ch_app_grp"), "grp");
$groups->setRequired(true);
$opt_manual->addSubItem($groups);
foreach ($grp_ids as $grp_obj) {
$groups->addOption(new ilCheckboxOption($grp_obj->getTitle(), $grp_obj->getGroupId()));
}
} else {
$opt_manual->setDisabled(true);
}
} else {
$opt_manual->setDisabled(true);
}
if ($a_insert) {
$mode->setValue("auto");
$form->addCommandButton("create_consultation_hours", $this->lng->txt("select"));
$form->addCommandButton("cancelCreate", $this->lng->txt("cancel"));
} else {
// set values
$grp_ids = $this->content_obj->getGroupIds();
if (sizeof($grp_ids)) {
$mode->setValue("manual");
$groups->setValue($grp_ids);
} else {
$mode->setValue("auto");
}
$form->addCommandButton("update", $this->lng->txt("select"));
$form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
}
return $form;
}
示例8: initConfigurationForm
/**
* Init configuration form.
*
* @return object form object
*/
public function initConfigurationForm()
{
global $lng, $ilCtrl;
$pl = $this->getPluginObject();
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->addCommandButton("save", $lng->txt("save"));
$form->setTitle($pl->txt("plugin_configuration"));
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}
示例9: 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");
}
示例10: initSettingsForm
/**
*
*/
protected function initSettingsForm()
{
if (null == $this->form) {
$this->form = new ilPropertyFormGUI();
$this->form->setTitle($this->lng->txt('tos_tos_settings'));
$this->form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
$status = new ilCheckboxInputGUI($this->lng->txt('tos_status_enable'), 'tos_status');
$status->setInfo($this->lng->txt('tos_status_desc'));
$this->form->addItem($status);
$this->form->addCommandButton('saveSettings', $this->lng->txt('save'));
}
}
示例11: initForm
function initForm($a_mode)
{
global $ilCtrl, $lng, $ilSetting;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form_gui = new ilPropertyFormGUI();
$form_gui->setFormAction($ilCtrl->getFormAction($this));
$form_gui->setTitle($lng->txt("cont_ed_pglprop"));
// title
$title_input = new ilTextInputGUI($lng->txt("title"), "pgl_title");
$title_input->setSize(50);
$title_input->setMaxLength(128);
$title_input->setValue($this->layout_object->title);
$title_input->setTitle($lng->txt("title"));
$title_input->setRequired(true);
// description
$desc_input = new ilTextAreaInputGUI($lng->txt("description"), "pgl_desc");
$desc_input->setValue($this->layout_object->description);
$desc_input->setRows(3);
$desc_input->setCols(37);
$desc_input->setTitle($lng->txt("description"));
$desc_input->setRequired(false);
// modules
$mods = new ilCheckboxGroupInputGUI($this->lng->txt("modules"), "module");
// $mods->setRequired(true);
$mods->setValue($this->layout_object->getModules());
foreach (ilPageLayout::getAvailableModules() as $mod_id => $mod_caption) {
$mod = new ilCheckboxOption($mod_caption, $mod_id);
$mods->addOption($mod);
}
$form_gui->addItem($title_input);
$form_gui->addItem($desc_input);
$form_gui->addItem($mods);
// style
$fixed_style = $ilSetting->get("fixed_content_style_id");
$style_id = $this->layout_object->getStyleId();
if ($fixed_style > 0) {
$st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
$st->setValue(ilObject::_lookupTitle($fixed_style) . " (" . $this->lng->txt("global_fixed") . ")");
$form_gui->addItem($st);
} else {
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$st_styles = ilObjStyleSheet::_getStandardStyles(true, false);
$st_styles[0] = $this->lng->txt("default");
ksort($st_styles);
$style_sel = new ilSelectInputGUI($lng->txt("obj_sty"), "style_id");
$style_sel->setOptions($st_styles);
$style_sel->setValue($style_id);
$form_gui->addItem($style_sel);
}
$form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
return $form_gui;
}
示例12: initFormSettings
/**
* Init property form
*
* @return ilPropertyFormGUI $form
*/
protected function initFormSettings()
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt('tracking_settings'));
$form->setFormAction($this->ctrl->getFormAction($this));
// Mode
$mod = new ilRadioGroupInputGUI($this->lng->txt('trac_mode'), 'modus');
$mod->setRequired(true);
$mod->setValue($this->obj_settings->getMode());
$form->addItem($mod);
foreach ($this->obj_settings->getValidModes() as $mode_key => $mode_name) {
$opt = new ilRadioOption($mode_name, $mode_key, ilLPObjSettings::_mode2InfoText($mode_key));
$opt->setValue($mode_key);
$mod->addOption($opt);
// Subitem for vistits
if ($mode_key == LP_MODE_VISITS) {
$vis = new ilNumberInputGUI($this->lng->txt('trac_visits'), 'visits');
$vis->setSize(3);
$vis->setMaxLength(4);
$vis->setInfo(sprintf($this->lng->txt('trac_visits_info'), ilObjUserTracking::_getValidTimeSpan()));
$vis->setRequired(true);
$vis->setValue($this->obj_settings->getVisits());
$opt->addSubItem($vis);
}
}
/*
// Info Active
$act = new ilCustomInputGUI($this->lng->txt('trac_activated'), '');
$img = new ilTemplate('tpl.obj_settings_img_row.html',true,true,'Services/Tracking');
$img->setVariable("IMG_SRC",
$activated = ilObjUserTracking::_enabledLearningProgress()
? ilUtil::getImagePath('icon_ok.png')
: ilUtil::getImagePath('icon_not_ok.png')
);
$act->setHTML($img->get());
$form->addItem($act);
// Info Anonymized
$ano = new ilCustomInputGUI($this->lng->txt('trac_anonymized'), '');
$img = new ilTemplate('tpl.obj_settings_img_row.html',true,true,'Services/Tracking');
$img->setVariable("IMG_SRC",
$anonymized = !ilObjUserTracking::_enabledUserRelatedData()
? ilUtil::getImagePath('icon_ok.png')
: ilUtil::getImagePath('icon_not_ok.png')
);
$ano->setHTML($img->get());
$form->addItem($ano);
*/
$form->addCommandButton('saveSettings', $this->lng->txt('save'));
return $form;
}
示例13: initPropertiesForm
public function initPropertiesForm()
{
$this->form = new ilPropertyFormGUI();
// Title
$ti = new ilTextInputGUI($this->txt('title'), 'title');
$ti->setRequired(true);
$this->form->addItem($ti);
// Description
$ta = new ilTextAreaInputGUI($this->txt('description'), 'desc');
$this->form->addItem($ta);
$this->form->addCommandButton('updateProperties', $this->txt('save'));
$this->form->setTitle($this->txt('edit_properties'));
$this->form->setFormAction($this->ctrl->getFormAction($this));
}
示例14: showPersonalData
function showPersonalData()
{
// user_id $this->user_obj->getId()
// all
$this->psc_obj = new ilPaymentShoppingCart($this->user_obj);
if (!count($items = $this->psc_obj->getEntries($this->pm_id))) {
$this->tpl->setVariable("HEADER", $this->lng->txt('pay_bmf_your_order'));
$this->tpl->touchBlock("stop_floating");
ilUtil::sendInfo($this->lng->txt('pay_shopping_cart_empty'));
} else {
$this->tpl->setVariable("HEADER", $this->lng->txt('pay_step1'));
$this->tpl->setVariable("TITLE", $this->lng->txt('pay_bmf_personal_data'));
$this->tpl->setVariable("DESCRIPTION", $this->lng->txt('pay_bmf_description_personal_data'));
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$oForm = new ilPropertyFormGUI();
$oForm->setFormAction($this->ctrl->getFormAction($this, 'getPersonalData'));
$oForm->setTitle($this->lng->txt('pay_bmf_personal_data'));
$oFirstname = new ilNonEditableValueGUI($this->lng->txt('firstname'));
$oFirstname->setValue($this->user_obj->getFirstname());
$oForm->addItem($oFirstname);
$oLastname = new ilNonEditableValueGUI($this->lng->txt('lastname'));
$oLastname->setValue($this->user_obj->getLastname());
$oForm->addItem($oLastname);
$oStreet = new ilTextInputGUI($this->lng->txt('street'), 'street');
$oStreet->setValue($this->error != '' && isset($_POST['street']) ? ilUtil::prepareFormOutput($_POST['street'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['street'], true));
$oForm->addItem($oStreet);
$oHouseNumber = new ilTextInputGUI($this->lng->txt('pay_bmf_house_number'), 'house_number');
$oHouseNumber->setValue($this->error != '' && isset($_POST['house_number']) ? ilUtil::prepareFormOutput($_POST['house_number'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['house_number'], true));
$oForm->addItem($oHouseNumber);
$oPoBox = new ilTextInputGUI($this->lng->txt('pay_bmf_or') . ' ' . $this->lng->txt('pay_bmf_po_box'), 'po_box');
$oPoBox->setValue($this->error != '' && isset($_POST['po_box']) ? ilUtil::prepareFormOutput($_POST['po_box'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['po_box'], true));
$oForm->addItem($oPoBox);
$oZipCode = new ilTextInputGUI($this->lng->txt('zipcode'), 'zipcode');
$oZipCode->setValue($this->error != '' && isset($_POST['zipcode']) ? ilUtil::prepareFormOutput($_POST['zipcode'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['zipcode'], true));
$oForm->addItem($oZipCode);
$oCity = new ilTextInputGUI($this->lng->txt('city'), 'city');
$oCity->setValue($this->error != '' && isset($_POST['city']) ? ilUtil::prepareFormOutput($_POST['city'], true) : ilUtil::prepareFormOutput($_SESSION['bmf']['personal_data']['city'], true));
$oForm->addItem($oCity);
$oCountry = new ilSelectInputGUI($this->lng->txt('country'), 'country');
$oCountry->setOptions($this->__getCountries());
$oCountry->setValue($this->error != '' && isset($_POST['country']) ? $_POST['country'] : $_SESSION['bmf']['personal_data']['country']);
$oForm->addItem($oCountry);
$oEmail = new ilNonEditableValueGUI($this->lng->txt('email'));
$oEmail->setValue($this->user_obj->getEmail());
$oForm->addItem($oEmail);
$oForm->addcommandButton('getPersonalData', ucfirst($this->lng->txt('next')));
$this->tpl->setVariable('FORM', $oForm->getHTML());
}
}
示例15: initForm
/**
* Init ADT-based form
*
* @return ilADTGroupFormBridge $a_form
*/
protected function initForm()
{
global $tpl, $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this->gui, "updateAction"));
$adt_form = ilADTFactory::getInstance()->getFormBridgeForInstance($this->object->getProperties());
// has to be done BEFORE prepareFormElements() ...
$adt_form->setForm($form);
$this->prepareFormElements($adt_form);
$adt_form->addToForm();
$adt_form->addJS($tpl);
// :TODO:
$form->addCommandButton("updateAction", $lng->txt("save"));
return $adt_form;
}