本文整理汇总了PHP中ilPropertyFormGUI::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::setName方法的具体用法?PHP ilPropertyFormGUI::setName怎么用?PHP ilPropertyFormGUI::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::setName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showLoginForm
/**
* Show login form
* @global ilSetting $ilSetting
* @param string $page_editor_html
*/
protected function showLoginForm($page_editor_html)
{
global $ilSetting, $lng, $tpl;
// @todo move this to auth utils.
// login via ILIAS (this also includes radius and ldap)
// If local authentication is enabled for shibboleth users, we
// display the login form for ILIAS here.
if (($ilSetting->get("auth_mode") != AUTH_SHIBBOLETH || $ilSetting->get("shib_auth_allow_local")) && $ilSetting->get("auth_mode") != AUTH_CAS) {
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
//$form->setTableWidth('500');
$form->setFormAction($this->ctrl->getFormAction($this, ''));
$form->setName("formlogin");
$form->setShowTopButtons(false);
$form->setTitle($lng->txt("login_to_ilias"));
// auth selection
include_once './Services/Authentication/classes/class.ilAuthModeDetermination.php';
$det = ilAuthModeDetermination::_getInstance();
if (ilAuthUtils::_hasMultipleAuthenticationMethods() and $det->isManualSelection()) {
$visible_auth_methods = array();
$radg = new ilRadioGroupInputGUI($lng->txt("auth_selection"), "auth_mode");
foreach (ilAuthUtils::_getMultipleAuthModeOptions($lng) as $key => $option) {
if (isset($option['hide_in_ui']) && $option['hide_in_ui']) {
continue;
}
$op1 = new ilRadioOption($option['txt'], $key);
$radg->addOption($op1);
if (isset($option['checked'])) {
$radg->setValue($key);
}
$visible_auth_methods[] = $op1;
}
if (count($visible_auth_methods) == 1) {
$first_auth_method = current($visible_auth_methods);
$hidden_auth_method = new ilHiddenInputGUI("auth_mode");
$hidden_auth_method->setValue($first_auth_method->getValue());
$form->addItem($hidden_auth_method);
} else {
$form->addItem($radg);
}
}
$ti = new ilTextInputGUI($lng->txt("username"), "username");
$ti->setSize(20);
$ti->setRequired(true);
$form->addItem($ti);
$pi = new ilPasswordInputGUI($lng->txt("password"), "password");
$pi->setRetype(false);
$pi->setSize(20);
$pi->setDisableHtmlAutoComplete(false);
$pi->setRequired(true);
$form->addItem($pi);
$form->addCommandButton("showLogin", $lng->txt("log_in"));
require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
if (ilCaptchaUtil::isActiveForLogin()) {
require_once 'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
$captcha = new ilCaptchaInputGUI($lng->txt('captcha_code'), 'captcha_code');
$captcha->setRequired(true);
$form->addItem($captcha);
}
return $this->substituteLoginPageElements($tpl, $page_editor_html, $form->getHTML(), '[list-login-form]', 'LOGIN_FORM');
}
return $page_editor_html;
}