本文整理汇总了PHP中ilNonEditableValueGUI类的典型用法代码示例。如果您正苦于以下问题:PHP ilNonEditableValueGUI类的具体用法?PHP ilNonEditableValueGUI怎么用?PHP ilNonEditableValueGUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilNonEditableValueGUI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilLicenseGUI.php
示例2: initPluginSettings
protected function initPluginSettings()
{
$n = new ilNonEditableValueGUI($this->getPluginHookObject()->txt('info_token_expires'));
$n->setValue(date(DATE_ISO8601, $this->getPluginObject()->getValidThrough()));
$this->form->addItem($n);
$this->form->getItemByPostVar('root_folder')->setDisabled(true);
}
开发者ID:pschmitt77,项目名称:OneDrive,代码行数:7,代码来源:class.ilOneDriveSettingsGUI.php
示例3: InvoiceNumberObject
public function InvoiceNumberObject()
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$invObj = new ilUserDefinedInvoiceNumber();
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$this->tpl->addJavaScript('Services/Mail/js/ilMailComposeFunctions.js');
$form_gui = new ilPropertyFormGUI();
$form_gui->setFormAction($this->ctrl->getFormAction($this, 'saveInvoiceNumber'));
$form_gui->setTitle($this->lng->txt('invoice_number_setting'));
// invoice_type
$radio_group = new ilRadioGroupInputGUI($this->lng->txt('invoice_number'), 'ud_invoice_number');
$radio_option_1 = new ilRadioOption($this->lng->txt('ilias_invoice_number'), '0');
$radio_group->addOption($radio_option_1);
$radio_option_2 = new ilRadioOption($this->lng->txt('userdefined_invoice_number'), '1');
$radio_group->addOption($radio_option_2);
$radio_group->setRequired(true);
$radio_group->setValue($invObj->getUDInvoiceNumberActive(), '0');
$radio_group->setPostVar('ud_invoice_number');
$form_gui->addItem($radio_group);
// incremental current value
$cur_num = new ilNonEditableValueGUI($this->lng->txt('incremental_current_value'), 'inc_current_value');
$cur_num->setValue(ilUserDefinedInvoiceNumber::_getIncCurrentValue(), 1);
$radio_option_2->addSubItem($cur_num);
// incremental start value
$inc_num = new ilNumberInputGUI($this->lng->txt('incremental_start_value'), 'inc_start_value');
$inc_num->setValue($this->error != "" && isset($_POST['incremental_start_value']) ? ilUtil::prepareFormOutput($_POST['incremental_start_value'], true) : ilUtil::prepareFormOutput($invObj->getIncStartValue(), true));
$inc_num->setInfo($this->lng->txt('incremental_start_value_info'));
$radio_option_2->addSubItem($inc_num);
// reset period of current value
$sel_reset = new ilSelectInputGUI($this->lng->txt('invoice_number_reset_period'), 'inc_reset_period');
$sel_reset->setValue($this->error != "" && isset($_POST['inc_reset_period']) ? $_POST['inc_reset_period'] : $invObj->getIncResetPeriod());
$reset_options = array(1 => $this->lng->txt('yearly'), 2 => $this->lng->txt('monthly'));
$sel_reset->setOptions($reset_options);
$radio_option_2->addSubItem($sel_reset);
// invoice_number_text
$inp = new ilTextAreaInputGUI($this->lng->txt('invoice_number_text'), 'invoice_number_text');
$inp->setValue($this->error != "" && isset($_POST['invoice_number_text']) ? ilUtil::prepareFormOutput($_POST['invoice_number_text'], true) : ilUtil::prepareFormOutput($invObj->getInvoiceNumberText(), true));
$inp->setRequired(false);
$inp->setCols(60);
$inp->setRows(3);
$radio_option_2->addSubItem($inp);
// PLACEHOLDERS
$prop = new ilInvoiceNumberPlaceholdersPropertyGUI();
$radio_option_2->addSubItem($prop);
$form_gui->addCommandButton('saveInvoiceNumber', $this->lng->txt('save'));
$this->tpl->setVariable('FORM', $form_gui->getHTML());
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:47,代码来源:class.ilObjPaymentSettingsGUI.php
示例4: initFormSettings
/**
* Init settings property form
*
* @access protected
*/
protected function initFormSettings()
{
if (is_object($this->form)) {
return true;
}
include_once 'Services/Calendar/classes/class.ilCalendarUtil.php';
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this));
$this->form->setTitle($this->lng->txt('cal_global_settings'));
$this->form->addCommandButton('save', $this->lng->txt('save'));
#$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
$check = new ilCheckboxInputGUI($this->lng->txt('enable_calendar'), 'enable');
$check->setValue(1);
$check->setChecked($this->settings->isEnabled() ? true : false);
$this->form->addItem($check);
$server_tz = new ilNonEditableValueGUI($this->lng->txt('cal_server_tz'));
$server_tz->setValue(ilTimeZone::_getDefaultTimeZone());
$this->form->addItem($server_tz);
$select = new ilSelectInputGUI($this->lng->txt('cal_def_timezone'), 'default_timezone');
$select->setOptions(ilCalendarUtil::_getShortTimeZoneList());
$select->setInfo($this->lng->txt('cal_def_timezone_info'));
$select->setValue($this->settings->getDefaultTimeZone());
$this->form->addItem($select);
$year = date("Y");
$select = new ilSelectInputGUI($this->lng->txt('cal_def_date_format'), 'default_date_format');
$select->setOptions(array(ilCalendarSettings::DATE_FORMAT_DMY => '31.10.' . $year, ilCalendarSettings::DATE_FORMAT_YMD => $year . "-10-31", ilCalendarSettings::DATE_FORMAT_MDY => "10/31/" . $year));
$select->setInfo($this->lng->txt('cal_def_date_format_info'));
$select->setValue($this->settings->getDefaultDateFormat());
$this->form->addItem($select);
$select = new ilSelectInputGUI($this->lng->txt('cal_def_time_format'), 'default_time_format');
$select->setOptions(array(ilCalendarSettings::TIME_FORMAT_24 => '13:00', ilCalendarSettings::TIME_FORMAT_12 => '1:00pm'));
$select->setInfo($this->lng->txt('cal_def_time_format_info'));
$select->setValue($this->settings->getDefaultTimeFormat());
$this->form->addItem($select);
// Weekstart
$radio = new ilRadioGroupInputGUI($this->lng->txt('cal_def_week_start'), 'default_week_start');
$radio->setValue($this->settings->getDefaultWeekStart());
$option = new ilRadioOption($this->lng->txt('l_su'), 0);
$radio->addOption($option);
$option = new ilRadioOption($this->lng->txt('l_mo'), 1);
$radio->addOption($option);
$this->form->addItem($radio);
// Day start
$day_start = new ilSelectInputGUI($this->lng->txt('cal_day_start'), 'dst');
$day_start->setOptions(ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat()));
$day_start->setValue($this->settings->getDefaultDayStart());
$this->form->addItem($day_start);
$day_end = new ilSelectInputGUI($this->lng->txt('cal_day_end'), 'den');
$day_end->setOptions(ilCalendarUtil::getHourSelection($this->settings->getDefaultTimeFormat()));
$day_end->setValue($this->settings->getDefaultDayEnd());
$this->form->addItem($day_end);
$sync = new ilCheckboxInputGUI($this->lng->txt('cal_webcal_sync'), 'webcal');
$sync->setValue(1);
$sync->setChecked($this->settings->isWebCalSyncEnabled());
$sync->setInfo($this->lng->txt('cal_webcal_sync_info'));
$sync_min = new ilNumberInputGUI('', 'webcal_hours');
$sync_min->setSize(2);
$sync_min->setMaxLength(3);
$sync_min->setValue($this->settings->getWebCalSyncHours());
$sync_min->setSuffix($this->lng->txt('hours'));
$sync->addSubItem($sync_min);
$this->form->addItem($sync);
// enable milestone planning in groups
$mil = new ilFormSectionHeaderGUI();
$mil->setTitle($this->lng->txt('cal_milestone_settings'));
$this->form->addItem($mil);
$checkm = new ilCheckboxInputGUI($this->lng->txt('cal_enable_group_milestones'), 'enable_grp_milestones');
$checkm->setValue(1);
$checkm->setChecked($this->settings->getEnableGroupMilestones() ? true : false);
$checkm->setInfo($this->lng->txt('cal_enable_group_milestones_desc'));
$this->form->addItem($checkm);
// Consultation hours
$con = new ilFormSectionHeaderGUI();
$con->setTitle($this->lng->txt('cal_ch_form_header'));
$this->form->addItem($con);
$ch = new ilCheckboxInputGUI($this->lng->txt('cal_ch_form'), 'ch');
$ch->setInfo($this->lng->txt('cal_ch_form_info'));
$ch->setValue(1);
$ch->setChecked($this->settings->areConsultationHoursEnabled());
$this->form->addItem($ch);
// repository visibility default
$rep = new ilFormSectionHeaderGUI();
$rep->setTitle($GLOBALS['lng']->txt('cal_setting_global_vis_repos'));
$this->form->addItem($rep);
$crs = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_crs_vis'), 'visible_crs');
$crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
$crs->setValue(1);
$crs->setInfo($GLOBALS['lng']->txt('cal_setting_global_crs_vis_info'));
$crs->setChecked($this->settings->isCourseCalendarEnabled());
$this->form->addItem($crs);
$grp = new ilCheckboxInputGUI($GLOBALS['lng']->txt('cal_setting_global_grp_vis'), 'visible_grp');
$grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
$grp->setValue(1);
$grp->setInfo($GLOBALS['lng']->txt('cal_setting_global_grp_vis_info'));
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjCalendarSettingsGUI.php
示例5: initSettingsForm
/**
* init settings form
*
* @access protected
*/
protected function initSettingsForm($a_mode = 'update')
{
if (is_object($this->form)) {
return true;
}
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this, 'settings'));
$this->form->setTitle($this->lng->txt('ecs_connection_settings'));
$ena = new ilCheckboxInputGUI($this->lng->txt('ecs_active'), 'active');
$ena->setChecked($this->settings->isEnabled());
$ena->setValue(1);
$this->form->addItem($ena);
$ser = new ilTextInputGUI($this->lng->txt('ecs_server_url'), 'server');
$ser->setValue((string) $this->settings->getServer());
$ser->setRequired(true);
$this->form->addItem($ser);
$pro = new ilSelectInputGUI($this->lng->txt('ecs_protocol'), 'protocol');
// fixed to https
#$pro->setOptions(array(ilECSSetting::PROTOCOL_HTTP => $this->lng->txt('http'),
# ilECSSetting::PROTOCOL_HTTPS => $this->lng->txt('https')));
$pro->setOptions(array(ilECSSetting::PROTOCOL_HTTPS => 'HTTPS'));
$pro->setValue($this->settings->getProtocol());
$pro->setRequired(true);
$this->form->addItem($pro);
$por = new ilTextInputGUI($this->lng->txt('ecs_port'), 'port');
$por->setSize(5);
$por->setMaxLength(5);
$por->setValue((string) $this->settings->getPort());
$por->setRequired(true);
$this->form->addItem($por);
$tcer = new ilRadioGroupInputGUI($this->lng->txt('ecs_auth_type'), 'auth_type');
$tcer->setValue($this->settings->getAuthType());
$this->form->addItem($tcer);
// Certificate based authentication
$cert_based = new ilRadioOption($this->lng->txt('ecs_auth_type_cert'), ilECSSetting::AUTH_CERTIFICATE);
$tcer->addOption($cert_based);
$cli = new ilTextInputGUI($this->lng->txt('ecs_client_cert'), 'client_cert');
$cli->setSize(60);
$cli->setValue((string) $this->settings->getClientCertPath());
$cli->setRequired(true);
$cert_based->addSubItem($cli);
$key = new ilTextInputGUI($this->lng->txt('ecs_cert_key'), 'key_path');
$key->setSize(60);
$key->setValue((string) $this->settings->getKeyPath());
$key->setRequired(true);
$cert_based->addSubItem($key);
$cerp = new ilTextInputGUI($this->lng->txt('ecs_key_password'), 'key_password');
$cerp->setSize(12);
$cerp->setValue((string) $this->settings->getKeyPassword());
$cerp->setInputType('password');
$cerp->setRequired(true);
$cert_based->addSubItem($cerp);
$cer = new ilTextInputGUI($this->lng->txt('ecs_ca_cert'), 'ca_cert');
$cer->setSize(60);
$cer->setValue((string) $this->settings->getCACertPath());
$cer->setRequired(true);
$cert_based->addSubItem($cer);
// Apache auth
$apa_based = new ilRadioOption($this->lng->txt('ecs_auth_type_apache'), ilECSSetting::AUTH_APACHE);
$tcer->addOption($apa_based);
$user = new ilTextInputGUI($this->lng->txt('ecs_apache_user'), 'auth_user');
$user->setSize(32);
$user->setValue((string) $this->settings->getAuthUser());
$user->setRequired(true);
$apa_based->addSubItem($user);
$pass = new ilPasswordInputGUI($this->lng->txt('ecs_apache_pass'), 'auth_pass');
$pass->setRetype(false);
$pass->setSize(16);
$pass->setMaxLength(32);
$pass->setValue((string) $this->settings->getAuthPass());
$pass->setRequired(true);
$apa_based->addSubItem($pass);
$ser = new ilNonEditableValueGUI($this->lng->txt('cert_serial'));
$ser->setValue($this->settings->getCertSerialNumber() ? $this->settings->getCertSerialNumber() : $this->lng->txt('ecs_no_value'));
$cert_based->addSubItem($ser);
$loc = new ilFormSectionHeaderGUI();
$loc->setTitle($this->lng->txt('ecs_local_settings'));
$this->form->addItem($loc);
$pol = new ilDurationInputGUI($this->lng->txt('ecs_polling'), 'polling');
$pol->setShowDays(false);
$pol->setShowHours(false);
$pol->setShowMinutes(true);
$pol->setShowSeconds(true);
$pol->setSeconds($this->settings->getPollingTimeSeconds());
$pol->setMinutes($this->settings->getPollingTimeMinutes());
$pol->setRequired(true);
$pol->setInfo($this->lng->txt('ecs_polling_info'));
$this->form->addItem($pol);
$imp = new ilCustomInputGUI($this->lng->txt('ecs_import_id'));
$imp->setRequired(true);
$tpl = new ilTemplate('tpl.ecs_import_id_form.html', true, true, 'Services/WebServices/ECS');
$tpl->setVariable('SIZE', 5);
$tpl->setVariable('MAXLENGTH', 11);
$tpl->setVariable('POST_VAR', 'import_id');
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilECSSettingsGUI.php
示例6: showDetails
public function showDetails()
{
global $ilMainMenu, $ilTabs, $ilToolbar, $ilUser;
$this->__initPaymentObject();
$this->__initPricesObject();
$this->__initShoppingCartObject();
$ilToolbar->addButton($this->lng->txt('payment_back_to_shop'), 'ilias.php?baseClass=ilShopController');
$this->tpl->getStandardTemplate();
$ilTabs->setTabActive('buy');
$ilMainMenu->setActive('shop');
if ($this->pobject->getStatus() == $this->pobject->STATUS_EXPIRES) {
ilUtil::sendInfo($this->lng->txt('pay_expires_info'));
return false;
}
$extension_prices = array();
if ($ilUser->getId() != ANONYMOUS_USER_ID) {
include_once './Services/Payment/classes/class.ilPaymentBookings.php';
$has_extension_price = ilPaymentBookings::_hasAccesstoExtensionPrice($ilUser->getId(), $this->pobject->getPobjectId());
if ($has_extension_price) {
$extension_prices = $this->price_obj->getExtensionPrices();
}
}
$org_prices = $this->price_obj->getPrices();
$tmp_prices = array_merge($org_prices, $extension_prices);
$prices = array();
foreach ($tmp_prices as $price) {
// expired prices must be filtered out
if ($price['price_type'] == ilPaymentPrices::TYPE_DURATION_DATE && $price['duration_until'] < date('Y-m-d')) {
//do nothing
} else {
$prices[] = $price;
}
}
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$buyedObject = "";
if ($this->sc_obj->isInShoppingCart($this->pobject->getPobjectId())) {
$buyedObject = $this->sc_obj->getEntry($this->pobject->getPobjectId());
if (is_array($prices) && count($prices) > 1) {
ilUtil::sendInfo($this->lng->txt('pay_item_already_in_sc_choose_another'));
} else {
ilUtil::sendInfo($this->lng->txt('pay_item_already_in_sc'));
}
}
$this->ctrl->setParameter($this, "ref_id", $this->pobject->getRefId());
$subtype = '';
if ($this->object) {
if ($this->object->getType() == 'exc') {
$subtype = ' (' . $this->lng->txt($this->pobject->getSubtype()) . ')';
}
$form->setTitle($this->object->getTitle() . ' ' . $subtype);
$form->setTitleIcon(ilObject::_getIcon($this->object->getId()));
} else {
ilUtil::sendFailure($this->lng->txt('object_not_found'));
}
// payment infos
$info = new ilNonEditableValueGUI($this->lng->txt('info'));
$info->setValue($this->lng->txt('pay_info'));
$form->addItem($info);
if (is_array($buyedObject)) {
if (is_array($prices) && count($prices) > 1) {
$button_txt = $this->lng->txt('pay_change_price');
} else {
$button_txt = $this->lng->txt('pay_add_to_shopping_cart');
}
} else {
$button_txt = $this->lng->txt('pay_add_to_shopping_cart');
}
$rg_prices = new ilRadioGroupInputGUI($this->lng->txt('prices'), 'price_id');
if (is_array($prices)) {
foreach ($prices as $price) {
if (is_array($buyedObject) && $buyedObject["price_id"] == $price['price_id']) {
$rg_prices->setValue($price['price_id']);
} else {
if (count($prices) == 1) {
$rg_prices->setValue($price['price_id']);
}
}
switch ($price['price_type']) {
case ilPaymentPrices::TYPE_DURATION_MONTH:
$txt_price = $price['duration'] . ' ' . $this->lng->txt('paya_months') . ': ';
break;
case ilPaymentPrices::TYPE_DURATION_DATE:
$txt_price = ilDatePresentation::formatDate(new ilDate($price['duration_from'], IL_CAL_DATE)) . ' - ' . ilDatePresentation::formatDate(new ilDate($price['duration_until'], IL_CAL_DATE)) . ': ';
break;
case ilPaymentPrices::TYPE_UNLIMITED_DURATION:
$txt_price = $this->lng->txt('unlimited_duration') . ': ';
break;
}
$tmp_price = $price['price'];
$extension_txt = '';
if ($price['extension'] == 1) {
$extension_txt = '(' . $this->lng->txt('extension_price') . ')';
}
$price_row = new ilRadioOption($txt_price . ' ' . ilPaymentPrices::_formatPriceToString((double) $tmp_price) . ' ' . $extension_txt, $price['price_id']);
$price_row->setInfo($price['description']);
$rg_prices->addOption($price_row);
}
$form->addItem($rg_prices);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilShopPurchaseGUI.php
示例7: initServerInfoForm
/**
* Init server info form.
*
* @param int $a_mode Edit Mode
*/
public function initServerInfoForm()
{
global $lng, $ilClientIniFile, $ilSetting;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// installation name
$ne = new ilNonEditableValueGUI($lng->txt("inst_name"), "");
$ne->setValue($ilClientIniFile->readVariable("client", "name"));
$ne->setInfo($ilClientIniFile->readVariable("client", "description"));
$this->form->addItem($ne);
// client id
$ne = new ilNonEditableValueGUI($lng->txt("client_id"), "");
$ne->setValue(CLIENT_ID);
$this->form->addItem($ne);
// installation id
$ne = new ilNonEditableValueGUI($lng->txt("inst_id"), "");
$ne->setValue($ilSetting->get("inst_id"));
$this->form->addItem($ne);
// database version
$ne = new ilNonEditableValueGUI($lng->txt("db_version"), "");
$ne->setValue($ilSetting->get("db_version"));
include_once "./Services/Database/classes/class.ilDBUpdate.php";
$this->form->addItem($ne);
// ilias version
$ne = new ilNonEditableValueGUI($lng->txt("ilias_version"), "");
$ne->setValue($ilSetting->get("ilias_version"));
$this->form->addItem($ne);
// host
$ne = new ilNonEditableValueGUI($lng->txt("host"), "");
$ne->setValue($_SERVER["SERVER_NAME"]);
$this->form->addItem($ne);
// ip & port
$ne = new ilNonEditableValueGUI($lng->txt("ip_address") . " & " . $this->lng->txt("port"), "");
$ne->setValue($_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"]);
$this->form->addItem($ne);
// server
$ne = new ilNonEditableValueGUI($lng->txt("server_software"), "");
$ne->setValue($_SERVER["SERVER_SOFTWARE"]);
$this->form->addItem($ne);
// http path
$ne = new ilNonEditableValueGUI($lng->txt("http_path"), "");
$ne->setValue(ILIAS_HTTP_PATH);
$this->form->addItem($ne);
// absolute path
$ne = new ilNonEditableValueGUI($lng->txt("absolute_path"), "");
$ne->setValue(ILIAS_ABSOLUTE_PATH);
$this->form->addItem($ne);
$not_set = $lng->txt("path_not_set");
// convert
$ne = new ilNonEditableValueGUI($lng->txt("path_to_convert"), "");
$ne->setValue(PATH_TO_CONVERT ? PATH_TO_CONVERT : $not_set);
$this->form->addItem($ne);
// zip
$ne = new ilNonEditableValueGUI($lng->txt("path_to_zip"), "");
$ne->setValue(PATH_TO_ZIP ? PATH_TO_ZIP : $not_set);
$this->form->addItem($ne);
// unzip
$ne = new ilNonEditableValueGUI($lng->txt("path_to_unzip"), "");
$ne->setValue(PATH_TO_UNZIP ? PATH_TO_UNZIP : $not_set);
$this->form->addItem($ne);
// java
$ne = new ilNonEditableValueGUI($lng->txt("path_to_java"), "");
$ne->setValue(PATH_TO_JAVA ? PATH_TO_JAVA : $not_set);
$this->form->addItem($ne);
// htmldoc
$ne = new ilNonEditableValueGUI($lng->txt("path_to_htmldoc"), "");
$ne->setValue(PATH_TO_HTMLDOC ? PATH_TO_HTMLDOC : $not_set);
$this->form->addItem($ne);
// mkisofs
$ne = new ilNonEditableValueGUI($lng->txt("path_to_mkisofs"), "");
$ne->setValue(PATH_TO_MKISOFS ? PATH_TO_MKISOFS : $not_set);
$this->form->addItem($ne);
// latex
$ne = new ilNonEditableValueGUI($lng->txt("url_to_latex"), "");
$ne->setValue(URL_TO_LATEX ? URL_TO_LATEX : $not_set);
$this->form->addItem($ne);
$this->form->setTitle($lng->txt("server_data"));
$this->form->setFormAction($this->ctrl->getFormAction($this));
}
开发者ID:bheyser,项目名称:qplskl,代码行数:84,代码来源:class.ilObjSystemFolderGUI.php
示例8: initEditForm
/**
* Init edit form
*
* @param int $a_mode Edit Mode
*/
public function initEditForm($a_mode = "edit")
{
global $lng, $ilCtrl, $ilUser;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
if ($a_mode != "add_file") {
// title
$ti = new ilTextInputGUI($lng->txt("title"), "flst_title");
$ti->setMaxLength(80);
$ti->setSize(40);
$form->addItem($ti);
// language
require_once "Services/MetaData/classes/class.ilMDLanguageItem.php";
$lang = ilMDLanguageItem::_getLanguages();
$si = new ilSelectInputGUI($lng->txt("language"), "flst_language");
$si->setOptions($lang);
$form->addItem($si);
}
if (in_array($a_mode, array("create", "add_file"))) {
// file
$fi = new ilFileInputGUI($lng->txt("file"), "file");
$fi->setRequired(true);
$form->addItem($fi);
} else {
if (in_array($a_mode, array("select_file"))) {
// file
$ne = new ilNonEditableValueGUI($lng->txt("file"), "");
if (isset($_GET["file_ref_id"])) {
include_once "./Modules/File/classes/class.ilObjFile.php";
$file_obj = new ilObjFile((int) $_GET["file_ref_id"]);
if (is_object($file_obj)) {
// ref id as hidden input
$hi = new ilHiddenInputGUI("file_ref_id");
$hi->setValue((int) $_GET["file_ref_id"]);
$form->addItem($hi);
$ne->setValue($file_obj->getTitle());
}
} else {
if (isset($_GET["fl_wsp_id"])) {
// we need the object id for the instance
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($ilUser->getId());
$node = $tree->getNodeData((int) $_GET["fl_wsp_id"]);
include_once "./Modules/File/classes/class.ilObjFile.php";
$file_obj = new ilObjFile($node["obj_id"], false);
if (is_object($file_obj)) {
// ref id as hidden input
$hi = new ilHiddenInputGUI("file_ref_id");
$hi->setValue("wsp_" . (int) $node["obj_id"]);
$form->addItem($hi);
$ne->setValue($file_obj->getTitle());
}
$this->tpl->parseCurrentBlock();
}
}
$form->addItem($ne);
}
}
switch ($a_mode) {
case "edit":
$ti->setValue($this->content_obj->getListTitle());
$si->setValue($this->content_obj->getLanguage());
$form->addCommandButton("saveProperties", $lng->txt("save"));
$form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_edit_file_list_properties"));
break;
case "create":
case "select_file":
if ($_SESSION["il_text_lang_" . $_GET["ref_id"]] != "") {
$s_lang = $_SESSION["il_text_lang_" . $_GET["ref_id"]];
} else {
$s_lang = $ilUser->getLanguage();
}
$si->setValue($s_lang);
$form->addCommandButton("create_flst", $lng->txt("save"));
$form->addCommandButton("cancelCreate", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_insert_file_list"));
break;
case "add_file":
$form->addCommandButton("insertNewFileItem", $lng->txt("save"));
$form->addCommandButton("editFiles", $lng->txt("cancel"));
$form->setTitle($lng->txt("cont_insert_file_item"));
break;
}
$form->setFormAction($ilCtrl->getFormAction($this));
return $form;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:92,代码来源:class.ilPCFileListGUI.php
示例9: showCustomFields
/**
* Show course defined fields
*
* @access protected
*/
protected function showCustomFields()
{
global $ilUser;
include_once 'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
include_once 'Modules/Course/classes/Export/class.ilCourseUserData.php';
if (!count($cdf_fields = ilCourseDefinedFieldDefinition::_getFields($this->container->getId()))) {
return true;
}
$cdf = new ilNonEditableValueGUI($this->lng->txt('ps_crs_user_fields'));
$cdf->setValue($this->lng->txt($this->type . '_ps_cdf_info'));
$cdf->setRequired(true);
foreach ($cdf_fields as $field_obj) {
$course_user_data = new ilCourseUserData($ilUser->getId(), $field_obj->getId());
switch ($field_obj->getType()) {
case IL_CDF_TYPE_SELECT:
$select = new ilSelectInputGUI($field_obj->getName(), 'cdf[' . $field_obj->getId() . ']');
$select->setValue(ilUtil::stripSlashes($_POST['cdf'][$field_obj->getId()]));
$select->setOptions($field_obj->prepareSelectBox());
if ($field_obj->isRequired()) {
$select->setRequired(true);
}
$cdf->addSubItem($select);
break;
case IL_CDF_TYPE_TEXT:
$text = new ilTextInputGUI($field_obj->getName(), 'cdf[' . $field_obj->getId() . ']');
$text->setValue(ilUtil::stripSlashes($_POST['cdf'][$field_obj->getId()]));
$text->setSize(32);
$text->setMaxLength(255);
if ($field_obj->isRequired()) {
$text->setRequired(true);
}
$cdf->addSubItem($text);
break;
}
}
$this->form->addItem($cdf);
return true;
}
开发者ID:bheyser,项目名称:qplskl,代码行数:43,代码来源:class.ilRegistrationGUI.php
示例10: initFormLink
/**
* Show create/edit single link
* @param int form mode
* @return
*/
protected function initFormLink($a_mode)
{
global $ilTabs;
$ilTabs->activateTab("id_content");
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
switch ($a_mode) {
case self::LINK_MOD_CREATE:
// Header
$this->ctrl->setParameter($this, 'new_type', 'webr');
$this->form->setTitle($this->lng->txt('webr_new_link'));
$this->form->setTableWidth('600px');
// Buttons
$this->form->addCommandButton('save', $this->lng->txt('webr_add'));
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
break;
case self::LINK_MOD_ADD:
// Header
$this->form->setTitle($this->lng->txt('webr_new_link'));
// Buttons
$this->form->addCommandButton('saveAddLink', $this->lng->txt('webr_add'));
$this->form->addCommandButton('view', $this->lng->txt('cancel'));
break;
case self::LINK_MOD_EDIT:
// Header
$this->ctrl->setParameter($this, 'link_id', (int) $_REQUEST['link_id']);
$this->form->setTitle($this->lng->txt('webr_edit'));
// Buttons
$this->form->addCommandButton('updateLink', $this->lng->txt('save'));
$this->form->addCommandButton('view', $this->lng->txt('cancel'));
break;
}
$this->form->setFormAction($this->ctrl->getFormAction($this));
if ($a_mode == self::LINK_MOD_ADD and $this->isContainerMetaDataRequired()) {
ilUtil::sendInfo($this->lng->txt('webr_container_info'));
$this->form->setTitle($this->lng->txt('webr_edit_list'));
// List Title
$title = new ilTextInputGUI($this->lng->txt('webr_list_title'), 'lti');
$title->setRequired(true);
$title->setSize(40);
$title->setMaxLength(127);
$this->form->addItem($title);
// List Description
$desc = new ilTextAreaInputGUI($this->lng->txt('webr_list_desc'), 'tde');
$desc->setRows(3);
$desc->setCols(40);
$this->form->addItem($desc);
// Addtional section
$sect = new ilFormSectionHeaderGUI();
$sect->setTitle($this->lng->txt('webr_add'));
$this->form->addItem($sect);
}
// Target
/*
$tar = new ilTextInputGUI($this->lng->txt('webr_link_target'),'tar');
$tar->setValue("http://");
$tar->setSize(40);
$tar->setMaxLength(500);
*/
include_once 'Services/Form/classes/class.ilLinkInputGUI.php';
$tar = new ilLinkInputGUI($this->lng->txt('webr_link_target'), 'tar');
$tar->setInternalLinkFilterTypes(array("PageObject", "GlossaryItem", "RepositoryItem"));
$tar->setRequired(true);
$this->form->addItem($tar);
// Title
$tit = new ilTextInputGUI($this->lng->txt('webr_link_title'), 'tit');
$tit->setRequired(true);
$tit->setSize(40);
$tit->setMaxLength(127);
$this->form->addItem($tit);
// Description
$des = new ilTextAreaInputGUI($this->lng->txt('description'), 'des');
$des->setRows(3);
$des->setCols(40);
$this->form->addItem($des);
if ($a_mode != self::LINK_MOD_CREATE) {
// Active
$act = new ilCheckboxInputGUI($this->lng->txt('active'), 'act');
$act->setChecked(true);
$act->setValue(1);
$this->form->addItem($act);
// Check
$che = new ilCheckboxInputGUI($this->lng->txt('webr_disable_check'), 'che');
$che->setValue(1);
$this->form->addItem($che);
}
// Valid
if ($a_mode == self::LINK_MOD_EDIT) {
$val = new ilCheckboxInputGUI($this->lng->txt('valid'), 'vali');
$this->form->addItem($val);
}
if (ilParameterAppender::_isEnabled() && $a_mode != self::LINK_MOD_CREATE) {
$dyn = new ilNonEditableValueGUI($this->lng->txt('links_dyn_parameter'));
$dyn->setInfo($this->lng->txt('links_dynamic_info'));
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjLinkResourceGUI.php
示例11: showPrivacy
/**
* Show Privacy settings
*
* @access public
*/
public function showPrivacy()
{
$privacy = ilPrivacySettings::_getInstance();
$this->tabs_gui->setTabActive('show_privacy');
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('ps_privacy_protection'));
include_once 'Services/Membership/classes/class.ilMemberAgreement.php';
if (ilMemberAgreement::_hasAgreements()) {
$html = new ilNonEditableValueGUI();
$html->setValue($this->lng->txt('ps_warning_modify'));
$form->addItem($html);
}
$value = array();
if ($privacy->enabledCourseExport()) {
$value[] = "export_course";
}
if ($privacy->enabledGroupExport()) {
$value[] = "export_group";
}
if ($privacy->courseConfirmationRequired()) {
$value[] = "export_confirm_course";
}
if ($privacy->groupConfirmationRequired()) {
$value[] = "export_confirm_group";
}
if ($privacy->enabledGroupAccessTimes()) {
$value[] = "grp_access_times";
}
if ($privacy->enabledCourseAccessTimes()) {
$value[] = "crs_access_times";
}
$group = new ilCheckboxGroupInputGUI($this->lng->txt('ps_profile_export'), 'profile_protection');
$group->setValue($value);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_export_course'));
$check->setValue('export_course');
$group->addOption($check);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_export_groups'));
$check->setValue('export_group');
$group->addOption($check);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_export_confirm'));
$check->setValue('export_confirm_course');
$group->addOption($check);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_export_confirm_group'));
$check->setValue('export_confirm_group');
$group->addOption($check);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_show_grp_access'));
$check->setValue('grp_access_times');
$group->addOption($check);
$check = new ilCheckboxOption();
$check->setTitle($this->lng->txt('ps_show_crs_access'));
$check->setValue('crs_access_times');
$group->addOption($check);
$form->addItem($group);
$check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics');
$check->setInfo($this->lng->txt('enable_fora_statistics_desc'));
$check->setChecked($privacy->enabledForaStatistics());
$form->addItem($check);
$check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora');
$check->setInfo($this->lng->txt('enable_anonymous_fora_desc'));
$check->setChecked($privacy->enabledAnonymousFora());
$form->addItem($check);
$check = new ilCheckboxInputGui($this->lng->txt('enable_sahs_protocol_data'), 'enable_sahs_pd');
$check->setInfo($this->lng->txt('enable_sahs_protocol_data_desc'));
$check->setChecked($privacy->enabledSahsProtocolData());
$form->addItem($check);
$check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
$check->setInfo($this->lng->txt('rbac_log_info'));
$check->setChecked($privacy->enabledRbacLog());
$form->addItem($check);
$age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
$age->setInfo($this->lng->txt('rbac_log_age_info'));
$age->setValue($privacy->getRbacLogAge());
$age->setMinValue(1);
$age->setMaxValue(24);
$age->setSize(2);
$age->setMaxLength(2);
$check->addSubItem($age);
$form->addCommandButton('save_privacy', $this->lng->txt('save'));
$this->tpl->setContent($form->getHTML());
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:92,代码来源:class.ilObjPrivacySecurityGUI.php
示例12: initEditUserForm
protected function initEditUserForm($a_user_id, $a_obj_id, $a_cancel = null)
{
global $lng, $ilCtrl;
include_once 'Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($a_obj_id);
$lp_mode = $olp->getCurrentMode();
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this, "updateUser"));
$form->setTitle($lng->txt("edit") . ": " . ilObject::_lookupTitle($a_obj_id));
$form->setDescription($lng->txt('trac_mode') . ": " . $olp->getModeText($lp_mode));
include_once "Services/User/classes/class.ilUserUtil.php";
$user = new ilNonEditableValueGUI($lng->txt("user"), null, true);
$user->setValue(ilUserUtil::getNamePresentation($a_user_id, true));
$form->addItem($user);
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($a_obj_id, $a_user_id);
$type = ilObject::_lookupType($a_obj_id);
if ($type != 'lm') {
$mark = new ilTextInputGUI($lng->txt("trac_mark"), "mark");
$mark->setValue($marks->getMark());
$mark->setMaxLength(32);
$form->addItem($mark);
}
$comm = new ilTextInputGUI($lng->txt("trac_comment"), "comment");
$comm->setValue($marks->getComment());
$form->addItem($comm);
if ($lp_mode == ilLPObjSettings::LP_MODE_MANUAL || $lp_mode == ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR) {
include_once "./Services/Tracking/classes/class.ilLPStatus.php";
$completed = ilLPStatus::_lookupStatus($a_obj_id, $a_user_id);
$status = new ilCheckboxInputGUI($lng->txt('trac_completed'), "completed");
$status->setChecked($completed == ilLPStatus::LP_STATUS_COMPLETED_NUM);
$form->addItem($status);
}
$form->addCommandButton("updateUser", $lng->txt('save'));
if ($a_cancel) {
$form->addCommandButton($a_cancel, $lng->txt('cancel'));
}
return $form;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:40,代码来源:class.ilLearningProgressBaseGUI.php
示例13: settings
/**
* Edit settings.
*/
public function settings()
{
global $lng, $ilAccess;
$this->tabs_gui->setTabActive('settings');
$form_settings = new ilSetting("certificate");
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('certificate_settings'));
$active = new ilCheckboxInputGUI($this->lng->txt("active"), "active");
$active->setChecked($form_settings->get("active"));
$form->addItem($active);
$info = new ilNonEditableValueGUI($this->lng->txt("info"), "info");
$info->setValue($this->lng->txt("certificate_usage"));
$form->addItem($info);
$bgimage = new ilImageFileInputGUI($this->lng->txt("certificate_background_image"), "background");
$bgimage->setRequired(FALSE);
if (count($_POST)) {
// handle the background upload
if (strlen($_FILES["background"]["tmp_name"])) {
if ($bgimage->checkInput()) {
$result = $this->object->uploadBackgroundImage($_FILES["background"]["tmp_
|
请发表评论