当前位置: 首页>>代码示例>>PHP>>正文


PHP ilNonEditableValueGUI::setValue方法代码示例

本文整理汇总了PHP中ilNonEditableValueGUI::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ilNonEditableValueGUI::setValue方法的具体用法?PHP ilNonEditableValueGUI::setValue怎么用?PHP ilNonEditableValueGUI::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilNonEditableValueGUI的用法示例。


在下文中一共展示了ilNonEditableValueGUI::setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例10: 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

示例11: 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_name"]);
                 if ($result == FALSE) {
                     $bgimage->setAlert($this->lng->txt("certificate_error_upload_bgimage"));
                 }
             }
         }
     }
     if (strlen($this->object->hasBackgroundImage())) {
         $bgimage->setImage($this->object->getBackgroundImageThumbPathWeb());
     }
     $bgimage->setInfo($this->lng->txt("default_background_info"));
     $form->addItem($bgimage);
     $format = new ilSelectInputGUI($this->lng->txt("certificate_page_format"), "pageformat");
     $defaultformats = array("a4" => $this->lng->txt("certificate_a4"), "a4landscape" => $this->lng->txt("certificate_a4_landscape"), "a5" => $this->lng->txt("certificate_a5"), "a5landscape" => $this->lng->txt("certificate_a5_landscape"), "letter" => $this->lng->txt("certificate_letter"), "letterlandscape" => $this->lng->txt("certificate_letter_landscape"));
     $format->setOptions($defaultformats);
     $format->setValue($form_settings->get("pageformat"));
     $format->setInfo($this->lng->txt("certificate_page_format_info"));
     $form->addItem($format);
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $form->addCommandButton('save', $this->lng->txt('save'));
     }
     $this->tpl->setContent($form->getHTML());
     if (strcmp($this->ctrl->getCmd(), "save") == 0) {
         if ($_POST["background_delete"]) {
             $this->object->deleteBackgroundImage();
         }
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:52,代码来源:class.ilObjCertificateSettingsGUI.php

示例12: initForm

 /**
  * initEditCustomForm
  *
  * @param string $a_mode values: create | edit
  */
 public function initForm($a_mode = "create")
 {
     global $ilCtrl, $lng;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     if ($a_mode == "edit") {
         $this->form->setTitle($lng->txt('dcl_edit_field'));
         $hidden_prop = new ilHiddenInputGUI("field_id");
         $this->form->addItem($hidden_prop);
         $this->form->setFormAction($ilCtrl->getFormAction($this), "update");
         $this->form->addCommandButton('update', $lng->txt('dcl_update_field'));
     } else {
         $this->form->setTitle($lng->txt('dcl_new_field'));
         $hidden_prop = new ilHiddenInputGUI("table_id");
         $hidden_prop->setValue($this->field_obj->getTableId());
         $this->form->addItem($hidden_prop);
         $this->form->setFormAction($ilCtrl->getFormAction($this), "save");
         $this->form->addCommandButton('save', $lng->txt('dcl_create_field'));
     }
     $this->form->addCommandButton('cancel', $lng->txt('cancel'));
     $text_prop = new ilTextInputGUI($lng->txt("title"), "title");
     $text_prop->setRequired(true);
     $text_prop->setInfo(sprintf($lng->txt('fieldtitle_allow_chars'), ilDataCollectionField::_getTitleValidChars(false)));
     $text_prop->setValidationRegexp(ilDataCollectionField::_getTitleValidChars(true));
     $this->form->addItem($text_prop);
     $edit_datatype = new ilRadioGroupInputGUI($lng->txt('dcl_datatype'), 'datatype');
     foreach (ilDataCollectionDatatype::getAllDatatypes() as $datatype) {
         $opt = new ilRadioOption($lng->txt('dcl_' . $datatype['title']), $datatype['id']);
         foreach (ilDataCollectionDatatype::getProperties($datatype['id']) as $property) {
             //Type Reference: List Tabels
             if ($datatype['id'] == ilDataCollectionDatatype::INPUTFORMAT_REFERENCE and $property['id'] == ilDataCollectionField::PROPERTYID_REFERENCE) {
                 $options = array();
                 // Get Tables
                 require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
                 $tables = $this->parent_obj->getDataCollectionObject()->getTables();
                 foreach ($tables as $table) {
                     foreach ($table->getRecordFields() as $field) {
                         //referencing references may lead to endless loops.
                         if ($field->getDatatypeId() != ilDataCollectionDatatype::INPUTFORMAT_REFERENCE) {
                             $options[$field->getId()] = $table->getTitle() . self::REFERENCE_SEPARATOR . $field->getTitle();
                         }
                     }
                 }
                 $table_selection = new ilSelectInputGUI('', 'prop_' . $property['id']);
                 $table_selection->setOptions($options);
                 //$table_selection->setValue($this->table_id);
                 $opt->addSubItem($table_selection);
             } elseif ($datatype['id'] == ilDataCollectionDatatype::INPUTFORMAT_REFERENCELIST and $property['id'] == ilDataCollectionField::PROPERTYID_N_REFERENCE) {
                 // Get Tables
                 require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
                 $tables = $this->parent_obj->getDataCollectionObject()->getTables();
                 foreach ($tables as $table) {
                     foreach ($table->getRecordFields() as $field) {
                         //referencing references may lead to endless loops.
                         if ($field->getDatatypeId() != ilDataCollectionDatatype::INPUTFORMAT_REFERENCELIST) {
                             $options[$field->getId()] = $table->getTitle() . self::REFERENCE_SEPARATOR . $field->getTitle();
                         }
                     }
                 }
                 $table_selection = new ilSelectInputGUI('', 'prop_' . $property['id']);
                 $table_selection->setOptions($options);
                 $opt->addSubItem($table_selection);
             } elseif ($property['id'] == ilDataCollectionField::PROPERTYID_FORMULA_EXPRESSION) {
                 $table = ilDataCollectionCache::getTableCache((int) $_GET['table_id']);
                 $fields = array();
                 foreach ($table->getFieldsForFormula() as $f) {
                     $placeholder = $f->isStandardField() ? $f->getId() : $f->getTitle();
                     $fields[] = '<a class="dclPropExpressionField" data-placeholder="' . $placeholder . '">' . $f->getTitle() . '</a>';
                 }
                 $subitem = new ilTextAreaInputGUI($lng->txt('dcl_prop_expression'), 'prop_' . $property['id']);
                 $operators = implode(', ', array_keys(ilDclExpressionParser::getOperators()));
                 $functions = implode(', ', ilDclExpressionParser::getFunctions());
                 $subitem->setInfo(sprintf($lng->txt('dcl_prop_expression_info'), $operators, $functions, implode('<br>', $fields)));
                 $opt->addSubItem($subitem);
             } elseif ($property['datatype_id'] == $datatype['id']) {
                 //All other Types: List properties saved in propertie definition table
                 if ($property['inputformat'] == ilDataCollectionDatatype::INPUTFORMAT_BOOLEAN) {
                     $subitem = new ilCheckboxInputGUI($lng->txt('dcl_' . $property['title']), 'prop_' . $property['id']);
                     $opt->addSubItem($subitem);
                 } elseif ($property['inputformat'] == ilDataCollectionDatatype::INPUTFORMAT_NUMBER) {
                     $subitem = new ilNumberInputGUI($lng->txt('dcl_' . $property['title']), 'prop_' . $property['id']);
                     // TODO: Nicer way to add additional info to fields (need changes in language-logic)
                     /*if($lng->txt('dcl_'.$property['title'].'_info') != '-dcl_'.$property['title'].'_info-') {
                     			$subitem->setInfo($lng->txt('dcl_'.$property['title'].'_info'));
                     		}*/
                     $subitem->setSize(5);
                     if ($property['title'] == 'length') {
                         $subitem->setMaxValue(4000);
                         $subitem->setInfo($lng->txt('dcl_' . $property['title'] . '_info'));
                     }
                     $opt->addSubItem($subitem);
                 } elseif ($property['inputformat'] == ilDataCollectionDatatype::INPUTFORMAT_NON_EDITABLE_VALUE) {
                     $subitem = new ilNonEditableValueGUI($lng->txt('dcl_' . $property['title']));
                     $subitem->setValue(implode(', ', ilDataCollectionDatatype::$mob_suffixes));
                     $opt->addSubItem($subitem);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilDataCollectionFieldEditGUI.php

示例13: initForm

 /**
  * Init form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initForm($a_mode = "edit")
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // select skill template
     include_once "./Services/Skill/classes/class.ilSkillTreeNode.php";
     $tmplts = ilSkillTreeNode::getTopTemplates();
     // title
     $ti = new ilTextInputGUI($lng->txt("title"), "title");
     $ti->setRequired(true);
     $this->form->addItem($ti);
     // order nr
     $ni = new ilNumberInputGUI($lng->txt("skmg_order_nr"), "order_nr");
     $ni->setMaxLength(6);
     $ni->setSize(6);
     $ni->setRequired(true);
     $this->form->addItem($ni);
     // template
     $options = array("" => $lng->txt("please_select"));
     foreach ($tmplts as $tmplt) {
         $options[$tmplt["child"]] = $tmplt["title"];
     }
     if ($a_mode != "edit") {
         $si = new ilSelectInputGUI($lng->txt("skmg_skill_template"), "skill_template_id");
         $si->setOptions($options);
         $si->setRequired(true);
         $this->form->addItem($si);
     } else {
         $ne = new ilNonEditableValueGUI($lng->txt("skmg_skill_template"), "");
         $ne->setValue($options[$this->node_object->getSkillTemplateId()]);
         $this->form->addItem($ne);
     }
     // status
     $this->addStatusInput($this->form);
     // selectable
     $cb = new ilCheckboxInputGUI($lng->txt("skmg_selectable"), "selectable");
     $cb->setInfo($lng->txt("skmg_selectable_info"));
     $this->form->addItem($cb);
     if ($a_mode == "create") {
         $this->form->addCommandButton("save", $lng->txt("save"));
         $this->form->addCommandButton("cancel", $lng->txt("cancel"));
         $this->form->setTitle($lng->txt("skmg_new_sktr"));
     } else {
         $this->form->addCommandButton("updateSkillTemplateReference", $lng->txt("save"));
         $this->form->setTitle($lng->txt("skmg_edit_sktr"));
     }
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:54,代码来源:class.ilSkillTemplateReferenceGUI.php

示例14: initStylePropertiesForm

 /**
  * Init style properties form
  */
 function initStylePropertiesForm()
 {
     global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
     $tpl->setTreeFlatIcon("", "");
     $ilTabs->clearTargets();
     $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(), "xhtml_page");
     if ($xpage_id > 0) {
         $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"), $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
     } else {
         $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" . $this->object->getRefId(), "_top");
     }
     include_once "./Services/Container/classes/class.ilContainerPageGUI.php";
     $page_gui = new ilContainerPageGUI($this->object->getId());
     $style_id = $this->object->getStyleSheetId();
     if (ilObject::_lookupType($style_id) == "sty") {
         $page_gui->setStyleId($style_id);
     } else {
         $style_id = 0;
     }
     $page_gui->setTabHook($this, "addPageTabs");
     $ilCtrl->getHTML($page_gui);
     $ilTabs->setTabActive("obj_sty");
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $lng->loadLanguageModule("style");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $fixed_style = $ilSetting->get("fixed_content_style_id");
     //		$style_id = $this->object->getStyleSheetId();
     if ($fixed_style > 0) {
         $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
         $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" . $this->lng->txt("global_fixed") . ")");
         $this->form->addItem($st);
     } else {
         $st_styles = ilObjStyleSheet::_getStandardStyles(true, false, $_GET["ref_id"]);
         $st_styles[0] = $this->lng->txt("default");
         ksort($st_styles);
         if ($style_id > 0) {
             // individual style
             if (!ilObjStyleSheet::_lookupStandard($style_id)) {
                 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
                 $st->setValue(ilObject::_lookupTitle($style_id));
                 $this->form->addItem($st);
                 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
                 // delete command
                 $this->form->addCommandButton("editStyle", $lng->txt("style_edit_style"));
                 $this->form->addCommandButton("deleteStyle", $lng->txt("style_delete_style"));
                 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
             }
         }
         if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
             $style_sel = ilUtil::formSelect($style_id, "style_id", $st_styles, false, true);
             $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
             $style_sel->setOptions($st_styles);
             $style_sel->setValue($style_id);
             $this->form->addItem($style_sel);
             //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
             $this->form->addCommandButton("saveStyleSettings", $lng->txt("save"));
             $this->form->addCommandButton("createStyle", $lng->txt("sty_create_ind_style"));
         }
     }
     $this->form->setTitle($lng->txt("obj_sty"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:66,代码来源:class.ilContainerGUI.php

示例15: properties

 /**
  * scorm module properties
  */
 function properties()
 {
     global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting, $ilTabs;
     $lng->loadLanguageModule("style");
     ilObjSAHSLearningModuleGUI::setSettingsSubTabs();
     $ilTabs->setSubTabActive('cont_settings');
     // view
     $ilToolbar->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilSAHSPresentationGUI&amp;ref_id=" . $this->object->getRefID(), "_blank");
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($ilCtrl->getFormAction($this));
     $this->form->setTitle($this->lng->txt("cont_lm_properties"));
     // SCORM-type
     $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
     $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
     $this->form->addItem($ne);
     // version
     $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
     $ne->setValue($this->object->getModuleVersion());
     $this->form->addItem($ne);
     // online
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
     $cb->setValue("y");
     if ($this->object->getOnline()) {
         $cb->setChecked(true);
     }
     $this->form->addItem($cb);
     // offline Mode
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_offline_mode_allow"), "cobj_offline_mode");
     $cb->setValue("y");
     $cb->setChecked($this->object->getOfflineMode());
     include_once "./Modules/ScormAicc/classes/class.ilSCORMOfflineMode.php";
     if ($this->object->getOfflineMode() == true && ilSCORMOfflineMode::checkIfAnyoneIsInOfflineMode($this->object->getID()) == true) {
         $cb->setDisabled(true);
         $cb->setInfo($this->lng->txt("cont_offline_mode_disable_not_allowed_info"));
     } else {
         $cb->setInfo($this->lng->txt("cont_offline_mode_allow_info"));
     }
     $this->form->addItem($cb);
     //
     // presentation
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_presentation"));
     $this->form->addItem($sh);
     // display mode (open)
     $options = array("0" => $this->lng->txt("cont_open_normal"), "1" => $this->lng->txt("cont_open_iframe_max"), "2" => $this->lng->txt("cont_open_iframe_defined"), "5" => $this->lng->txt("cont_open_window_undefined"), "6" => $this->lng->txt("cont_open_window_defined"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getOpenMode());
     $this->form->addItem($si);
     // width
     $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width");
     $ni->setMaxLength(4);
     $ni->setSize(4);
     $ni->setValue($this->object->getWidth());
     $this->form->addItem($ni);
     // height
     $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height");
     $ni->setMaxLength(4);
     $ni->setSize(4);
     $ni->setValue($this->object->getHeight());
     $this->form->addItem($ni);
     // auto navigation to last visited item
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
     $cb->setValue("y");
     $cb->setChecked($this->object->getAuto_last_visited());
     $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
     $this->form->addItem($cb);
     // auto continue
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_auto_continue"), "auto_continue");
     $cb->setValue("y");
     $cb->setChecked($this->object->getAutoContinue());
     $this->form->addItem($cb);
     //
     // scorm options
     //
     $sh = new ilFormSectionHeaderGUI();
     $sh->setTitle($this->lng->txt("cont_scorm_options"));
     $this->form->addItem($sh);
     // max attempts
     $ni = new ilNumberInputGUI($this->lng->txt("cont_sc_max_attempt"), "max_attempt");
     $ni->setMaxLength(3);
     $ni->setSize(3);
     $ni->setValue($this->object->getMaxAttempt());
     $this->form->addItem($ni);
     // lesson mode
     $options = array("normal" => $this->lng->txt("cont_sc_less_mode_normal"), "browse" => $this->lng->txt("cont_sc_less_mode_browse"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_def_lesson_mode"), "lesson_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getDefaultLessonMode());
     $this->form->addItem($si);
     // credit mode
     $options = array("credit" => $this->lng->txt("cont_credit_on"), "no_credit" => $this->lng->txt("cont_credit_off"));
     $si = new ilSelectInputGUI($this->lng->txt("cont_credit_mode"), "credit_mode");
     $si->setOptions($options);
     $si->setValue($this->object->getCreditMode());
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilObjSCORMLearningModuleGUI.php


注:本文中的ilNonEditableValueGUI::setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。