本文整理汇总了PHP中ilNumberInputGUI::setInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP ilNumberInputGUI::setInfo方法的具体用法?PHP ilNumberInputGUI::setInfo怎么用?PHP ilNumberInputGUI::setInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilNumberInputGUI
的用法示例。
在下文中一共展示了ilNumberInputGUI::setInfo方法的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: addCustomSettingsToForm
public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
{
global $lng, $ilSetting;
$num_days = new ilNumberInputGUI($lng->txt('payment_notification_days'), 'payment_notification_days');
$num_days->setSize(3);
$num_days->setMinValue(0);
$num_days->setMaxValue(120);
$num_days->setRequired(true);
$num_days->setValue($ilSetting->get('payment_notification_days'));
$num_days->setInfo($lng->txt('payment_notification_days_desc'));
$a_form->addItem($num_days);
}
示例4: 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;
}
示例5: initPluginSettings
public function initPluginSettings()
{
if ($this->getAdminConfigObject()->getDefaultAllowPublicLinksConfigAllowPublicLinks() && $this->getAdminConfigObject()->getDefaultAllowPublicLinks()) {
$public_links = new ilCheckboxInputGUI($this->txt("activate_public_links"), "activate_public_links");
$public_links->setInfo($this->txt("info_activate_public_links"));
$this->form->addItem($public_links);
}
if ($this->getAdminConfigObject()->getConfigMaxFileSize()) {
$max_file_size = new ilNumberInputGUI($this->txt("max_file_size"), "max_file_size");
$max_file_size->setInfo($this->txt("info_max_file_size"));
$max_file_size->setMaxLength(10);
$max_file_size->setSize(10);
$this->form->addItem($max_file_size);
}
}
示例6: editSettings
/**
* Edit personal desktop settings.
*/
public function editSettings()
{
global $ilCtrl, $lng, $ilSetting;
$pd_set = new ilSetting("pd");
$enable_calendar = ilCalendarSettings::_getInstance()->isEnabled();
#$enable_calendar = $ilSetting->get("enable_calendar");
$enable_block_moving = $pd_set->get("enable_block_moving");
$enable_active_users = $ilSetting->get("block_activated_pdusers");
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("pd_settings"));
// Enable calendar
$cb_prop = new ilCheckboxInputGUI($lng->txt("enable_calendar"), "enable_calendar");
$cb_prop->setValue("1");
//$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
$cb_prop->setChecked($enable_calendar);
$form->addItem($cb_prop);
// Enable bookmarks
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_bookmarks"), "enable_bookmarks");
$cb_prop->setValue("1");
$cb_prop->setChecked($ilSetting->get("disable_bookmarks") ? "0" : "1");
$form->addItem($cb_prop);
// Enable contacts
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_contacts"), "enable_contacts");
$cb_prop->setValue("1");
$cb_prop->setChecked($ilSetting->get("disable_contacts") ? "0" : "1");
$cb_prop_requires_mail = new ilCheckboxInputGUI($lng->txt('pd_enable_contacts_requires_mail'), 'enable_contacts_require_mail');
$cb_prop_requires_mail->setValue("1");
$cb_prop_requires_mail->setChecked($ilSetting->get("disable_contacts_require_mail") ? "0" : "1");
$cb_prop->addSubItem($cb_prop_requires_mail);
$form->addItem($cb_prop);
// Enable notes
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
$cb_prop->setValue("1");
$cb_prop->setChecked($ilSetting->get("disable_notes") ? "0" : "1");
$form->addItem($cb_prop);
// Enable notes
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_comments"), "enable_comments");
$cb_prop->setValue("1");
$cb_prop->setChecked($ilSetting->get("disable_comments") ? "0" : "1");
$form->addItem($cb_prop);
$comm_del_user = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_user"), "comm_del_user");
$comm_del_user->setChecked($ilSetting->get("comments_del_user", 0));
$cb_prop->addSubItem($comm_del_user);
$comm_del_tutor = new ilCheckboxInputGUI($lng->txt("pd_enable_comments_del_tutor"), "comm_del_tutor");
$comm_del_tutor->setChecked($ilSetting->get("comments_del_tutor", 1));
$cb_prop->addSubItem($comm_del_tutor);
// Enable Chatviewer
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_chatviewer"), "block_activated_chatviewer");
$cb_prop->setValue("1");
$cb_prop->setChecked($ilSetting->get("block_activated_chatviewer"));
$form->addItem($cb_prop);
// Enable block moving
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_block_moving"), "enable_block_moving");
$cb_prop->setValue("1");
$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
$cb_prop->setChecked($enable_block_moving);
$form->addItem($cb_prop);
// Enable active users block
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_active_users"), "block_activated_pdusers");
$cb_prop->setValue("1");
$cb_prop->setChecked($enable_active_users);
// maximum inactivity time
$ti_prop = new ilNumberInputGUI($lng->txt("pd_time_before_removal"), "time_removal");
$ti_prop->setValue($pd_set->get("user_activity_time"));
$ti_prop->setInfo($lng->txt("pd_time_before_removal_info"));
$ti_prop->setMaxLength(3);
$ti_prop->setSize(3);
$cb_prop->addSubItem($ti_prop);
// osi host
// see http://www.onlinestatus.org
$ti_prop = new ilTextInputGUI($lng->txt("pd_osi_host"), "osi_host");
$ti_prop->setValue($pd_set->get("osi_host"));
$ti_prop->setInfo($lng->txt("pd_osi_host_info") . ' <a href="http://www.onlinestatus.org" target="_blank">http://www.onlinestatus.org</a>');
$cb_prop->addSubItem($ti_prop);
$form->addItem($cb_prop);
// Enable 'My Offers' (default personal items)
$cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');
$cb_prop->setValue('1');
$cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));
$cb_prop->setChecked($ilSetting->get('disable_my_offers') ? '0' : '1');
$form->addItem($cb_prop);
// Enable 'My Memberships'
$cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');
$cb_prop->setValue('1');
$cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));
$cb_prop->setChecked($ilSetting->get('disable_my_memberships') ? '0' : '1');
$form->addItem($cb_prop);
if ($ilSetting->get('disable_my_offers') == 0 && $ilSetting->get('disable_my_memberships') == 0) {
// Default view of personal items
$sb_prop = new ilSelectInputGUI($lng->txt('pd_personal_items_default_view'), 'personal_items_default_view');
$sb_prop->setInfo($lng->txt('pd_personal_items_default_view_info'));
$option = array();
$option[0] = $lng->txt('pd_my_offers');
$option[1] = $lng->txt('my_courses_groups');
$sb_prop->setOptions($option);
//.........这里部分代码省略.........
示例7: initJavaServerIniForm
protected function initJavaServerIniForm()
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$GLOBALS['lng']->loadLanguageModule('search');
$this->form->setTitle($this->lng->txt('lucene_tbl_create_ini'));
$this->form->setFormAction($this->ctrl->getFormAction($this, 'createJavaServerIni'));
$this->form->addCommandButton('downloadJavaServerIni', $this->lng->txt('lucene_download_ini'));
$this->form->addCommandButton('showJavaServer', $this->lng->txt('cancel'));
// Host
$ip = new ilTextInputGUI($this->lng->txt('lucene_host'), 'ho');
$ip->setInfo($this->lng->txt('lucene_host_info'));
$ip->setMaxLength(128);
$ip->setSize(32);
$ip->setRequired(true);
$this->form->addItem($ip);
// Port
$port = new ilNumberInputGUI($this->lng->txt('lucene_port'), 'po');
$port->setSize(5);
$port->setMinValue(1);
$port->setMaxValue(65535);
$port->setRequired(true);
$this->form->addItem($port);
// Index Path
$path = new ilTextInputGUI($this->lng->txt('lucene_index_path'), 'in');
$path->setSize(80);
$path->setMaxLength(1024);
$path->setInfo($this->lng->txt('lucene_index_path_info'));
$path->setRequired(true);
$this->form->addItem($path);
// Logging
$log = new ilTextInputGUI($this->lng->txt('lucene_log'), 'lo');
$log->setSize(80);
$log->setMaxLength(1024);
$log->setInfo($this->lng->txt('lucene_log_info'));
$log->setRequired(true);
$this->form->addItem($log);
// Level
$lev = new ilSelectInputGUI($this->lng->txt('lucene_level'), 'le');
$lev->setOptions(array('DEBUG' => 'DEBUG', 'INFO' => 'INFO', 'WARN' => 'WARN', 'ERROR' => 'ERROR', 'FATAL' => 'FATAL'));
$lev->setValue('INFO');
$lev->setRequired(true);
$this->form->addItem($lev);
// CPU
$cpu = new ilNumberInputGUI($this->lng->txt('lucene_cpu'), 'cp');
$cpu->setValue(1);
$cpu->setSize(1);
$cpu->setMaxLength(2);
$cpu->setMinValue(1);
$cpu->setRequired(true);
$this->form->addItem($cpu);
// Max file size
$fs = new ilNumberInputGUI($this->lng->txt('lucene_max_fs'), 'fs');
$fs->setInfo($this->lng->txt('lucene_max_fs_info'));
$fs->setValue(500);
$fs->setSize(4);
$fs->setMaxLength(4);
$fs->setMinValue(1);
$fs->setRequired(true);
$this->form->addItem($fs);
return true;
}
示例8: populateQuestionSpecificFormPart
public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
{
// maxchars
$maxchars = new ilNumberInputGUI($this->lng->txt("maxchars"), "maxchars");
$maxchars->setInfo($this->lng->txt('qpl_maxchars_info_numeric_question'));
$maxchars->setSize(10);
$maxchars->setDecimals(0);
$maxchars->setMinValue(1);
$maxchars->setRequired(true);
if ($this->object->getMaxChars() > 0) {
$maxchars->setValue($this->object->getMaxChars());
}
$form->addItem($maxchars);
}
示例9: editQuestion
/**
* Creates an output of the edit form for the question
*
* @access public
*/
public function editQuestion($checkonly = FALSE)
{
$save = $this->isSaveCommand();
$this->getQuestionTemplate();
# if ($_REQUEST['prev_qid']) {
# $this->ctrl->setParameter($this, 'prev_qid', $_REQUEST['prev_qid']);
# }
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->outQuestionType());
$form->setMultipart(FALSE);
$form->setTableWidth("100%");
$form->setId("assclozetest");
// title, author, description, question, working time (assessment mode)
$this->addBasicQuestionFormProperties($form);
$q_item = $form->getItemByPostVar("question");
$q_item->setInfo($this->lng->txt("close_text_hint"));
$q_item->setTitle($this->lng->txt("cloze_text"));
// text rating
if (!$this->getSelfAssessmentEditingMode()) {
$textrating = new ilSelectInputGUI($this->lng->txt("text_rating"), "textgap_rating");
$text_options = array("ci" => $this->lng->txt("cloze_textgap_case_insensitive"), "cs" => $this->lng->txt("cloze_textgap_case_sensitive"), "l1" => sprintf($this->lng->txt("cloze_textgap_levenshtein_of"), "1"), "l2" => sprintf($this->lng->txt("cloze_textgap_levenshtein_of"), "2"), "l3" => sprintf($this->lng->txt("cloze_textgap_levenshtein_of"), "3"), "l4" => sprintf($this->lng->txt("cloze_textgap_levenshtein_of"), "4"), "l5" => sprintf($this->lng->txt("cloze_textgap_levenshtein_of"), "5"));
$textrating->setOptions($text_options);
$textrating->setValue($this->object->getTextgapRating());
$form->addItem($textrating);
// text field length
$fixedTextLength = new ilNumberInputGUI($this->lng->txt("cloze_fixed_textlength"), "fixedTextLength");
$fixedTextLength->setValue(ilUtil::prepareFormOutput($this->object->getFixedTextLength()));
$fixedTextLength->setMinValue(0);
$fixedTextLength->setSize(3);
$fixedTextLength->setMaxLength(6);
$fixedTextLength->setInfo($this->lng->txt('cloze_fixed_textlength_description'));
$fixedTextLength->setRequired(false);
$form->addItem($fixedTextLength);
// identical scoring
$identical_scoring = new ilCheckboxInputGUI($this->lng->txt("identical_scoring"), "identical_scoring");
$identical_scoring->setValue(1);
$identical_scoring->setChecked($this->object->getIdenticalScoring());
$identical_scoring->setInfo($this->lng->txt('identical_scoring_desc'));
$identical_scoring->setRequired(FALSE);
$form->addItem($identical_scoring);
}
for ($i = 0; $i < $this->object->getGapCount(); $i++) {
$gap = $this->object->getGap($i);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("gap") . " " . ($i + 1));
$form->addItem($header);
$gapcounter = new ilHiddenInputGUI("gap[{$i}]");
$gapcounter->setValue($i);
$form->addItem($gapcounter);
$gaptype = new ilSelectInputGUI($this->lng->txt('type'), "clozetype_{$i}");
$options = array(0 => $this->lng->txt("text_gap"), 1 => $this->lng->txt("select_gap"), 2 => $this->lng->txt("numeric_gap"));
$gaptype->setOptions($options);
$gaptype->setValue($gap->getType());
$form->addItem($gaptype);
if ($gap->getType() == CLOZE_TEXT) {
// Choices
include_once "./Modules/TestQuestionPool/classes/class.ilAnswerWizardInputGUI.php";
include_once "./Modules/TestQuestionPool/classes/class.assAnswerCloze.php";
$values = new ilAnswerWizardInputGUI($this->lng->txt("values"), "gap_" . $i . "");
$values->setRequired(true);
$values->setQuestionObject($this->object);
$values->setSingleline(true);
$values->setAllowMove(false);
if (count($gap->getItemsRaw()) == 0) {
$gap->addItem(new assAnswerCloze("", 0, 0));
}
$values->setValues($gap->getItemsRaw());
$form->addItem($values);
} else {
if ($gap->getType() == CLOZE_SELECT) {
include_once "./Modules/TestQuestionPool/classes/class.ilAnswerWizardInputGUI.php";
include_once "./Modules/TestQuestionPool/classes/class.assAnswerCloze.php";
$values = new ilAnswerWizardInputGUI($this->lng->txt("values"), "gap_" . $i . "");
$values->setRequired(true);
$values->setQuestionObject($this->object);
$values->setSingleline(true);
$values->setAllowMove(false);
if (count($gap->getItemsRaw()) == 0) {
$gap->addItem(new assAnswerCloze("", 0, 0));
}
$values->setValues($gap->getItemsRaw());
$form->addItem($values);
// shuffle
$shuffle = new ilCheckboxInputGUI($this->lng->txt("shuffle_answers"), "shuffle_" . $i . "");
$shuffle->setValue(1);
$shuffle->setChecked($gap->getShuffle());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
} else {
if ($gap->getType() == CLOZE_NUMERIC) {
if (count($gap->getItemsRaw()) == 0) {
$gap->addItem(new assAnswerCloze("", 0, 0));
}
//.........这里部分代码省略.........
示例10: initForm
/**
* Build property form
* @param string $a_mode
* @param int $id
* @return object
*/
function initForm($a_mode = "create", $id = NULL)
{
global $lng, $ilCtrl;
$lng->loadLanguageModule("dateplaner");
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form_gui = new ilPropertyFormGUI();
$title = new ilTextInputGUI($lng->txt("title"), "title");
$title->setRequired(true);
$title->setSize(40);
$title->setMaxLength(120);
$form_gui->addItem($title);
/*
$type = new ilRadioGroupInputGUI($lng->txt("book_schedule_type"), "type");
$type->setRequired(true);
$form_gui->addItem($type);
$fix = new ilRadioOption($lng->txt("book_schedule_type_fix"), "fix");
$fix->setInfo($lng->txt("book_schedule_type_fix_info"));
$type->addOption($fix);
$flex = new ilRadioOption($lng->txt("book_schedule_type_flexible"), "flexible");
$flex->setInfo($lng->txt("book_schedule_type_flexible_info"));
$type->addOption($flex);
$raster = new ilNumberInputGUI($lng->txt("book_schedule_raster"), "raster");
$raster->setRequired(true);
$raster->setInfo($lng->txt("book_schedule_raster_info"));
$raster->setMinValue(1);
$raster->setSize(3);
$raster->setMaxLength(3);
$raster->setSuffix($lng->txt("book_minutes"));
$flex->addSubItem($raster);
$rent_min = new ilNumberInputGUI($lng->txt("book_schedule_rent_min"), "rent_min");
$rent_min->setInfo($lng->txt("book_schedule_rent_info"));
$rent_min->setMinValue(1);
$rent_min->setSize(3);
$rent_min->setMaxLength(3);
$flex->addSubItem($rent_min);
$rent_max = new ilNumberInputGUI($lng->txt("book_schedule_rent_max"), "rent_max");
$rent_max->setInfo($lng->txt("book_schedule_rent_info"));
$rent_max->setMinValue(1);
$rent_max->setSize(3);
$rent_max->setMaxLength(3);
$flex->addSubItem($rent_max);
$break = new ilNumberInputGUI($lng->txt("book_schedule_break"), "break");
$break->setInfo($lng->txt("book_schedule_break_info"));
$break->setMinValue(1);
$break->setSize(3);
$break->setMaxLength(3);
$flex->addSubItem($break);
*/
include_once "Modules/BookingManager/classes/class.ilScheduleInputGUI.php";
$definition = new ilScheduleInputGUI($lng->txt("book_schedule_days"), "days");
$definition->setInfo($lng->txt("book_schedule_days_info"));
$definition->setRequired(true);
$form_gui->addItem($definition);
$deadline = new ilNumberInputGUI($lng->txt("book_deadline"), "deadline");
$deadline->setInfo($lng->txt("book_deadline_info"));
$deadline->setSuffix($lng->txt("book_hours"));
$deadline->setMinValue(0);
$deadline->setSize(3);
$deadline->setMaxLength(3);
$form_gui->addItem($deadline);
if ($a_mode == "edit") {
$form_gui->setTitle($lng->txt("book_edit_schedule"));
$item = new ilHiddenInputGUI('schedule_id');
$item->setValue($id);
$form_gui->addItem($item);
include_once 'Modules/BookingManager/classes/class.ilBookingSchedule.php';
$schedule = new ilBookingSchedule($id);
$title->setValue($schedule->getTitle());
$deadline->setValue($schedule->getDeadline());
/*
if($schedule->getRaster())
{
$type->setValue("flexible");
$raster->setValue($schedule->getRaster());
$rent_min->setValue($schedule->getMinRental());
$rent_max->setValue($schedule->getMaxRental());
$break->setValue($schedule->getAutoBreak());
}
else
{
$type->setValue("fix");
}
*/
$definition->setValue($schedule->getDefinitionBySlots());
$form_gui->addCommandButton("update", $lng->txt("save"));
} else {
$form_gui->setTitle($lng->txt("book_add_schedule"));
$form_gui->addCommandButton("save", $lng->txt("save"));
$form_gui->addCommandButton("render", $lng->txt("cancel"));
}
//.........这里部分代码省略.........
示例11: editPriceObject
public function editPriceObject()
{
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$price_id = $_GET['price_id'] ? $_GET['price_id'] : $_POST['price_id'];
$price = ilPaymentPrices::_getPrice($price_id);
$this->ctrl->setParameter($this, 'pobject_id', (int) $_GET['pobject_id']);
$tmp_pobject = ilPaymentObject::_getObjectData($_GET['pobject_id']);
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$tmp_obj = ilObjectFactory::getInstanceByRefId($tmp_pobject['ref_id'], false);
if ($tmp_obj) {
$form->setTitle($tmp_obj->getTitle());
} else {
$form->setTitle($this->lng->txt('object_not_found'));
}
//price_type
$radio_group = new ilRadioGroupInputGUI('', 'price_type');
$radio_group->setTitle($this->lng->txt('duration'));
$radio_group->setRequired(true);
$radio_group->setValue($price['price_type']);
$radio_group->setPostVar('price_type');
$radio_option_1 = new ilRadioOption($this->lng->txt('duration_month'), ilPaymentPrices::TYPE_DURATION_MONTH);
// duration month
$oDuration = new ilNumberInputGUI();
$oDuration->setTitle($this->lng->txt('paya_months'));
$oDuration->setSize('20%');
$oDuration->setValue($price['duration']);
$oDuration->setPostVar('duration_month');
$radio_option_1->addSubItem($oDuration);
$radio_group->addOption($radio_option_1);
$radio_option_3 = new ilRadioOption($this->lng->txt('duration_date'), ilPaymentPrices::TYPE_DURATION_DATE);
// duration_date from
$o_date_from = new ilDateTimeInputGUI();
$o_date_from->setTitle($this->lng->txt('cal_from'));
$o_date_from->setDate(new ilDate($price['duration_from'], IL_CAL_DATE));
$o_date_from->setPostVar('duration_date_from');
$radio_option_3->addSubItem($o_date_from);
// duration_date until
$o_date_until = new ilDateTimeInputGUI();
$o_date_until->setTitle($this->lng->txt('cal_until'));
$o_date_until->setDate(new ilDate($price['duration_until'], IL_CAL_DATE));
$o_date_until->setPostVar('duration_date_until');
$radio_option_3->addSubItem($o_date_until);
$radio_group->addOption($radio_option_3);
$radio_option_2 = new ilRadioOption($this->lng->txt('unlimited_duration'), ilPaymentPrices::TYPE_UNLIMITED_DURATION);
$radio_group->addOption($radio_option_2);
$form->addItem($radio_group);
// description
$oDescription = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
$oDescription->setRows(4);
$oDescription->setCols(35);
$oDescription->setValue($price['description']);
$form->addItem($oDescription);
// price
$oPrice = new ilNumberInputGUI();
$oPrice->setTitle($this->lng->txt('price_a'));
$oPrice->setSize('20%');
$oPrice->setRequired(true);
$oPrice->setValue($price['price']);
include_once './Services/Payment/classes/class.ilPaymentSettings.php';
$genSet = ilPaymentSettings::_getInstance();
$oPrice->setInfo($genSet->get('currency_unit'));
$oPrice->setPostVar('price');
$oPrice->allowDecimals(true);
$form->addItem($oPrice);
//extension
$oExtension = new ilCheckboxInputGUI($this->lng->txt('extension_price'), 'extension');
$oExtension->setChecked($price['extension']);
$form->addItem($oExtension);
$o_hidden_1 = new ilHiddenInputGUI('pobject_id');
$o_hidden_1->setValue((int) $_GET['pobject_id']);
$o_hidden_1->setPostVar('pobject_id');
$o_hidden_2 = new ilHiddenInputGUI('price_id');
$o_hidden_2->setValue((int) $_GET['price_id']);
$o_hidden_2->setPostVar('price_id');
$form->addItem($o_hidden_1);
$form->addItem($o_hidden_2);
$form->addCommandButton('updatePrice', $this->lng->txt('save'));
$form->addCommandButton('editPrices', $this->lng->txt('cancel'));
$this->tpl->setVariable('FORM', $form->getHTML());
}
示例12: populateQuestionSpecificFormPart
public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
{
// shuffle
$shuffle = new ilCheckboxInputGUI($this->lng->txt("shuffle_answers"), "shuffle");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getShuffle());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
if ($this->object->getId()) {
$hidden = new ilHiddenInputGUI("", "ID");
$hidden->setValue($this->object->getId());
$form->addItem($hidden);
}
if (!$this->object->getSelfAssessmentEditingMode()) {
$isSingleline = $this->object->lastChange == 0 && !array_key_exists('types', $_POST) ? $this->object->getMultilineAnswerSetting() ? false : true : $this->object->isSingleline;
// Answer types
$types = new ilSelectInputGUI($this->lng->txt("answer_types"), "types");
$types->setRequired(false);
$types->setValue($isSingleline ? 0 : 1);
$types->setOptions(array(0 => $this->lng->txt('answers_singleline'), 1 => $this->lng->txt('answers_multiline')));
$form->addItem($types);
}
if ($isSingleline) {
// thumb size
$thumb_size = new ilNumberInputGUI($this->lng->txt("thumb_size"), "thumb_size");
$thumb_size->setMinValue(20);
$thumb_size->setDecimals(0);
$thumb_size->setSize(6);
$thumb_size->setInfo($this->lng->txt('thumb_size_info'));
$thumb_size->setValue($this->object->getThumbSize());
$thumb_size->setRequired(false);
$form->addItem($thumb_size);
return $isSingleline;
}
return $isSingleline;
}
示例13: initLoginSettingsForm
private function initLoginSettingsForm()
{
$this->setSubTabs('settings');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('loginname_settings');
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$this->loginSettingsForm = new ilPropertyFormGUI();
$this->loginSettingsForm->setFormAction($this->ctrl->getFormAction($this, 'saveLoginnameSettings'));
$this->loginSettingsForm->setTitle($this->lng->txt('loginname_settings'));
$chbChangeLogin = new ilCheckboxInputGUI($this->lng->txt('allow_change_loginname'), 'allow_change_loginname');
$chbChangeLogin->setValue(1);
$this->loginSettingsForm->addItem($chbChangeLogin);
$chbCreateHistory = new ilCheckboxInputGUI($this->lng->txt('history_loginname'), 'create_history_loginname');
$chbCreateHistory->setInfo($this->lng->txt('loginname_history_info'));
$chbCreateHistory->setValue(1);
$chbChangeLogin->addSubItem($chbCreateHistory);
$chbReuseLoginnames = new ilCheckboxInputGUI($this->lng->txt('reuse_of_loginnames_contained_in_history'), 'reuse_of_loginnames');
$chbReuseLoginnames->setValue(1);
$chbReuseLoginnames->setInfo($this->lng->txt('reuse_of_loginnames_contained_in_history_info'));
$chbChangeLogin->addSubItem($chbReuseLoginnames);
$chbChangeBlockingTime = new ilNumberInputGUI($this->lng->txt('loginname_change_blocking_time'), 'loginname_change_blocking_time');
$chbChangeBlockingTime->allowDecimals(true);
$chbChangeBlockingTime->setSuffix($this->lng->txt('days'));
$chbChangeBlockingTime->setInfo($this->lng->txt('loginname_change_blocking_time_info'));
$chbChangeBlockingTime->setSize(10);
$chbChangeBlockingTime->setMaxLength(10);
$chbChangeLogin->addSubItem($chbChangeBlockingTime);
$this->loginSettingsForm->addCommandButton('saveLoginnameSettings', $this->lng->txt('save'));
}
示例14: initForm
private function initForm()
{
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this, 'save'));
$this->form->setTitle($this->lng->txt('general_settings'));
// Subject prefix
$pre = new ilTextInputGUI($this->lng->txt('mail_subject_prefix'), 'mail_subject_prefix');
$pre->setSize(12);
$pre->setMaxLength(32);
$pre->setInfo($this->lng->txt('mail_subject_prefix_info'));
$this->form->addItem($pre);
// incoming type
include_once 'Services/Mail/classes/class.ilMailOptions.php';
$options = array(IL_MAIL_LOCAL => $this->lng->txt('mail_incoming_local'), IL_MAIL_EMAIL => $this->lng->txt('mail_incoming_smtp'), IL_MAIL_BOTH => $this->lng->txt('mail_incoming_both'));
$si = new ilSelectInputGUI($this->lng->txt('mail_incoming'), 'mail_incoming_mail');
$si->setOptions($options);
$this->ctrl->setParameterByClass('ilobjuserfoldergui', 'ref_id', USER_FOLDER_ID);
$si->setInfo(sprintf($this->lng->txt('mail_settings_incoming_type_see_also'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'settings')));
$this->ctrl->clearParametersByClass('ilobjuserfoldergui');
$this->form->addItem($si);
// noreply address
$ti = new ilTextInputGUI($this->lng->txt('mail_external_sender_noreply'), 'mail_external_sender_noreply');
$ti->setInfo($this->lng->txt('info_mail_external_sender_noreply'));
$ti->setMaxLength(255);
$this->form->addItem($ti);
$system_sender_name = new ilTextInputGUI($this->lng->txt('mail_system_sender_name'), 'mail_system_sender_name');
$system_sender_name->setInfo($this->lng->txt('mail_system_sender_name_info'));
$system_sender_name->setMaxLength(255);
$this->form->addItem($system_sender_name);
$cb = new ilCheckboxInputGUI($this->lng->txt('mail_use_pear_mail'), 'pear_mail_enable');
$cb->setInfo($this->lng->txt('mail_use_pear_mail_info'));
$cb->setValue(1);
$this->form->addItem($cb);
// prevent smtp mails
$cb = new ilCheckboxInputGUI($this->lng->txt('mail_prevent_smtp_globally'), 'prevent_smtp_globally');
$cb->setValue(1);
$this->form->addItem($cb);
$cron_mail = new ilSelectInputGUI($this->lng->txt('cron_mail_notification'), 'mail_notification');
$cron_options = array(0 => $this->lng->txt('cron_mail_notification_never'), 1 => $this->lng->txt('cron_mail_notification_cron'));
$cron_mail->setOptions($cron_options);
$cron_mail->setInfo($this->lng->txt('cron_mail_notification_desc'));
$this->form->addItem($cron_mail);
// section header
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($this->lng->txt('mail') . ' (' . $this->lng->txt('internal_system') . ')');
$this->form->addItem($sh);
// max attachment size
$ti = new ilNumberInputGUI($this->lng->txt('mail_maxsize_attach'), 'mail_maxsize_attach');
$ti->setSuffix($this->lng->txt('kb'));
$ti->setInfo($this->lng->txt('mail_max_size_attachments_total'));
$ti->setMaxLength(10);
$ti->setSize(10);
$this->form->addItem($ti);
// Course/Group member notification
$mn = new ilFormSectionHeaderGUI();
$mn->setTitle($this->lng->txt('mail_member_notification'));
$this->form->addItem($mn);
include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_MAIL, $this->form, $this);
$this->form->addCommandButton('save', $this->lng->txt('save'));
}
示例15: populateQuestionSpecificFormPart
public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
{
$orderingtype = $this->getOrderingTypeFromPost();
// Edit mode
$hidden = new ilHiddenInputGUI("ordering_type");
$hidden->setValue($orderingtype);
$form->addItem($hidden);
if (!$this->object->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);
}
// points
$points = new ilNumberInputGUI($this->lng->txt("points"), "points");
$points->allowDecimals(true);
$points->setValue($this->object->getPoints());
$points->setRequired(TRUE);
$points->setSize(3);
$points->setMinValue(0);
$points->setMinvalueShouldBeGreater(true);
$form->addItem($points);
return $form;
}