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


PHP ilNumberInputGUI::setMaxValue方法代码示例

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


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

示例1: initAddCodesForm

 function initAddCodesForm()
 {
     global $ilCtrl, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($ilCtrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($lng->txt('user_account_codes_edit_header'));
     $count = new ilNumberInputGUI($lng->txt('user_account_codes_number'), 'acc_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $valid = new ilRadioGroupInputGUI($lng->txt('user_account_code_valid_until'), 'valid_type');
     $valid->setRequired(true);
     $unl = new ilRadioOption($lng->txt('user_account_code_valid_until_unlimited'), 'valid_unlimited');
     $valid->addOption($unl);
     $st = new ilRadioOption($lng->txt('user_account_code_valid_until_static'), 'valid_static');
     $valid->addOption($st);
     $dt = new ilDateTimeInputGUI($lng->txt('date'), 'valid_date');
     $dt->setRequired(true);
     $st->addSubItem($dt);
     $dyn = new ilRadioOption($lng->txt('user_account_code_valid_until_dynamic'), 'valid_dynamic');
     $valid->addOption($dyn);
     $ds = new ilNumberInputGUI($lng->txt('days'), 'valid_days');
     $ds->setSize(5);
     $ds->setRequired(true);
     $dyn->addSubItem($ds);
     $this->form_gui->addItem($valid);
     $this->form_gui->addCommandButton('createCodes', $lng->txt('create'));
     $this->form_gui->addCommandButton('listCodes', $lng->txt('cancel'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilAccountCodesGUI.php

示例2: addCustomSettingsToForm

 public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
 {
     global $lng, $ilSetting;
     $num_days = new ilNumberInputGUI($lng->txt('payment_notification_days'), 'payment_notification_days');
     $num_days->setSize(3);
     $num_days->setMinValue(0);
     $num_days->setMaxValue(120);
     $num_days->setRequired(true);
     $num_days->setValue($ilSetting->get('payment_notification_days'));
     $num_days->setInfo($lng->txt('payment_notification_days_desc'));
     $a_form->addItem($num_days);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilPaymentCronNotification.php

示例3: addToForm

 public function addToForm()
 {
     $def = $this->getADT()->getCopyOfDefinition();
     $number = new ilNumberInputGUI($this->getTitle(), $this->getElementId());
     $number->setSize(10);
     $min = $def->getMin();
     if ($min !== null) {
         $number->setMinValue($min);
     }
     $max = $def->getMax();
     if ($max !== null) {
         $number->setMaxValue($max);
         $length = strlen($max);
         $number->setSize($length);
         $number->setMaxLength($length);
     }
     $this->addToParentElement($number);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilADTIntegerSearchBridgeSingle.php

示例4: getEctsForm

 /**
  * @return ilPropertyFormGUI
  */
 protected function getEctsForm()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveEctsForm'));
     $form->addCommandButton('saveEctsForm', $this->lng->txt('save'));
     $form->setTitle($this->lng->txt('ects_output_of_ects_grades'));
     $allow_ects_marks = new ilCheckboxInputGUI($this->lng->txt('ects_allow_ects_grades'), 'ectcs_status');
     for ($i = ord('a'); $i <= ord('e'); $i++) {
         $mark = chr($i);
         $mark_step = new ilNumberInputGUI(chr($i - 32) . ' - ' . $this->lng->txt('ects_grade_' . $mark . '_short'), 'ects_grade_' . $mark);
         $mark_step->setSize(5);
         $mark_step->allowDecimals(true);
         $mark_step->setMinValue(0, true);
         $mark_step->setMaxValue(100, true);
         $mark_step->setSuffix($this->lng->txt('percentile'));
         $mark_step->setRequired(true);
         $allow_ects_marks->addSubItem($mark_step);
     }
     $use_ects_fx = new ilCheckboxInputGUI($this->lng->txt('use_ects_fx'), 'use_ects_fx');
     $threshold = new ilNumberInputGUI($this->lng->txt('ects_fx_threshold'), 'ects_fx_threshold');
     $threshold->setInfo($this->lng->txt('ects_fx_threshold_info'));
     $threshold->setSuffix($this->lng->txt('percentile'));
     $threshold->allowDecimals(true);
     $threshold->setSize(5);
     $threshold->setRequired(true);
     $use_ects_fx->addSubItem($threshold);
     $allow_ects_marks->addSubItem($use_ects_fx);
     $form->addItem($allow_ects_marks);
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilMarkSchemaGUI.php

示例5: populateQuestionSpecificFormPart

 public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form)
 {
     // maxsize
     $maxsize = new ilNumberInputGUI($this->lng->txt("maxsize"), "maxsize");
     $maxsize->setValue($this->object->getMaxSize());
     $maxsize->setInfo($this->lng->txt("maxsize_info"));
     $maxsize->setSize(10);
     $maxsize->setMinValue(0);
     $maxsize->setMaxValue($this->determineMaxFilesize());
     $maxsize->setRequired(FALSE);
     $form->addItem($maxsize);
     // allowedextensions
     $allowedextensions = new ilTextInputGUI($this->lng->txt("allowedextensions"), "allowedextensions");
     $allowedextensions->setInfo($this->lng->txt("allowedextensions_info"));
     $allowedextensions->setValue($this->object->getAllowedExtensions());
     $allowedextensions->setRequired(FALSE);
     $form->addItem($allowedextensions);
     // points
     $points = new ilNumberInputGUI($this->lng->txt("points"), "points");
     $points->allowDecimals(true);
     $points->setValue(is_numeric($this->object->getPoints()) && $this->object->getPoints() >= 0 ? $this->object->getPoints() : '');
     $points->setRequired(TRUE);
     $points->setSize(3);
     $points->setMinValue(0.0);
     $points->setMinvalueShouldBeGreater(false);
     $form->addItem($points);
     $subcompl = new ilCheckboxInputGUI($this->lng->txt('ass_completion_by_submission'), 'completion_by_submission');
     $subcompl->setInfo($this->lng->txt('ass_completion_by_submission_info'));
     $subcompl->setValue(1);
     $subcompl->setChecked($this->object->isCompletionBySubmissionEnabled());
     $form->addItem($subcompl);
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.assFileUploadGUI.php

示例6: initFormRoleAssignments


//.........这里部分代码省略.........
  */
 protected function initFormRoleAssignments($a_mode)
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     include_once 'Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     switch ($a_mode) {
         case 'edit':
             $this->form->setTitle($this->lng->txt('ldap_edit_role_ass_rule'));
             $this->form->addCommandButton('updateRoleAssignment', $this->lng->txt('save'));
             $this->form->addCommandButton('roleAssignments', $this->lng->txt('cancel'));
             break;
         case 'create':
             $this->form->setTitle($this->lng->txt('ldap_add_role_ass_rule'));
             $this->form->addCommandButton('addRoleAssignment', $this->lng->txt('ldap_btn_add_role_ass'));
             $this->form->addCommandButton('roleAssignments', $this->lng->txt('cancel'));
             break;
     }
     // Role Selection
     $role = new ilRadioGroupInputGUI($this->lng->txt('ldap_ilias_role'), 'role_name');
     $role->setRequired(true);
     $global = new ilRadioOption($this->lng->txt('ldap_global_role'), 0);
     $role->addOption($global);
     $role_select = new ilSelectInputGUI('', 'role_id');
     $role_select->setOptions($this->prepareGlobalRoleSelection());
     $global->addSubItem($role_select);
     $local = new ilRadioOption($this->lng->txt('ldap_local_role'), 1);
     $role->addOption($local);
     include_once './Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php';
     $role_search = new ilRoleAutoCompleteInputGUI('', 'role_search', $this, 'addRoleAutoCompleteObject');
     $role_search->setSize(40);
     $local->addSubItem($role_search);
     $role->setInfo($this->lng->txt('ldap_role_name_info'));
     $this->form->addItem($role);
     // Update options
     $update = new ilNonEditableValueGUI($this->lng->txt('ldap_update_roles'), 'update_roles');
     $update->setValue($this->lng->txt('ldap_check_role_assignment'));
     $add = new ilCheckboxInputGUI('', 'add_missing');
     $add->setOptionTitle($this->lng->txt('ldap_add_missing'));
     $update->addSubItem($add);
     $remove = new ilCheckboxInputGUI('', 'remove_deprecated');
     $remove->setOptionTitle($this->lng->txt('ldap_remove_deprecated'));
     $update->addSubItem($remove);
     $this->form->addItem($update);
     // Assignment Type
     $group = new ilRadioGroupInputGUI($this->lng->txt('ldap_assignment_type'), 'type');
     #$group->setValue($current_rule->getType());
     $group->setRequired(true);
     // Option by group
     $radio_group = new ilRadioOption($this->lng->txt('ldap_role_by_group'), ilLDAPRoleAssignmentRule::TYPE_GROUP);
     $dn = new ilTextInputGUI($this->lng->txt('ldap_group_dn'), 'dn');
     #$dn->setValue($current_rule->getDN());
     $dn->setSize(32);
     $dn->setMaxLength(512);
     $dn->setInfo($this->lng->txt('ldap_role_grp_dn_info'));
     $radio_group->addSubItem($dn);
     $at = new ilTextInputGUI($this->lng->txt('ldap_role_grp_at'), 'at');
     #$at->setValue($current_rule->getMemberAttribute());
     $at->setSize(16);
     $at->setMaxLength(128);
     $radio_group->addSubItem($at);
     $isdn = new ilCheckboxInputGUI($this->lng->txt('ldap_role_grp_isdn'), 'isdn');
     #$isdn->setChecked($current_rule->isMemberAttributeDN());
     $isdn->setInfo($this->lng->txt('ldap_group_member_info'));
     $radio_group->addSubItem($isdn);
     $radio_group->setInfo($this->lng->txt('ldap_role_grp_info'));
     $group->addOption($radio_group);
     // Option by Attribute
     $radio_attribute = new ilRadioOption($this->lng->txt('ldap_role_by_attribute'), ilLDAPRoleAssignmentRule::TYPE_ATTRIBUTE);
     $name = new ilTextInputGUI($this->lng->txt('ldap_role_at_name'), 'name');
     #$name->setValue($current_rule->getAttributeName());
     $name->setSize(32);
     $name->setMaxLength(128);
     #$name->setInfo($this->lng->txt('ldap_role_at_name_info'));
     $radio_attribute->addSubItem($name);
     // Radio Attribute
     $val = new ilTextInputGUI($this->lng->txt('ldap_role_at_value'), 'value');
     #$val->setValue($current_rule->getAttributeValue());
     $val->setSize(32);
     $val->setMaxLength(128);
     #$val->setInfo($this->lng->txt('ldap_role_at_value_info'));
     $radio_attribute->addSubItem($val);
     $radio_attribute->setInfo($this->lng->txt('ldap_role_at_info'));
     $group->addOption($radio_attribute);
     // Option by Plugin
     $pl_active = (bool) $this->hasActiveRoleAssignmentPlugins();
     $pl = new ilRadioOption($this->lng->txt('ldap_plugin'), 3);
     $pl->setInfo($this->lng->txt('ldap_plugin_info'));
     $pl->setDisabled(!$pl_active);
     $id = new ilNumberInputGUI($this->lng->txt('ldap_plugin_id'), 'plugin_id');
     $id->setDisabled(!$pl_active);
     $id->setSize(3);
     $id->setMaxLength(3);
     $id->setMaxValue(999);
     $id->setMinValue(1);
     $pl->addSubItem($id);
     $group->addOption($pl);
     $this->form->addItem($group);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilLDAPSettingsGUI.php

示例7: initFormLuceneSettings

 /**
  * Show lucene settings form 
  * @param
  * @return
  */
 protected function initFormLuceneSettings()
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     include_once './Services/Search/classes/class.ilSearchSettings.php';
     $this->settings = ilSearchSettings::getInstance();
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this, 'cancel'));
     $this->form->setTitle($this->lng->txt('lucene_settings_title'));
     $this->form->addCommandButton('saveLuceneSettings', $this->lng->txt('save'));
     $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
     // Offline filter
     /*
     		$offline = new ilCheckboxInputGUI($this->lng->txt('lucene_offline_filter_setting'),'offline_filter');
     		$offline->setInfo($this->lng->txt('lucene_offline_filter_setting_info'));
     		$offline->setValue(1);
     		$offline->setChecked($this->settings->isLuceneOfflineFilterEnabled());
     		$this->form->addItem($offline);
     */
     // user search
     $us = new ilCheckboxInputGUI($this->lng->txt('search_user_search_form'), 'user_search_enabled');
     $us->setInfo($this->lng->txt('search_user_search_info_form'));
     $us->setValue(1);
     $us->setChecked($this->settings->isLuceneUserSearchEnabled());
     $this->form->addItem($us);
     // Item filter
     $if = new ilCheckboxInputGUI($this->lng->txt('search_mime_filter_form'), 'mime_enabled');
     $if->setValue(1);
     $if->setChecked($this->settings->isLuceneMimeFilterEnabled());
     $if->setInfo($this->lng->txt('search_item_filter_form_info'));
     $this->form->addItem($if);
     $mimes = $this->settings->getLuceneMimeFilter();
     foreach (ilSearchSettings::getLuceneMimeFilterDefinitions() as $mime => $def) {
         $ch = new ilCheckboxInputGUI($this->lng->txt($def['trans']), 'mime[' . $mime . ']');
         if (isset($mimes[$mime]) and $mimes[$mime]) {
             $ch->setChecked(true);
         }
         $ch->setValue(1);
         $if->addSubItem($ch);
     }
     $prefix = new ilCheckboxInputGUI($this->lng->txt('lucene_prefix_wildcard'), 'prefix');
     $prefix->setValue(1);
     $prefix->setInfo($this->lng->txt('lucene_prefix_wildcard_info'));
     $prefix->setChecked($this->settings->isPrefixWildcardQueryEnabled());
     $this->form->addItem($prefix);
     $numFrag = new ilNumberInputGUI($this->lng->txt('lucene_num_fragments'), 'fragmentCount');
     $numFrag->setRequired(true);
     $numFrag->setSize(2);
     $numFrag->setMaxLength(2);
     $numFrag->setMinValue(1);
     $numFrag->setMaxValue(10);
     $numFrag->setInfo($this->lng->txt('lucene_num_frag_info'));
     $numFrag->setValue($this->settings->getFragmentCount());
     $this->form->addItem($numFrag);
     $sizeFrag = new ilNumberInputGUI($this->lng->txt('lucene_size_fragments'), 'fragmentSize');
     $sizeFrag->setRequired(true);
     $sizeFrag->setSize(2);
     $sizeFrag->setMaxLength(4);
     $sizeFrag->setMinValue(10);
     $sizeFrag->setMaxValue(1000);
     $sizeFrag->setInfo($this->lng->txt('lucene_size_frag_info'));
     $sizeFrag->setValue($this->settings->getFragmentSize());
     $this->form->addItem($sizeFrag);
     $maxSub = new ilNumberInputGUI($this->lng->txt('lucene_max_sub'), 'maxSubitems');
     $maxSub->setRequired(true);
     $maxSub->setSize(2);
     $maxSub->setMaxLength(2);
     $maxSub->setMinValue(1);
     $maxSub->setMaxValue(10);
     $maxSub->setInfo($this->lng->txt('lucene_max_sub_info'));
     $maxSub->setValue($this->settings->getMaxSubitems());
     $this->form->addItem($maxSub);
     $relevance = new ilCheckboxInputGUI($this->lng->txt('lucene_relevance'), 'relevance');
     $relevance->setOptionTitle($this->lng->txt('lucene_show_relevance'));
     $relevance->setInfo($this->lng->txt('lucene_show_relevance_info'));
     $relevance->setValue(1);
     $relevance->setChecked($this->settings->isRelevanceVisible());
     $this->form->addItem($relevance);
     // begin-patch mime_filter
     $subrel = new ilCheckboxInputGUI('', 'subrelevance');
     $subrel->setOptionTitle($this->lng->txt('lucene_show_sub_relevance'));
     $subrel->setValue(1);
     $subrel->setChecked($this->settings->isSubRelevanceVisible());
     $relevance->addSubItem($subrel);
     // end-patch mime_filter
     $last_index = new ilDateTimeInputGUI($this->lng->txt('lucene_last_index_time'), 'last_index');
     $last_index->setShowTime(true);
     $last_index->setDate($this->settings->getLastIndexTime());
     $last_index->setInfo($this->lng->txt('lucene_last_index_time_info'));
     $this->form->addItem($last_index);
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:96,代码来源:class.ilObjSearchSettingsGUI.php

示例8: editQuestion

 /**
  * Creates an output of the edit form for the question
  *
  * @access public
  */
 public function editQuestion($checkonly = FALSE)
 {
     $save = $this->isSaveCommand();
     $this->getQuestionTemplate();
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->outQuestionType());
     $form->setMultipart(false);
     $form->setTableWidth("100%");
     $form->setId("assfileupload");
     $this->addBasicQuestionFormProperties($form);
     // maxsize
     $maxsize = new ilNumberInputGUI($this->lng->txt("maxsize"), "maxsize");
     $maxsize->setValue($this->object->getMaxSize());
     $maxsize->setInfo($this->lng->txt("maxsize_info"));
     $maxsize->setSize(10);
     $maxsize->setMinValue(0);
     //mbecker: Quick fix for mantis bug 8595: Change size file
     $umf = get_cfg_var("upload_max_filesize");
     // get the value for the maximal post data from the php.ini (if available)
     $pms = get_cfg_var("post_max_size");
     //convert from short-string representation to "real" bytes
     $multiplier_a = array("K" => 1024, "M" => 1024 * 1024, "G" => 1024 * 1024 * 1024);
     $umf_parts = preg_split("/(\\d+)([K|G|M])/", $umf, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
     $pms_parts = preg_split("/(\\d+)([K|G|M])/", $pms, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
     if (count($umf_parts) == 2) {
         $umf = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
     }
     if (count($pms_parts) == 2) {
         $pms = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
     }
     // use the smaller one as limit
     $max_filesize = min($umf, $pms);
     if (!$max_filesize) {
         $max_filesize = max($umf, $pms);
     }
     $maxsize->setMaxValue($max_filesize);
     // end quick fix
     $maxsize->setRequired(FALSE);
     $form->addItem($maxsize);
     // allowedextensions
     $allowedextensions = new ilTextInputGUI($this->lng->txt("allowedextensions"), "allowedextensions");
     $allowedextensions->setInfo($this->lng->txt("allowedextensions_info"));
     $allowedextensions->setValue($this->object->getAllowedExtensions());
     $allowedextensions->setRequired(FALSE);
     $form->addItem($allowedextensions);
     // points
     $points = new ilNumberInputGUI($this->lng->txt("points"), "points");
     $points->setValue(is_numeric($this->object->getPoints()) && $this->object->getPoints() >= 0 ? $this->object->getPoints() : '');
     $points->setRequired(TRUE);
     $points->setSize(3);
     $points->setMinValue(0.0);
     $points->setMinvalueShouldBeGreater(false);
     $form->addItem($points);
     $subcompl = new ilCheckboxInputGUI($this->lng->txt('ass_completion_by_submission'), 'completion_by_submission');
     $subcompl->setInfo($this->lng->txt('ass_completion_by_submission_info'));
     $subcompl->setValue(1);
     $subcompl->setChecked($this->object->isCompletionBySubmissionEnabled());
     $form->addItem($subcompl);
     $this->addQuestionFormCommandButtons($form);
     $errors = false;
     if ($save) {
         $form->setValuesByPost();
         $errors = !$form->checkInput();
         $form->setValuesByPost();
         // again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
         if ($errors) {
             $checkonly = false;
         }
     }
     if (!$checkonly) {
         $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
     }
     return $errors;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:81,代码来源:class.assFileUploadGUI.php

示例9: initFormRoleAssignment

 protected function initFormRoleAssignment($a_mode = 'default')
 {
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this, 'cancel'));
     $this->form->setTitle($this->lng->txt('shib_role_ass_table'));
     if ($a_mode == 'default') {
         $this->form->setTitle($this->lng->txt('shib_role_ass_table'));
         $this->form->addCommandButton('addRoleAssignmentRule', $this->lng->txt('shib_new_rule'));
         $this->form->addCommandButton('settings', $this->lng->txt('cancel'));
     } else {
         $this->form->setTitle($this->lng->txt('shib_update_role_ass_table'));
         $this->form->addCommandButton('updateRoleAssignmentRule', $this->lng->txt('save'));
         $this->form->addCommandButton('roleAssignment', $this->lng->txt('cancel'));
     }
     // Role selection
     $role = new ilRadioGroupInputGUI($this->lng->txt('shib_role_name'), 'role_name');
     $role->setRequired(true);
     $global = new ilRadioOption($this->lng->txt('shib_global_role'), 0);
     $role->addOption($global);
     $role_select = new ilSelectInputGUI('', 'role_id');
     $role_select->setOptions($this->prepareRoleSelect());
     $global->addSubItem($role_select);
     $local = new ilRadioOption($this->lng->txt('shib_local_role'), 1);
     $role->addOption($local);
     include_once './Services/Form/classes/class.ilRoleAutoCompleteInputGUI.php';
     $role_search = new ilRoleAutoCompleteInputGUI('', 'role_search', $this, 'addRoleAutoCompleteObject');
     $role_search->setSize(40);
     $local->addSubItem($role_search);
     include_once './Services/AccessControl/classes/class.ilRoleAutoComplete.php';
     $role->setInfo($this->lng->txt('shib_role_name_info'));
     $this->form->addItem($role);
     // Update options
     $update = new ilNonEditableValueGUI($this->lng->txt('shib_update_roles'), 'update_roles');
     $update->setValue($this->lng->txt('shib_check_role_assignment'));
     $add = new ilCheckboxInputGUI('', 'add_missing');
     $add->setOptionTitle($this->lng->txt('shib_add_missing'));
     $add->setValue(1);
     $update->addSubItem($add);
     $remove = new ilCheckboxInputGUI('', 'remove_deprecated');
     $remove->setOptionTitle($this->lng->txt('shib_remove_deprecated'));
     $remove->setValue(1);
     $update->addSubItem($remove);
     $this->form->addItem($update);
     // Assignment type
     $kind = new ilRadioGroupInputGUI($this->lng->txt('shib_assignment_type'), 'kind');
     $kind->setValue(1);
     $kind->setRequired(true);
     $attr = new ilRadioOption($this->lng->txt('shib_attribute'), 1);
     $attr->setInfo($this->lng->txt('shib_attr_info'));
     $name = new ilTextInputGUI($this->lng->txt('shib_attribute_name'), 'attr_name');
     $name->setSize(32);
     $attr->addSubItem($name);
     $value = new ilTextInputGUI($this->lng->txt('shib_attribute_value'), 'attr_value');
     $value->setSize(32);
     $attr->addSubItem($value);
     $kind->addOption($attr);
     $pl_active = (bool) $this->hasActiveRoleAssignmentPlugins();
     $pl = new ilRadioOption($this->lng->txt('shib_plugin'), 2);
     $pl->setInfo($this->lng->txt('shib_plugin_info'));
     $pl->setDisabled(!$pl_active);
     $id = new ilNumberInputGUI($this->lng->txt('shib_plugin_id'), 'plugin_id');
     $id->setDisabled(!$pl_active);
     $id->setSize(3);
     $id->setMaxLength(3);
     $id->setMaxValue(999);
     $id->setMinValue(1);
     $pl->addSubItem($id);
     $kind->addOption($pl);
     $this->form->addItem($kind);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:71,代码来源:class.ilAuthShibbolethSettingsGUI.php

示例10: initBookingNumbersForm

 protected function initBookingNumbersForm(array $a_objects_counter, $a_group_id)
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "confirmedBooking"));
     $form->setTitle($this->lng->txt("book_confirm_booking_schedule_number_of_objects"));
     $form->setDescription($this->lng->txt("book_confirm_booking_schedule_number_of_objects_info"));
     include_once 'Modules/BookingManager/classes/class.ilBookingObject.php';
     $section = false;
     foreach ($a_objects_counter as $id => $counter) {
         $id = explode("_", $id);
         $book_id = $id[0] . "_" . $id[1] . "_" . $id[2] . "_" . $counter;
         $obj = new ilBookingObject($id[0]);
         if (!$section) {
             $section = new ilFormSectionHeaderGUI();
             $section->setTitle($obj->getTitle());
             $form->addItem($section);
             $section = true;
         }
         $period = ilDatePresentation::formatPeriod(new ilDateTime($id[1], IL_CAL_UNIX), new ilDateTime($id[2], IL_CAL_UNIX));
         $nr_field = new ilNumberInputGUI($period, "conf_nr__" . $book_id);
         $nr_field->setValue(1);
         $nr_field->setSize(3);
         $nr_field->setMaxValue($counter);
         $nr_field->setMinValue(1);
         $nr_field->setRequired(true);
         $form->addItem($nr_field);
     }
     if ($a_group_id) {
         $grp = new ilHiddenInputGUI("grp_id");
         $grp->setValue($a_group_id);
         $form->addItem($grp);
     }
     $form->addCommandButton("confirmedBookingNumbers", $this->lng->txt("confirm"));
     $form->addCommandButton("render", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:37,代码来源:class.ilObjBookingPoolGUI.php

示例11: initSettingsForm

 /**
  * Init settings form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initSettingsForm($a_mode = "edit")
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // online
     $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
     $cb->setValue("y");
     $this->form->addItem($cb);
     // glossary mode
     $options = array("none" => $this->lng->txt("glo_mode_normal"), "level" => $this->lng->txt("glo_mode_level"), "subtree" => $this->lng->txt("glo_mode_subtree"));
     $si = new ilSelectInputGUI($lng->txt("glo_mode"), "glo_mode");
     $si->setOptions($options);
     $si->setInfo($lng->txt("glo_mode_desc"));
     $this->form->addItem($si);
     // presentation mode
     $radg = new ilRadioGroupInputGUI($lng->txt("glo_presentation_mode"), "pres_mode");
     $radg->setValue("table");
     $op1 = new ilRadioOption($lng->txt("glo_table_form"), "table", $lng->txt("glo_table_form_info"));
     // short text length
     $ni = new ilNumberInputGUI($lng->txt("glo_text_snippet_length"), "snippet_length");
     $ni->setMaxValue(3000);
     $ni->setMinValue(100);
     $ni->setMaxLength(4);
     $ni->setSize(4);
     $ni->setInfo($lng->txt("glo_text_snippet_length_info"));
     $ni->setValue(200);
     $op1->addSubItem($ni);
     $radg->addOption($op1);
     $op2 = new ilRadioOption($lng->txt("glo_full_definitions"), "full_def", $lng->txt("glo_full_definitions_info"));
     $radg->addOption($op2);
     $this->form->addItem($radg);
     // show taxonomy
     include_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
     $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
     if (count($tax_ids) > 0) {
         $cb = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
         $this->form->addItem($cb);
     }
     // downloads
     $cb = new ilCheckboxInputGUI($lng->txt("cont_downloads"), "glo_act_downloads");
     $cb->setValue("y");
     $cb->setInfo($lng->txt("cont_downloads_desc"));
     $this->form->addItem($cb);
     // save and cancel commands
     $this->form->addCommandButton("saveProperties", $lng->txt("save"));
     $this->form->setTitle($lng->txt("cont_glo_properties"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:54,代码来源:class.ilObjGlossaryGUI.php

示例12: initAddCodesForm

 function initAddCodesForm()
 {
     global $rbacreview, $ilObjDataCache, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($this->lng->txt('registration_codes_edit_header'));
     $count = new ilNumberInputGUI($this->lng->txt('registration_codes_number'), 'reg_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('registration_codes_roles_title'));
     $this->form_gui->addItem($sec);
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $options = array("" => $this->lng->txt('registration_codes_no_assigned_role'));
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if (!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID))) {
             $options[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $roles = new ilSelectInputGUI($this->lng->txt("registration_codes_roles"), "reg_codes_role");
     $roles->setInfo($this->lng->txt("registration_codes_override_info"));
     $roles->setOptions($options);
     $this->form_gui->addItem($roles);
     $local = new ilTextInputGUI($this->lng->txt("registration_codes_roles_local"), "reg_codes_local");
     $local->setMulti(true);
     $local->setDataSource($this->ctrl->getLinkTarget($this, "getLocalRoleAutoComplete", "", true));
     $this->form_gui->addItem($local);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('reg_access_limitations'));
     $this->form_gui->addItem($sec);
     $limit = new ilRadioGroupInputGUI($this->lng->txt("reg_access_limitation_mode"), "reg_limit");
     $limit->setInfo($this->lng->txt("registration_codes_override_info"));
     $this->form_gui->addItem($limit);
     $opt = new ilRadioOption($this->lng->txt("registration_codes_roles_limitation_none"), "none");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_none"), "unlimited");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_absolute"), "absolute");
     $limit->addOption($opt);
     $dt = new ilDateTimeInputGUI($this->lng->txt("reg_access_limitation_mode_absolute_target"), "abs_date");
     $dt->setRequired(true);
     $opt->addSubItem($dt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_relative"), "relative");
     $limit->addOption($opt);
     $days = new ilTextInputGUI("", "rel_date[d]");
     $days->setSize(5);
     $days->setSuffix($this->lng->txt("days"));
     $mon = new ilTextInputGUI("", "rel_date[m]");
     $mon->setSize(5);
     $mon->setSuffix($this->lng->txt("months"));
     $yr = new ilTextInputGUI("", "rel_date[y]");
     $yr->setSize(5);
     $yr->setSuffix($this->lng->txt("years"));
     // custom input won't reload
     if (is_array($_POST["rel_date"])) {
         $days->setValue($_POST["rel_date"]["d"]);
         $mon->setValue($_POST["rel_date"]["m"]);
         $yr->setValue($_POST["rel_date"]["y"]);
     }
     $dur = new ilCustomInputGUI($this->lng->txt("reg_access_limitation_mode_relative_target"));
     $dur->setRequired(true);
     $dur->setHTML($days->getToolbarHTML() . " " . $mon->getToolbarHTML() . " " . $yr->getToolbarHTML());
     $opt->addSubItem($dur);
     $this->form_gui->addCommandButton('createCodes', $this->lng->txt('create'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:70,代码来源:class.ilRegistrationSettingsGUI.php

示例13: showObligatoryForm

 /**
  * Show obligatory form
  * @return ilPropertyFormGUI
  */
 protected function showObligatoryForm($opt = array())
 {
     if (!$opt) {
         $opt = ilConditionHandler::getOptionalConditionsOfTarget($this->getTargetRefId(), $this->getTargetId(), $this->getTargetType());
     }
     $all = ilConditionHandler::_getConditionsOfTarget($this->getTargetRefId(), $this->getTargetId());
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this), 'listConditions');
     $form->setTitle($this->lng->txt('precondition_obligatory_settings'));
     $form->addCommandButton('saveObligatorySettings', $this->lng->txt('save'));
     $hide = new ilCheckboxInputGUI($this->lng->txt('rbac_precondition_hide'), 'hidden');
     $hide->setChecked(ilConditionHandler::lookupHiddenStatusByTarget($this->getTargetRefId()));
     $hide->setValue(1);
     $hide->setInfo($this->lng->txt('rbac_precondition_hide_info'));
     $form->addItem($hide);
     $mode = new ilRadioGroupInputGUI($this->lng->txt("rbac_precondition_mode"), "list_mode");
     $form->addItem($mode);
     $mode->setValue($_REQUEST["list_mode"]);
     $mall = new ilRadioOption($this->lng->txt("rbac_precondition_mode_all"), "all");
     $mall->setInfo($this->lng->txt("rbac_precondition_mode_all_info"));
     $mode->addOption($mall);
     $msubset = new ilRadioOption($this->lng->txt("rbac_precondition_mode_subset"), "subset");
     $msubset->setInfo($this->lng->txt("rbac_precondition_mode_subset_info"));
     $mode->addOption($msubset);
     $obl = new ilNumberInputGUI($this->lng->txt('precondition_num_obligatory'), 'required');
     $obl->setInfo($this->lng->txt('precondition_num_optional_info'));
     if (count($opt)) {
         $obligatory = ilConditionHandler::calculateRequiredTriggers($this->getTargetRefId(), $this->getTargetId(), $this->getTargetType());
         $min = count($all) - count($opt) + 1;
         $max = count($all) - 1;
     } else {
         $obligatory = $min = $max = 1;
     }
     $obl->setValue($obligatory);
     $obl->setRequired(true);
     $obl->setSize(1);
     $obl->setMinValue($min);
     $obl->setMaxValue($max);
     $msubset->addSubItem($obl);
     $old_mode = new ilHiddenInputGUI("old_list_mode");
     $old_mode->setValue($_REQUEST["list_mode"]);
     $form->addItem($old_mode);
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:49,代码来源:class.ilConditionHandlerGUI.php

示例14: initBookingNumbersForm

 protected function initBookingNumbersForm(array $a_objects_counter, $a_group_id, $a_reload = false)
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "confirmedBooking"));
     $form->setTitle($this->lng->txt("book_confirm_booking_schedule_number_of_objects"));
     $form->setDescription($this->lng->txt("book_confirm_booking_schedule_number_of_objects_info"));
     include_once 'Modules/BookingManager/classes/class.ilBookingObject.php';
     $section = false;
     $min_date = null;
     foreach ($a_objects_counter as $id => $counter) {
         $id = explode("_", $id);
         $book_id = $id[0] . "_" . $id[1] . "_" . $id[2] . "_" . $counter;
         $obj = new ilBookingObject($id[0]);
         if (!$section) {
             $section = new ilFormSectionHeaderGUI();
             $section->setTitle($obj->getTitle());
             $form->addItem($section);
             $section = true;
         }
         $period = ilDatePresentation::formatPeriod(new ilDateTime($id[1], IL_CAL_UNIX), new ilDateTime($id[2], IL_CAL_UNIX));
         $nr_field = new ilNumberInputGUI($period, "conf_nr__" . $book_id);
         $nr_field->setValue(1);
         $nr_field->setSize(3);
         $nr_field->setMaxValue($counter);
         $nr_field->setMinValue($counter ? 1 : 0);
         $nr_field->setRequired(true);
         $form->addItem($nr_field);
         if (!$min_date || $id[1] < $min_date) {
             $min_date = $id[1];
         }
     }
     // recurrence
     $this->lng->loadLanguageModule("dateplaner");
     $rec_mode = new ilSelectInputGUI($this->lng->txt("cal_recurrences"), "recm");
     $rec_mode->setRequired(true);
     $rec_mode->setOptions(array("-1" => $this->lng->txt("cal_no_recurrence"), 1 => $this->lng->txt("cal_weekly"), 2 => $this->lng->txt("r_14"), 4 => $this->lng->txt("r_4_weeks")));
     $form->addItem($rec_mode);
     $rec_end = new ilDateTimeInputGUI($this->lng->txt("cal_repeat_until"), "rece");
     $rec_mode->addSubItem($rec_end);
     if (!$a_reload) {
         // show date only if active recurrence
         $rec_mode->setHideSubForm(true, '>= 1');
         if ($min_date) {
             $rec_end->setDate(new ilDateTime($min_date, IL_CAL_UNIX));
         }
     } else {
         // recurrence may not be changed on reload
         $rec_mode->setDisabled(true);
         $rec_end->setDisabled(true);
     }
     if ($a_group_id) {
         $grp = new ilHiddenInputGUI("grp_id");
         $grp->setValue($a_group_id);
         $form->addItem($grp);
     }
     $form->addCommandButton("confirmedBookingNumbers", $this->lng->txt("confirm"));
     $form->addCommandButton("render", $this->lng->txt("cancel"));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:60,代码来源:class.ilObjBookingPoolGUI.php

示例15: initFormSettings

 /**
  * Init cas settings
  */
 protected function initFormSettings()
 {
     $this->lng->loadLanguageModule('auth');
     $this->lng->loadLanguageModule('radius');
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt('auth_cas_auth'));
     $form->setDescription($this->lng->txt("auth_cas_auth_desc"));
     // Form checkbox
     $check = new ilCheckboxInputGUI($this->lng->txt("active"), 'active');
     $check->setChecked($this->getSettings()->isActive() ? true : false);
     $check->setValue(1);
     $form->addItem($check);
     $text = new ilTextInputGUI($this->lng->txt('server'), 'server');
     $text->setValue($this->getSettings()->getServer());
     $text->setRequired(true);
     $text->setInfo($this->lng->txt('auth_cas_server_desc'));
     $text->setSize(64);
     $text->setMaxLength(255);
     $form->addItem($text);
     $port = new ilNumberInputGUI($this->lng->txt("port"), 'port');
     $port->setValue($this->getSettings()->getPort());
     $port->setRequired(true);
     $port->setMinValue(0);
     $port->setMaxValue(65535);
     $port->setSize(5);
     $port->setMaxLength(5);
     $port->setInfo($this->lng->txt('auth_cas_port_desc'));
     $form->addItem($port);
     $text = new ilTextInputGUI($this->lng->txt('uri'), 'uri');
     $text->setValue($this->getSettings()->getUri());
     $text->setRequired(true);
     $text->setInfo($this->lng->txt('auth_cas_uri_desc'));
     $text->setSize(64);
     $text->setMaxLength(255);
     $form->addItem($text);
     // User synchronization
     // 0: Disabled
     // 1: CAS
     // 2: LDAP
     $sync = new ilRadioGroupInputGUI($this->lng->txt('auth_sync'), 'sync');
     $sync->setRequired(true);
     #$sync->setInfo($this->lng->txt('auth_radius_sync_info'));
     $form->addItem($sync);
     // Disabled
     $dis = new ilRadioOption($this->lng->txt('disabled'), self::SYNC_DISABLED, '');
     #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info'));
     $sync->addOption($dis);
     // CAS
     $rad = new ilRadioOption($this->lng->txt('auth_sync_cas'), self::SYNC_CAS, '');
     $rad->setInfo($this->lng->txt('auth_sync_cas_info'));
     $sync->addOption($rad);
     $select = new ilSelectInputGUI($this->lng->txt('auth_user_default_role'), 'role');
     $select->setOptions($this->prepareRoleSelection());
     $select->setValue($this->getSettings()->getDefaultRole());
     $rad->addSubItem($select);
     // LDAP
     include_once './Services/LDAP/classes/class.ilLDAPServer.php';
     $server_ids = ilLDAPServer::getAvailableDataSources(AUTH_CAS);
     if (count($server_ids)) {
         $ldap = new ilRadioOption($this->lng->txt('auth_radius_ldap'), self::SYNC_LDAP, '');
         $ldap->setInfo($this->lng->txt('auth_radius_ldap_info'));
         $sync->addOption($ldap);
         // TODO Handle more than one LDAP configuration
     }
     if (ilLDAPServer::isDataSourceActive(AUTH_CAS)) {
         $sync->setValue(self::SYNC_LDAP);
     } else {
         $sync->setValue($this->getSettings()->isUserCreationEnabled() ? ilCASSettings::SYNC_CAS : ilCASSettings::SYNC_DISABLED);
     }
     $instruction = new ilTextAreaInputGUI($this->lng->txt('auth_login_instructions'), 'instruction');
     $instruction->setCols(80);
     $instruction->setRows(6);
     $instruction->setValue($this->getSettings()->getLoginInstruction());
     $form->addItem($instruction);
     $create = new ilCheckboxInputGUI($this->lng->txt('auth_allow_local'), 'local');
     $create->setInfo($this->lng->txt('auth_cas_allow_local_desc'));
     $create->setChecked($this->getSettings()->isLocalAuthenticationEnabled() ? true : false);
     $create->setValue(1);
     $form->addItem($create);
     $form->addCommandButton('save', $this->lng->txt('save'));
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:87,代码来源:class.ilCASSettingsGUI.php


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