本文整理汇总了PHP中ilFormSectionHeaderGUI::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilFormSectionHeaderGUI::setTitle方法的具体用法?PHP ilFormSectionHeaderGUI::setTitle怎么用?PHP ilFormSectionHeaderGUI::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilFormSectionHeaderGUI
的用法示例。
在下文中一共展示了ilFormSectionHeaderGUI::setTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initForm
protected function initForm()
{
$this->setFormAction($this->ctrl->getFormActionByClass('certCheckSignatureGUI', 'decryptSignature'));
$te = new ilFormSectionHeaderGUI();
$te->setTitle($this->pl->txt('signature_check'));
$this->addItem($te);
// signature
$signature = new ilTextInputGUI($this->pl->txt('signature'), 'signature');
$this->addItem($signature);
$this->addCommandButton('decryptSignature', $this->lng->txt('send'));
}
示例2: completeSpecificFormProperties
/**
* completes a given form object with the specific form properties
* required by this question type
*
* @access public
* @param ilPropertyFormGUI $form
*/
public function completeSpecificFormProperties(ilPropertyFormGUI $form)
{
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt('feedback_answers'));
$form->addItem($header);
if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
foreach ($this->getAnswerOptionsByAnswerIndex() as $index => $answer) {
$propertyLabel = $this->questionOBJ->prepareTextareaOutput($this->buildAnswerOptionLabel($index, $answer), true);
$propertyPostVar = "feedback_answer_{$index}";
$form->addItem($this->buildFeedbackContentFormProperty($propertyLabel, $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()));
}
}
}
示例3: addToForm
public function addToForm()
{
if ($this->getTitle()) {
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->getTitle());
if ($this->getInfo()) {
$section->setInfo($this->getInfo());
}
$this->getForm()->addItem($section);
}
$this->prepareElements();
foreach ($this->elements as $element) {
$element->addToForm();
}
}
示例4: completeSpecificFormProperties
/**
* completes a given form object with the specific form properties
* required by this question type
*
* (overwrites the method from ilAssMultiOptionQuestionFeedback, because of individual setting)
*
* @access public
* @param ilPropertyFormGUI $form
*/
public function completeSpecificFormProperties(ilPropertyFormGUI $form)
{
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt('feedback_answers'));
$form->addItem($header);
if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
require_once './Services/Form/classes/class.ilRadioGroupInputGUI.php';
require_once './Services/Form/classes/class.ilRadioOption.php';
$feedback = new ilRadioGroupInputGUI($this->lng->txt('feedback_setting'), 'feedback_setting');
$feedback->addOption(new ilRadioOption($this->lng->txt('feedback_all'), 1), true);
$feedback->addOption(new ilRadioOption($this->lng->txt('feedback_checked'), 2));
$feedback->addOption(new ilRadioOption($this->lng->txt('feedback_correct'), 3));
$form->addItem($feedback);
foreach ($this->getAnswerOptionsByAnswerIndex() as $index => $answer) {
$propertyLabel = $this->questionOBJ->prepareTextareaOutput($this->buildAnswerOptionLabel($index, $answer), true);
$propertyPostVar = "feedback_answer_{$index}";
$form->addItem($this->buildFeedbackContentFormProperty($propertyLabel, $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()));
}
}
}
示例5: initEditCustomForm
/**
* Init properties form.
*/
protected function initEditCustomForm(ilPropertyFormGUI $a_form)
{
$a_form->setTitle($this->lng->txt("exc_edit_exercise"));
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('exc_passing_exc'));
$a_form->addItem($section);
// pass mode
$radg = new ilRadioGroupInputGUI($this->lng->txt("exc_pass_mode"), "pass_mode");
$op1 = new ilRadioOption($this->lng->txt("exc_pass_all"), "all", $this->lng->txt("exc_pass_all_info"));
$radg->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("exc_pass_minimum_nr"), "nr", $this->lng->txt("exc_pass_minimum_nr_info"));
$radg->addOption($op2);
// minimum number of assignments to pass
$ni = new ilNumberInputGUI($this->lng->txt("exc_min_nr"), "pass_nr");
$ni->setSize(4);
$ni->setMaxLength(4);
$ni->setRequired(true);
include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
$mand = ilExAssignment::countMandatory($this->object->getId());
$min = max($mand, 1);
$ni->setMinValue($min, true);
$ni->setInfo($this->lng->txt("exc_min_nr_info"));
$op2->addSubItem($ni);
$a_form->addItem($radg);
// completion by submission
$subcompl = new ilRadioGroupInputGUI($this->lng->txt("exc_passed_status_determination"), "completion_by_submission");
$op1 = new ilRadioOption($this->lng->txt("exc_completion_by_tutor"), 0, "");
$subcompl->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("exc_completion_by_submission"), 1, $this->lng->txt("exc_completion_by_submission_info"));
$subcompl->addOption($op2);
$a_form->addItem($subcompl);
/*$subcompl = new ilCheckboxInputGUI($this->lng->txt('exc_completion_by_submission'), 'completion_by_submission');
$subcompl->setInfo($this->lng->txt('exc_completion_by_submission_info'));
$subcompl->setValue(1);
$a_form->addItem($subcompl);*/
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('exc_publishing'));
$a_form->addItem($section);
// show submissions
$cb = new ilCheckboxInputGUI($this->lng->txt("exc_show_submissions"), "show_submissions");
$cb->setInfo($this->lng->txt("exc_show_submissions_info"));
$a_form->addItem($cb);
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('exc_notification'));
$a_form->addItem($section);
// submission notifications
$cbox = new ilCheckboxInputGUI($this->lng->txt("exc_submission_notification"), "notification");
$cbox->setInfo($this->lng->txt("exc_submission_notification_info"));
$a_form->addItem($cbox);
}
示例6: populateAnswerSpecificFormPart
/**
* @param ilPropertyFormGUI $form
* @return \ilPropertyFormGUI|void
*/
public function populateAnswerSpecificFormPart(ilPropertyFormGUI $form)
{
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("errors_section"));
$form->addItem($header);
include_once "./Modules/TestQuestionPool/classes/class.ilErrorTextWizardInputGUI.php";
$errordata = new ilErrorTextWizardInputGUI($this->lng->txt("errors"), "errordata");
$errordata->setKeyName($this->lng->txt('text_wrong'));
$errordata->setValueName($this->lng->txt('text_correct'));
$errordata->setValues($this->object->getErrorData());
$form->addItem($errordata);
// points for wrong selection
$points_wrong = new ilNumberInputGUI($this->lng->txt("points_wrong"), "points_wrong");
$points_wrong->allowDecimals(true);
$points_wrong->setValue($this->object->getPointsWrong());
$points_wrong->setInfo($this->lng->txt("points_wrong_info"));
$points_wrong->setSize(6);
$points_wrong->setRequired(true);
$form->addItem($points_wrong);
return $form;
}
示例7: initSettingsForm
protected function initSettingsForm($a_mode = 'create')
{
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setTableWidth('600');
if ($a_mode == 'create') {
$this->form_gui->setTitle($this->lng->txt('icrs_new'));
} else {
$this->form_gui->setTitle($this->lng->txt('icrs_edit'));
}
$this->form_gui->setTitleIcon(ilUtil::getTypeIconPath('icrs', 0));
// Title
$text_input = new ilTextInputGUI($this->lng->txt('title'), 'title');
$text_input->setRequired(true);
$this->form_gui->addItem($text_input);
// Description
$text_area = new ilTextAreaInputGUI($this->lng->txt('desc'), 'desc');
$this->form_gui->addItem($text_area);
// Access
$text_area = new ilCheckboxInputGUI($this->lng->txt('online'), 'activated');
$this->form_gui->addItem($text_area);
// AKClassValues
if ($this->ilias->getSetting('ilinc_akclassvalues_active')) {
$section_header = new ilFormSectionHeaderGUI();
$section_header->setTitle($this->lng->txt('akclassvalues'));
$this->form_gui->addItem($section_header);
$text_input = new ilTextInputGUI($this->lng->txt('akclassvalue1'), 'akclassvalue1');
if ($this->ilias->getSetting('ilinc_akclassvalues_required')) {
$text_input->setRequired(true);
}
$this->form_gui->addItem($text_input);
$text_input = new ilTextInputGUI($this->lng->txt('akclassvalue2'), 'akclassvalue2');
$this->form_gui->addItem($text_input);
}
if ($this->call_by_reference) {
$this->ctrl->setParameter($this, 'obj_id', $this->obj_id);
}
// save and cancel commands
if ($a_mode == 'create') {
$this->ctrl->setParameter($this, 'mode', 'create');
$this->ctrl->setParameter($this, 'new_type', 'icrs');
$this->form_gui->addCommandButton('save', $this->lng->txt('icrs_add'));
$this->form_gui->addCommandButton('cancel', $this->lng->txt('cancel'));
$this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'save'));
} else {
$this->form_gui->addCommandButton('update', $this->lng->txt('save'));
$this->form_gui->addCommandButton('cancel', $this->lng->txt('cancel'));
$this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'update'));
}
}
示例8: initSettingsForm
protected function initSettingsForm()
{
global $ilSetting;
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("settings"));
$form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
// default repository view
$options = array("flat" => $this->lng->txt("flatview"), "tree" => $this->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");
}
$form->addItem($si);
//
$options = array("" => $this->lng->txt("adm_rep_tree_only_container"), "tree" => $this->lng->txt("adm_all_resource_types"));
// repository tree
$radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
$radg->setValue($ilSetting->get("repository_tree_pres"));
$op1 = new ilRadioOption($this->lng->txt("adm_rep_tree_only_cntr"), "", $this->lng->txt("adm_rep_tree_only_cntr_info"));
$radg->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("adm_rep_tree_all_types"), "all_types", $this->lng->txt("adm_rep_tree_all_types_info"));
// limit tree in courses and groups
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
$cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
$cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
$op2->addSubItem($cb);
$radg->addOption($op2);
$form->addItem($radg);
/* OBSOLETE
// synchronize repository tree with main view
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_synchronize_rep_tree"), "rep_tree_synchronize");
$cb->setInfo($this->lng->txt("adm_synchronize_rep_tree_info"));
$cb->setChecked($ilSetting->get("rep_tree_synchronize"));
$form->addItem($cb);
*/
/* DISABLED
// repository access check
$options = array(
0 => "0",
10 => "10",
30 => "30",
60 => "60",
120 => "120"
);
$si = new ilSelectInputGUI($this->lng->txt("adm_repository_cache_time"), "rep_cache");
$si->setOptions($options);
$si->setValue($ilSetting->get("rep_cache"));
$si->setInfo($this->lng->txt("adm_repository_cache_time_info")." ".
$this->lng->txt("adm_repository_cache_time_info2"));
$form->addItem($si);
*/
// trash
$cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
$cb->setInfo($this->lng->txt("enable_trash_info"));
if ($ilSetting->get("enable_trash")) {
$cb->setChecked(true);
}
$form->addItem($cb);
// change event
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
$this->lng->loadLanguageModule("trac");
$event = new ilCheckboxInputGUI($this->lng->txt('trac_repository_changes'), 'change_event_tracking');
$event->setChecked(ilChangeEvent::_isActive());
$form->addItem($event);
include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
ilAdministrationSettingsFormHandler::addFieldsToForm(ilAdministrationSettingsFormHandler::FORM_REPOSITORY, $form, $this);
// object lists
$lists = new ilFormSectionHeaderGUI();
$lists->setTitle($this->lng->txt("rep_object_lists"));
$form->addItem($lists);
$sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
$sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
$sdesc->setChecked($ilSetting->get("rep_shorten_description"));
$form->addItem($sdesc);
$sdesclen = new ilNumberInputGUI($this->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);
// load action commands asynchronously
$cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
$cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
$cb->setChecked($ilSetting->get("item_cmd_asynch"));
$form->addItem($cb);
// notes/comments/tagging
$pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
$pl->setValue(1);
$pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
$form->addItem($pl);
$pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
$pltags->setValue(1);
$pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
$pl->addSubItem($pltags);
$form->addCommandButton('saveSettings', $this->lng->txt('save'));
return $form;
}
示例9: 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');
//.........这里部分代码省略.........
示例10: getApacheAuthSettingsForm
public function getApacheAuthSettingsForm()
{
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('apache_settings'));
$chb_enabled = new ilCheckboxInputGUI($this->lng->txt('apache_enable_auth'), 'apache_enable_auth');
$form->addItem($chb_enabled);
$chb_local_create_account = new ilCheckboxInputGUI($this->lng->txt('apache_autocreate'), 'apache_local_autocreate');
$chb_enabled->addSubitem($chb_local_create_account);
global $rbacreview;
$roles = $rbacreview->getGlobalRolesArray();
$select = new ilSelectInputGUI($this->lng->txt('apache_default_role'), 'apache_default_role');
$roleOptions = array();
foreach ($roles as $role) {
$roleOptions[$role['obj_id']] = ilObject::_lookupTitle($role['obj_id']);
}
$select->setOptions($roleOptions);
$select->setValue(4);
$chb_local_create_account->addSubitem($select);
$chb_local = new ilCheckboxInputGUI($this->lng->txt('apache_enable_local'), 'apache_enable_local');
$form->addItem($chb_local);
$chb_ldap = new ilCheckboxInputGUI($this->lng->txt('apache_enable_ldap'), 'apache_enable_ldap');
$chb_ldap->setInfo($this->lng->txt('apache_ldap_hint_ldap_must_be_configured'));
$form->addItem($chb_ldap);
$txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_name'), 'apache_auth_indicator_name');
$txt->setRequired(true);
$form->addItem($txt);
$txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_value'), 'apache_auth_indicator_value');
$txt->setRequired(true);
$form->addItem($txt);
$chb = new ilCheckboxInputGUI($this->lng->txt('apache_auth_enable_override_login'), 'apache_auth_enable_override_login_page');
$form->addItem($chb);
$txt = new ilTextInputGUI($this->lng->txt('apache_auth_target_override_login'), 'apache_auth_target_override_login_page');
$txt->setRequired(true);
$chb->addSubItem($txt);
$chb = new ilCheckboxInputGUI($this->lng->txt('apache_auth_authenticate_on_login_page'), 'apache_auth_authenticate_on_login_page');
$form->addItem($chb);
$sec = new ilFormSectionHeaderGUI();
$sec->setTitle($this->lng->txt('apache_auth_username_config'));
$form->addItem($sec);
$rag = new ilRadioGroupInputGUI($this->lng->txt('apache_auth_username_config_type'), 'apache_auth_username_config_type');
$form->addItem($rag);
$rao = new ilRadioOption($this->lng->txt('apache_auth_username_direct_mapping'), 1);
$rag->addOption($rao);
$txt = new ilTextInputGUI($this->lng->txt('apache_auth_username_direct_mapping_fieldname'), 'apache_auth_username_direct_mapping_fieldname');
//$txt->setRequired(true);
$rao->addSubItem($txt);
$rao = new ilRadioOption($this->lng->txt('apache_auth_username_extended_mapping'), 2);
$rao->setDisabled(true);
$rag->addOption($rao);
$rao = new ilRadioOption($this->lng->txt('apache_auth_username_by_function'), 3);
$rag->addOption($rao);
/* $txt = new ilTextInputGUI($this->lng->txt('apache_auth_username_by_function_functionname'), 'apache_auth_username_by_function_functionname');
$rao->addSubItem($txt);*/
$sec = new ilFormSectionHeaderGUI();
$sec->setTitle($this->lng->txt('apache_auth_security'));
$form->addItem($sec);
$txt = new ilTextAreaInputGUI($this->lng->txt('apache_auth_domains'), 'apache_auth_domains');
$txt->setInfo($this->lng->txt('apache_auth_domains_description'));
$form->addItem($txt);
$form->addCommandButton('saveApacheSettings', $this->lng->txt('save'));
$form->addCommandButton('cancel', $this->lng->txt('cancel'));
return $form;
}
示例11: createParticipantsSection
private function createParticipantsSection()
{
$participant_section = new ilFormSectionHeaderGUI();
$participant_section->setTitle($this->lng->txt("rep_robj_xrs_participants"));
return $participant_section;
}
示例12: initForm
private 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('ldap_configure'));
$active = new ilCheckboxInputGUI($this->lng->txt('auth_ldap_enable'), 'active');
$active->setValue(1);
$this->form_gui->addItem($active);
$ds = new ilCheckboxInputGUI($this->lng->txt('ldap_as_ds'), 'ds');
$ds->setValue(1);
$ds->setInfo($this->lng->txt('ldap_as_ds_info'));
$this->form_gui->addItem($ds);
$servername = new ilTextInputGUI($this->lng->txt('ldap_server_name'), 'server_name');
$servername->setRequired(true);
$servername->setInfo($this->lng->txt('ldap_server_name_info'));
$servername->setSize(32);
$servername->setMaxLength(32);
$this->form_gui->addItem($servername);
$serverurl = new ilTextInputGUI($this->lng->txt('ldap_server'), 'server_url');
$serverurl->setRequired(true);
$serverurl->setInfo($this->lng->txt('ldap_server_url_info'));
$serverurl->setSize(64);
$serverurl->setMaxLength(255);
$this->form_gui->addItem($serverurl);
$version = new ilSelectInputGUI($this->lng->txt('ldap_version'), 'version');
$version->setOptions(array(2 => 2, 3 => 3));
$version->setInfo($this->lng->txt('ldap_server_version_info'));
$this->form_gui->addItem($version);
$basedsn = new ilTextInputGUI($this->lng->txt('basedn'), 'base_dn');
$basedsn->setRequired(true);
$basedsn->setSize(64);
$basedsn->setMaxLength(255);
$this->form_gui->addItem($basedsn);
$referrals = new ilCheckboxInputGUI($this->lng->txt('ldap_referrals'), 'referrals');
$referrals->setValue(1);
$referrals->setInfo($this->lng->txt('ldap_referrals_info'));
$this->form_gui->addItem($referrals);
$section_security = new ilFormSectionHeaderGUI();
$section_security->setTitle($this->lng->txt('ldap_server_security_settings'));
$this->form_gui->addItem($section_security);
$tls = new ilCheckboxInputGUI($this->lng->txt('ldap_tls'), 'tls');
$tls->setValue(1);
$this->form_gui->addItem($tls);
$binding = new ilRadioGroupInputGUI($this->lng->txt('ldap_server_binding'), 'binding_type');
$anonymous = new ilRadioOption($this->lng->txt('ldap_bind_anonymous'), IL_LDAP_BIND_ANONYMOUS);
$binding->addOption($anonymous);
$user = new ilRadioOption($this->lng->txt('ldap_bind_user'), IL_LDAP_BIND_USER);
$dn = new ilTextInputGUI($this->lng->txt('ldap_server_bind_dn'), 'bind_dn');
$dn->setSize(64);
$dn->setMaxLength(255);
$user->addSubItem($dn);
$pass = new ilPasswordInputGUI($this->lng->txt('ldap_server_bind_pass'), 'bind_pass');
$pass->setSkipSyntaxCheck(true);
$pass->setSize(12);
$pass->setMaxLength(36);
$user->addSubItem($pass);
$binding->addOption($user);
$this->form_gui->addItem($binding);
$section_auth = new ilFormSectionHeaderGUI();
$section_auth->setTitle($this->lng->txt('ldap_authentication_settings'));
$this->form_gui->addItem($section_auth);
$search_base = new ilTextInputGUI($this->lng->txt('ldap_user_dn'), 'search_base');
$search_base->setInfo($this->lng->txt('ldap_search_base_info'));
$search_base->setSize(64);
$search_base->setMaxLength(255);
$this->form_gui->addItem($search_base);
$user_scope = new ilSelectInputGUI($this->lng->txt('ldap_user_scope'), 'user_scope');
$user_scope->setOptions(array(IL_LDAP_SCOPE_ONE => $this->lng->txt('ldap_scope_one'), IL_LDAP_SCOPE_SUB => $this->lng->txt('ldap_scope_sub')));
$user_scope->setInfo($this->lng->txt('ldap_user_scope_info'));
$this->form_gui->addItem($user_scope);
$user_attribute = new ilTextInputGUI($this->lng->txt('ldap_user_attribute'), 'user_attribute');
$user_attribute->setSize(16);
$user_attribute->setMaxLength(64);
$user_attribute->setRequired(true);
$this->form_gui->addItem($user_attribute);
$filter = new ilTextInputGUI($this->lng->txt('ldap_search_filter'), 'filter');
$filter->setInfo($this->lng->txt('ldap_filter_info'));
$filter->setSize(64);
$filter->setMaxLength(512);
$this->form_gui->addItem($filter);
$section_restrictions = new ilFormSectionHeaderGUI();
$section_restrictions->setTitle($this->lng->txt('ldap_group_restrictions'));
$this->form_gui->addItem($section_restrictions);
$group_dn = new ilTextInputGUI($this->lng->txt('ldap_group_search_base'), 'group_dn');
$group_dn->setInfo($this->lng->txt('ldap_group_dn_info'));
$group_dn->setSize(64);
$group_dn->setMaxLength(255);
$this->form_gui->addItem($group_dn);
$group_scope = new ilSelectInputGUI($this->lng->txt('ldap_group_scope'), 'group_scope');
$group_scope->setOptions(array(IL_LDAP_SCOPE_ONE => $this->lng->txt('ldap_scope_one'), IL_LDAP_SCOPE_SUB => $this->lng->txt('ldap_scope_sub')));
$group_scope->setInfo($this->lng->txt('ldap_group_scope_info'));
$this->form_gui->addItem($group_scope);
$group_filter = new ilTextInputGUI($this->lng->txt('ldap_group_filter'), 'group_filter');
$group_filter->setInfo($this->lng->txt('ldap_group_filter_info'));
$group_filter->setSize(64);
$group_filter->setMaxLength(255);
$this->form_gui->addItem($group_filter);
$group_member = new ilTextInputGUI($this->lng->txt('ldap_group_member'), 'group_member');
$group_member->setInfo($this->lng->txt('ldap_group_member_info'));
//.........这里部分代码省略.........
示例13: initSettingsTemplateForm
/**
* Init settings template form.
*
* @param int $a_mode Edit Mode
*/
public function initSettingsTemplateForm($a_mode = "edit")
{
global $lng, $ilCtrl;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(200);
$ti->setRequired(true);
// begin-patch lok
if ($this->settings_template->getAutoGenerated()) {
$ti->setDisabled(true);
}
// end-patch lok
$this->form->addItem($ti);
// description
$ti = new ilTextAreaInputGUI($lng->txt("description"), "description");
// begin-patch lok
if ($this->settings_template->getAutoGenerated()) {
$ti->setDisabled(true);
}
$this->form->addItem($ti);
// hidable tabs
$tabs = $this->getConfig()->getHidableTabs();
if (is_array($tabs) && count($tabs) > 0) {
$sec = new ilFormSectionHeaderGUI();
$sec->setTitle($lng->txt("adm_hide_tabs"));
$this->form->addItem($sec);
foreach ($tabs as $t) {
// hide tab $t?
$cb = new ilCheckboxInputGUI($t["text"], "tab_" . $t["id"]);
$this->form->addItem($cb);
}
}
// settings
$settings = $this->getConfig()->getSettings();
if (is_array($settings) && count($settings) > 0) {
$sec = new ilFormSectionHeaderGUI();
$sec->setTitle($lng->txt("adm_predefined_settings"));
$this->form->addItem($sec);
foreach ($settings as $s) {
// setting
$cb = new ilCheckboxInputGUI($s["text"], "set_" . $s["id"]);
$this->form->addItem($cb);
switch ($s["type"]) {
case ilSettingsTemplateConfig::TEXT:
$ti = new ilTextInputGUI($lng->txt("adm_value"), "value_" . $s["id"]);
//$ti->setMaxLength();
//$ti->setSize();
$cb->addSubItem($ti);
break;
case ilSettingsTemplateConfig::BOOL:
$cb2 = new ilCheckboxInputGUI($lng->txt("adm_value"), "value_" . $s["id"]);
$cb->addSubItem($cb2);
break;
case ilSettingsTemplateConfig::SELECT:
$si = new ilSelectInputGUI($lng->txt("adm_value"), "value_" . $s["id"]);
$si->setOptions($s["options"]);
$cb->addSubItem($si);
break;
case ilSettingsTemplateConfig::CHECKBOX:
$chbs = new ilCheckboxGroupInputGUI($lng->txt("adm_value"), "value_" . $s["id"]);
foreach ($s['options'] as $key => $value) {
$chbs->addOption($c = new ilCheckboxInputGUI($value, $key));
$c->setValue($key);
}
$cb->addSubItem($chbs);
break;
}
if ($s['hidable']) {
// hide setting
$cb_hide = new ilCheckboxInputGUI($lng->txt("adm_hide"), "hide_" . $s["id"]);
$cb->addSubItem($cb_hide);
}
}
}
// save and cancel commands
if ($a_mode == "create") {
$this->form->addCommandButton("saveSettingsTemplate", $lng->txt("save"));
$this->form->addCommandButton("listSettingsTemplates", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("adm_add_settings_template"));
} else {
$this->form->addCommandButton("updateSettingsTemplate", $lng->txt("save"));
$this->form->addCommandButton("listSettingsTemplates", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("adm_edit_settings_template"));
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
}
示例14: initTagStyleForm
/**
* Init tag style editing form
*
* @param int $a_mode Form Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)
*/
public function initTagStyleForm($a_mode, $a_cur_tag)
{
global $lng, $ilCtrl;
$ilCtrl->saveParameter($this, array("mq_id"));
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form_gui = new ilPropertyFormGUI();
$avail_pars = $this->object->getAvailableParameters();
$groups = $this->object->getStyleParameterGroups();
// output select lists
foreach ($groups as $k => $group) {
// filter groups of properties that should only be
// displayed with matching tag
$filtered_groups = ilObjStyleSheet::_getFilteredGroups();
if (is_array($filtered_groups[$k]) && !in_array($a_cur_tag, $filtered_groups[$k])) {
continue;
}
$sh = new ilFormSectionHeaderGUI();
$sh->setTitle($lng->txt("sty_" . $k));
$this->form_gui->addItem($sh);
foreach ($group as $par) {
$basepar = explode(".", $par);
$basepar = $basepar[0];
$var = str_replace("-", "_", $basepar);
$up_par = strtoupper($var);
switch (ilObjStyleSheet::_getStyleParameterInputType($par)) {
case "select":
$sel_input = new ilSelectInputGUI($lng->txt("sty_" . $var), $basepar);
$options = array("" => "");
foreach ($avail_pars[$par] as $p) {
$options[$p] = $p;
}
$sel_input->setOptions($options);
$this->form_gui->addItem($sel_input);
break;
case "text":
$text_input = new ilTextInputGUI($lng->txt("sty_" . $var), $basepar);
$text_input->setMaxLength(200);
$text_input->setSize(20);
$this->form_gui->addItem($text_input);
break;
case "fontsize":
include_once "./Services/Style/classes/class.ilFontSizeInputGUI.php";
$fs_input = new ilFontSizeInputGUI($lng->txt("sty_" . $var), $basepar);
$this->form_gui->addItem($fs_input);
break;
case "numeric_no_perc":
case "numeric":
include_once "./Services/Style/classes/class.ilNumericStyleValueInputGUI.php";
$num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_" . $var), $basepar);
if (ilObjStyleSheet::_getStyleParameterInputType($par) == "numeric_no_perc") {
$num_input->setAllowPercentage(false);
}
$this->form_gui->addItem($num_input);
break;
case "percentage":
$per_input = new ilNumberInputGUI($lng->txt("sty_" . $var), $basepar);
$per_input->setMinValue(0);
$per_input->setMaxValue(100);
$per_input->setMaxLength(3);
$per_input->setSize(3);
$this->form_gui->addItem($per_input);
break;
case "color":
//include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
$col_input = new ilColorPickerInputGUI($lng->txt("sty_" . $var), $basepar);
$col_input->setDefaultColor("");
$col_input->setAcceptNamedColors(true);
$this->form_gui->addItem($col_input);
break;
case "trbl_numeric":
include_once "./Services/Style/classes/class.ilTRBLNumericStyleValueInputGUI.php";
$num_input = new ilTRBLNumericStyleValueInputGUI($lng->txt("sty_" . $var), $basepar);
if (ilObjStyleSheet::_getStyleParameterInputType($par) == "trbl_numeric_no_perc") {
$num_input->setAllowPercentage(false);
}
$this->form_gui->addItem($num_input);
break;
case "border_width":
include_once "./Services/Style/classes/class.ilTRBLBorderWidthInputGUI.php";
$bw_input = new ilTRBLBorderWidthInputGUI($lng->txt("sty_" . $var), $basepar);
$this->form_gui->addItem($bw_input);
break;
case "border_style":
include_once "./Services/Style/classes/class.ilTRBLBorderStyleInputGUI.php";
$bw_input = new ilTRBLBorderStyleInputGUI($lng->txt("sty_" . $var), $basepar);
$this->form_gui->addItem($bw_input);
break;
case "trbl_color":
include_once "./Services/Style/classes/class.ilTRBLColorPickerInputGUI.php";
$col_input = new ilTRBLColorPickerInputGUI($lng->txt("sty_" . $var), $basepar);
$col_input->setAcceptNamedColors(true);
$this->form_gui->addItem($col_input);
break;
case "background_image":
include_once "./Services/Style/classes/class.ilBackgroundImageInputGUI.php";
//.........这里部分代码省略.........
示例15: initEditCustomForm
protected function initEditCustomForm(ilPropertyFormGUI $a_form)
{
// activation/availability
include_once "Services/Object/classes/class.ilObjectActivation.php";
$this->lng->loadLanguageModule('rep');
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('rep_activation_availability'));
$a_form->addItem($section);
// additional info only with multiple references
$act_obj_info = $act_ref_info = "";
if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
$act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
$act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
}
$online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
$online->setInfo($this->lng->txt('prtt_activation_online_info') . $act_obj_info);
$a_form->addItem($online);
$act_type = new ilRadioGroupInputGUI($this->lng->txt('rep_activation_access'), 'access_type');
$act_type->setInfo($act_ref_info);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_limitless'), ilObjectActivation::TIMINGS_DEACTIVATED);
$opt->setInfo($this->lng->txt('prtt_availability_limitless_info'));
$act_type->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('rep_visibility_until'), ilObjectActivation::TIMINGS_ACTIVATION);
$opt->setInfo($this->lng->txt('prtt_availability_until_info'));
$this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
$dur = new ilDateDurationInputGUI("", "access_period");
$dur->setShowTime(true);
$date = $this->object->getActivationStartDate();
$dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setStartText($this->lng->txt('rep_activation_limited_start'));
$date = $this->object->getActivationEndDate();
$dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
$dur->setEndText($this->lng->txt('rep_activation_limited_end'));
$opt->addSubItem($dur);
$visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
$visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
$opt->addSubItem($visible);
$act_type->addOption($opt);
$a_form->addItem($act_type);
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('properties'));
$a_form->addItem($section);
parent::initEditCustomForm($a_form);
}