本文整理汇总了PHP中ilPropertyFormGUI::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setTitle方法的具体用法?PHP ilPropertyFormGUI::setTitle怎么用?PHP ilPropertyFormGUI::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::setTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: getHTML
/**
* @return string
*/
public function getHTML()
{
global $tpl, $ilTabs, $ilCtrl, $lng;
$form = new ilPropertyFormGUI();
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, 'showContent'));
$form->setTitle($lng->txt('detail_view'));
// add link button if a link is defined in the settings
$set = new ilSetting("bibl");
$link = $set->get(strtolower($this->bibl_obj->getFiletype()));
if (!empty($link)) {
$form->addCommandButton('autoLink', 'Link');
}
$attributes = $this->entry->getAttributes();
//translate array key in order to sort by those keys
foreach ($attributes as $key => $attribute) {
//Check if there is a specific language entry
if ($lng->exists($key)) {
$strDescTranslated = $lng->txt($key);
} else {
$arrKey = explode("_", $key);
$is_standard_field = false;
switch ($arrKey[0]) {
case 'bib':
$is_standard_field = ilBibTex::isStandardField($arrKey[2]);
break;
case 'ris':
$is_standard_field = ilRis::isStandardField($arrKey[2]);
break;
}
// var_dump($is_standard_field); // FSX
if ($is_standard_field) {
$strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
} else {
$strDescTranslated = $arrKey[2];
}
}
unset($attributes[$key]);
$attributes[$strDescTranslated] = $attribute;
}
// sort attributes alphabetically by their array-key
ksort($attributes, SORT_STRING);
// render attributes to html
foreach ($attributes as $key => $attribute) {
$ci = new ilCustomInputGUI($key);
$ci->setHtml($attribute);
$form->addItem($ci);
}
// generate/render links to libraries
$settings = ilBibliographicSetting::getAll();
foreach ($settings as $set) {
$ci = new ilCustomInputGUI($set->getName());
$ci->setHtml($set->getButton($this->bibl_obj, $this->entry));
$form->addItem($ci);
}
$tpl->setPermanentLink("bibl", $this->bibl_obj->getRefId(), "_" . $_GET[ilObjBibliographicGUI::P_ENTRY_ID]);
// set content and title
return $form->getHTML();
//Permanent Link
}
示例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());
$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;
}
示例5: showDetails
/**
* @param ilObjBibliographic $bibl_obj
* @return void
*
*/
public function showDetails(ilObjBibliographic $bibl_obj)
{
global $tpl, $ilTabs, $ilCtrl, $lng;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$ilTabs->clearTargets();
$ilTabs->setBackTarget("back", $ilCtrl->getLinkTarget($this, 'showContent'));
$form->setTitle($lng->txt('detail_view'));
$entry = new ilBibliographicEntry($bibl_obj->getFiletype(), $_GET['entryId']);
$attributes = $entry->getAttributes();
//translate array key in order to sort by those keys
foreach ($attributes as $key => $attribute) {
//Check if there is a specific language entry
if ($lng->exists($key)) {
$strDescTranslated = $lng->txt($key);
} else {
$arrKey = explode("_", $key);
$strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
}
unset($attributes[$key]);
$attributes[$strDescTranslated] = $attribute;
}
// sort attributes alphabetically by their array-key
ksort($attributes, SORT_STRING);
// render attributes to html
foreach ($attributes as $key => $attribute) {
$ci = new ilCustomInputGUI($key);
$ci->setHtml($attribute);
$form->addItem($ci);
}
// set content and title
$tpl->setContent($form->getHTML());
//Permanent Link
$tpl->setPermanentLink("bibl", $bibl_obj->getRefId(), "_" . $_GET['entryId']);
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: _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;
}
示例10: 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;
}
示例11: initFormRoleTemplate
/**
* Init create form
* @param bool creation mode
* @return ilPropertyFormGUI $form
*/
protected function initFormRoleTemplate($a_mode = self::FORM_MODE_CREATE)
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
if ($this->creation_mode) {
$this->ctrl->setParameter($this, "new_type", 'rolt');
}
$form->setFormAction($this->ctrl->getFormAction($this));
if ($a_mode == self::FORM_MODE_CREATE) {
$form->setTitle($this->lng->txt('rolt_new'));
$form->addCommandButton('save', $this->lng->txt('rolt_new'));
} else {
$form->setTitle($this->lng->txt('rolt_edit'));
$form->addCommandButton('update', $this->lng->txt('save'));
}
$form->addCommandButton('cancel', $this->lng->txt('cancel'));
$title = new ilTextInputGUI($this->lng->txt('title'), 'title');
if ($a_mode != self::FORM_MODE_CREATE) {
if ($this->object->isInternalTemplate()) {
$title->setDisabled(true);
}
$title->setValue($this->object->getTitle());
}
$title->setSize(40);
$title->setMaxLength(70);
$title->setRequired(true);
$form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
if ($a_mode != self::FORM_MODE_CREATE) {
$desc->setValue($this->object->getDescription());
}
$desc->setCols(40);
$desc->setRows(3);
$form->addItem($desc);
if ($a_mode != self::FORM_MODE_CREATE) {
$ilias_id = new ilNonEditableValueGUI($this->lng->txt("ilias_id"), "ilias_id");
$ilias_id->setValue('il_' . IL_INST_ID . '_' . ilObject::_lookupType($this->object->getId()) . '_' . $this->object->getId());
$form->addItem($ilias_id);
}
$pro = new ilCheckboxInputGUI($this->lng->txt('role_protect_permissions'), 'protected');
$pro->setChecked($GLOBALS['rbacreview']->isProtected($this->rolf_ref_id, $this->object->getId()));
$pro->setValue(1);
$form->addItem($pro);
return $form;
}
示例12: getSettingsForm
/**
* @return ilPropertyFormGUI
*/
protected function getSettingsForm()
{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt('settings'));
require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_ACCESSIBILITY, $form, $this);
return $form;
}
示例13: configure
/**
* Configuration gui.
*/
function configure()
{
global $tpl;
$pl = $this->getPluginObject();
$form = new ilPropertyFormGUI();
$form->setTitle($pl->txt('roomsharing_plugin_configuration'));
$form->setDescription($pl->txt('roomsharing_plugin_config_not_required'));
$tpl->setContent($form->getHTML());
}
示例14: edit
/**
* Edit resources form.
*/
public function edit($a_insert = false)
{
global $ilCtrl, $tpl, $lng, $objDefinition;
$this->displayValidationError();
// edit form
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_login_page"));
} else {
$form->setTitle($this->lng->txt("cont_update_login_page"));
}
// type selection
$type_prop = new ilRadioGroupInputGUI($this->lng->txt("cont_type"), "type");
foreach (ilPCLoginPageElement::getAllTypes() as $index => $lang_key) {
$types[$index] = $this->lng->txt('cont_lpe_' . $lang_key);
$option = new ilRadioOption($this->lng->txt('cont_lpe_' . $lang_key), $index);
$type_prop->addOption($option);
}
$selected = $a_insert ? "" : $this->content_obj->getLoginPageElementType();
$type_prop->setValue($selected);
$form->addItem($type_prop);
// horizonal align
$align_prop = new ilSelectInputGUI($this->lng->txt("cont_align"), "horizontal_align");
$options = array("Left" => $lng->txt("cont_left"), "Center" => $lng->txt("cont_center"), "Right" => $lng->txt("cont_right"));
# "LeftFloat" => $lng->txt("cont_left_float"),
# "RightFloat" => $lng->txt("cont_right_float"));
$align_prop->setOptions($options);
$align_prop->setValue($this->content_obj->getAlignment());
$form->addItem($align_prop);
// save/cancel buttons
if ($a_insert) {
$form->addCommandButton("create_login_page_element", $lng->txt("save"));
$form->addCommandButton("cancelCreate", $lng->txt("cancel"));
} else {
$form->addCommandButton("update_login_page_element", $lng->txt("save"));
$form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
}
$html = $form->getHTML();
$tpl->setContent($html);
return $ret;
}
示例15: 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;
}