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


PHP ilCheckboxInputGUI::setAlert方法代码示例

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


在下文中一共展示了ilCheckboxInputGUI::setAlert方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initAuthModeDetermination

 /**
  * init auth mode determinitation form
  *
  * @access protected
  */
 protected function initAuthModeDetermination()
 {
     if (is_object($this->form)) {
         return true;
     }
     // Are there any authentication methods that support automatic determination ?
     include_once 'Services/Authentication/classes/class.ilAuthModeDetermination.php';
     $det = ilAuthModeDetermination::_getInstance();
     if ($det->getCountActiveAuthModes() <= 1) {
         return false;
     }
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     $this->form->setTableWidth('100%');
     $this->form->setTitle($this->lng->txt('auth_auth_settings'));
     $this->form->addCommandButton('updateAuthModeDetermination', $this->lng->txt('save'));
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
     $cap->setInfo($this->lng->txt('adm_captcha_anonymous_auth'));
     $cap->setValue(1);
     if (!ilCaptchaUtil::checkFreetype()) {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $cap->setChecked(ilCaptchaUtil::isActiveForLogin());
     $this->form->addItem($cap);
     $header = new ilFormSectionHeaderGUI();
     $header->setTitle($this->lng->txt('auth_auth_mode_determination'));
     $this->form->addItem($header);
     $kind = new ilRadioGroupInputGUI($this->lng->txt('auth_kind_determination'), 'kind');
     $kind->setInfo($this->lng->txt('auth_mode_determination_info'));
     $kind->setValue($det->getKind());
     $kind->setRequired(true);
     $option_user = new ilRadioOption($this->lng->txt('auth_by_user'), 0);
     $kind->addOption($option_user);
     $option_determination = new ilRadioOption($this->lng->txt('auth_automatic'), 1);
     include_once 'Services/Authentication/classes/class.ilAuthUtils.php';
     $auth_sequenced = $det->getAuthModeSequence();
     $counter = 1;
     foreach ($auth_sequenced as $auth_mode) {
         switch ($auth_mode) {
             case AUTH_LDAP:
                 $text = $this->lng->txt('auth_ldap');
                 break;
             case AUTH_RADIUS:
                 $text = $this->lng->txt('auth_radius');
                 break;
             case AUTH_LOCAL:
                 $text = $this->lng->txt('auth_local');
                 break;
             case AUTH_SOAP:
                 $text = $this->lng->txt('auth_soap');
                 break;
             case AUTH_APACHE:
                 $text = $this->lng->txt('auth_apache');
                 break;
                 // begin-patch auth_plugin
             // begin-patch auth_plugin
             default:
                 foreach (ilAuthUtils::getAuthPlugins() as $pl) {
                     $option = $pl->getMultipleAuthModeOptions($auth_mode);
                     $text = $option[$auth_mode]['txt'];
                 }
                 break;
                 // end-patch auth_plugin
         }
         $pos = new ilTextInputGUI($text, 'position[' . $auth_mode . ']');
         $pos->setValue($counter++);
         $pos->setSize(1);
         $pos->setMaxLength(1);
         $option_determination->addSubItem($pos);
     }
     $kind->addOption($option_determination);
     $this->form->addItem($kind);
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:81,代码来源:class.ilObjAuthSettingsGUI.php

示例2: getSettingsForm

 /**
  * @return ilPropertyFormGUI
  */
 protected function getSettingsForm()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
     $form->setTitle($this->lng->txt('settings'));
     $frm_radio = new ilRadioGroupInputGUI($this->lng->txt('show_topics_overview'), 'forum_overview');
     $frm_radio->addOption(new ilRadioOption($this->lng->txt('new') . ', ' . $this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '0'));
     $frm_radio->addOption(new ilRadioOption($this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '1'));
     $frm_radio->setInfo($this->lng->txt('topics_overview_info'));
     $form->addItem($frm_radio);
     $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics');
     $check->setInfo($this->lng->txt('enable_fora_statistics_desc'));
     $form->addItem($check);
     $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora');
     $check->setInfo($this->lng->txt('enable_anonymous_fora_desc'));
     $form->addItem($check);
     require_once 'Services/Cron/classes/class.ilCronManager.php';
     if (ilCronManager::isJobActive('frm_notification')) {
         require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
         ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_FORUM, $form, $this);
     } else {
         $notifications = new ilCheckboxInputGui($this->lng->txt('cron_forum_notification'), 'forum_notification');
         $notifications->setInfo($this->lng->txt('cron_forum_notification_desc'));
         $notifications->setValue(1);
         $form->addItem($notifications);
     }
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
     $cap->setInfo($this->lng->txt('adm_captcha_anonymous_frm'));
     $cap->setValue(1);
     if (!ilCaptchaUtil::checkFreetype()) {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $form->addItem($cap);
     $form->addCommandButton('saveSettings', $this->lng->txt('save'));
     $form->addCommandButton('cancel', $this->lng->txt('cancel'));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:42,代码来源:class.ilObjForumAdministrationGUI.php

示例3: initForm

 function initForm()
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'save'));
     $this->form_gui->setTitle($this->lng->txt('reg_settings_header'));
     $reg_type = new ilRadioGroupInputGUI($this->lng->txt('reg_type'), 'reg_type');
     $reg_type->addOption(new ilRadioOption($this->lng->txt('reg_disabled'), IL_REG_DISABLED));
     $option = new ilRadioOption($this->lng->txt('reg_direct'), IL_REG_DIRECT);
     $option->setInfo($this->lng->txt('reg_direct_info'));
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_DIRECT);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_approve'), IL_REG_APPROVE);
     $option->setInfo($this->lng->txt('reg_approve_info'));
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_APPROVE);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_type_confirmation'), IL_REG_ACTIVATION);
     $option->setInfo($this->lng->txt('reg_type_confirmation_info'));
     $lt = new ilNumberInputGUI($this->lng->txt('reg_confirmation_hash_life_time'), 'reg_hash_life_time');
     $lt->setSize(5);
     $lt->setMaxLength(5);
     $lt->setMinValue(ilRegistrationSettings::REG_HASH_LIFETIME_MIN_VALUE);
     $lt->setRequired(true);
     $lt->setInfo($this->lng->txt('reg_confirmation_hash_life_time_info'));
     $lt->setSuffix($this->lng->txt('seconds'));
     $option->addSubItem($lt);
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_ACTIVATION);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('registration_reg_type_codes'), IL_REG_CODES);
     $option->setInfo($this->lng->txt('registration_reg_type_codes_info'));
     $reg_type->addOption($option);
     $this->form_gui->addItem($reg_type);
     $pwd_gen = new ilCheckboxInputGUI($this->lng->txt('passwd_generation'), 'reg_pwd');
     $pwd_gen->setValue(1);
     $pwd_gen->setInfo($this->lng->txt('reg_info_pwd'));
     $this->form_gui->addItem($pwd_gen);
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
     $cap->setInfo($this->lng->txt('adm_captcha_anonymous_reg'));
     $cap->setValue(1);
     if (!ilCaptchaUtil::checkFreetype()) {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $this->form_gui->addItem($cap);
     $approver = new ilTextInputGUI($this->lng->txt('reg_notification'), 'reg_approver');
     $approver->setSize(32);
     $approver->setMaxLength(50);
     $approver->setInfo($this->lng->txt('reg_notification_info'));
     $this->form_gui->addItem($approver);
     $roles = new ilRadioGroupInputGUI($this->lng->txt('reg_role_assignment'), 'reg_role_type');
     $option = new ilRadioOption($this->lng->txt('reg_fixed'), IL_REG_ROLES_FIXED);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editRoles');
     $list->setHtml($this->__parseRoleList($this->__prepareRoleList(), $edit));
     $option->addSubItem($list);
     $roles->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_email'), IL_REG_ROLES_EMAIL);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editEmailAssignments');
     $list->setHtml($this->__parseRoleList($this->__prepareAutomaticRoleList(), $edit));
     $option->addSubItem($list);
     $roles->addOption($option);
     $roles->setInfo($this->lng->txt('registration_codes_override_global_info'));
     $this->form_gui->addItem($roles);
     $limit = new ilCheckboxInputGUI($this->lng->txt('reg_access_limitations'), 'reg_access_limitation');
     $limit->setValue(1);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editRoleAccessLimitations');
     $list->setHtml($this->__parseRoleList($this->__prepareAccessLimitationRoleList(), $edit));
     $list->setInfo($this->lng->txt('registration_codes_override_global_info'));
     $limit->addSubItem($list);
     $this->form_gui->addItem($limit);
     $domains = new ilTextInputGUI($this->lng->txt('reg_allowed_domains'), 'reg_allowed_domains');
     $domains->setInfo($this->lng->txt('reg_allowed_domains_info'));
     $this->form_gui->addItem($domains);
     $this->form_gui->addCommandButton('save', $this->lng->txt('save'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:83,代码来源:class.ilRegistrationSettingsGUI.php

示例4: initBasicSettingsForm

 /**
  * Init basic settings form.
  */
 public function initBasicSettingsForm()
 {
     global $lng, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $lng->loadLanguageModule("pd");
     // installation short title
     $ti = new ilTextInputGUI($this->lng->txt("short_inst_name"), "short_inst_name");
     $ti->setMaxLength(200);
     $ti->setSize(40);
     $ti->setValue($ilSetting->get("short_inst_name"));
     $ti->setInfo($this->lng->txt("short_inst_name_info"));
     $this->form->addItem($ti);
     // public section
     $cb = new ilCheckboxInputGUI($this->lng->txt("pub_section"), "pub_section");
     $cb->setInfo($lng->txt("pub_section_info"));
     if ($ilSetting->get("pub_section")) {
         $cb->setChecked(true);
     }
     // search engine
     include_once 'Services/PrivacySecurity/classes/class.ilRobotSettings.php';
     $robot_settings = ilRobotSettings::_getInstance();
     $cb2 = new ilCheckboxInputGUI($this->lng->txt("search_engine"), "open_google");
     $cb2->setInfo($this->lng->txt("enable_search_engine"));
     $cb->addSubItem($cb2);
     if (!$robot_settings->checkModRewrite()) {
         $cb2->setAlert($lng->txt("mod_rewrite_disabled"));
         $cb2->setChecked(false);
         $cb2->setDisabled(true);
     } elseif (!$robot_settings->checkRewrite()) {
         $cb2->setAlert($lng->txt("allow_override_alert"));
         $cb2->setChecked(false);
         $cb2->setDisabled(true);
     } else {
         if ($ilSetting->get("open_google")) {
             $cb2->setChecked(true);
         }
     }
     // Enable Global Profiles
     $cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_user_publish'), 'enable_global_profiles');
     $cb_prop->setInfo($lng->txt('pd_enable_user_publish_info'));
     $cb_prop->setChecked($ilSetting->get('enable_global_profiles'));
     $cb->addSubItem($cb_prop);
     // activate captcha for anonymous wiki/forum editing
     include_once "./Services/Captcha/classes/class.ilCaptchaUtil.php";
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_wiki_forum'), 'activate_captcha_anonym');
     $cap->setValue(1);
     if (ilCaptchaUtil::checkFreetype()) {
         $cap->setChecked($ilSetting->get('activate_captcha_anonym'));
     } else {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $cb->addSubItem($cap);
     $this->form->addItem($cb);
     // default repository view
     $options = array("flat" => $lng->txt("flatview"), "tree" => $lng->txt("treeview"));
     $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
     $si->setOptions($options);
     $si->setInfo($this->lng->txt(""));
     if ($ilSetting->get("default_repository_view") == "tree") {
         $si->setValue("tree");
     } else {
         $si->setValue("flat");
     }
     $this->form->addItem($si);
     //
     $options = array("" => $lng->txt("adm_rep_tree_only_container"), "tree" => $lng->txt("adm_all_resource_types"));
     // repository tree
     $radg = new ilRadioGroupInputGUI($lng->txt("adm_rep_tree_presentation"), "tree_pres");
     $radg->setValue($ilSetting->get("repository_tree_pres"));
     $op1 = new ilRadioOption($lng->txt("adm_rep_tree_only_cntr"), "", $lng->txt("adm_rep_tree_only_cntr_info"));
     $radg->addOption($op1);
     $op2 = new ilRadioOption($lng->txt("adm_rep_tree_all_types"), "all_types", $lng->txt("adm_rep_tree_all_types_info"));
     // limit tree in courses and groups
     $cb = new ilCheckboxInputGUI($lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
     $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
     $cb->setInfo($lng->txt("adm_rep_tree_limit_grp_crs_info"));
     $op2->addSubItem($cb);
     $radg->addOption($op2);
     $this->form->addItem($radg);
     $sdesc = new ilCheckboxInputGUI($lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
     $sdesc->setInfo($lng->txt("adm_rep_shorten_description_info"));
     $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
     $this->form->addItem($sdesc);
     $sdesclen = new ilTextInputGUI($lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
     $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
     $sdesclen->setSize(3);
     $sdesc->addSubItem($sdesclen);
     // synchronize repository tree with main view
     $cb = new ilCheckboxInputGUI($lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
     $cb->setInfo($lng->txt("adm_synchronize_rep_tree_info"));
     $cb->setChecked($ilSetting->get("rep_tree_synchronize"));
     $this->form->addItem($cb);
     // repository access check
     /*		$options = array(
     			0 => "0",
     			10 => "10",
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjSystemFolderGUI.php

示例5: initForm

 /**
  * @param string $a_mode
  * @return ilPropertyFormGUI
  */
 public function initForm($a_mode = "edit")
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
     $cap->setInfo($this->lng->txt('adm_captcha_anonymous_wiki'));
     $cap->setValue(1);
     if (!ilCaptchaUtil::checkFreetype()) {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $form->addItem($cap);
     if ($this->checkPermissionBool("write")) {
         $form->addCommandButton("saveSettings", $lng->txt("save"));
     }
     $form->setTitle($lng->txt("settings"));
     $form->setFormAction($ilCtrl->getFormAction($this));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilObjWikiSettingsGUI.php


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