5 require_once(
"./Services/Search/classes/class.ilRepositorySearchGUI.php");
16 $class = $this->callback[
'class'];
17 $method = $this->callback[
'method'];
21 $class->$method(
$_POST[
'user']);
34 $ilToolbar = $DIC[
'ilToolbar'];
41 $toolbar = $ilToolbar;
45 if(!isset($a_options[
'auto_complete_name']))
47 $a_options[
'auto_complete_name'] =
$lng->txt(
'obj_user');
49 if(!isset($a_options[
'auto_complete_size']))
51 $a_options[
'auto_complete_size'] = 15;
53 if(!isset($a_options[
'submit_name']))
55 $a_options[
'submit_name'] =
$lng->txt(
'btn_add');
58 $ajax_url =
$ilCtrl->getLinkTargetByClass(
array(get_class($parent_object),
'ilStudyProgrammeRepositorySearchGUI'),
59 'doUserAutoComplete',
'',
true,
false);
61 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
62 $ul =
new ilTextInputGUI($a_options[
'auto_complete_name'],
'user_login');
63 $ul->setDataSource($ajax_url);
64 $ul->setSize($a_options[
'auto_complete_size']);
67 $toolbar->addInputItem($ul,
true);
71 $toolbar->addStickyItem($ul,
true);
74 if(count((
array) $a_options[
'user_type']))
76 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
78 $si->setOptions($a_options[
'user_type']);
81 $toolbar->addInputItem(
$si);
85 $toolbar->addStickyItem(
$si);
89 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
91 $button->setCaption($a_options[
'submit_name'],
false);
92 $button->setCommand(
'addUserFromAutoComplete');
95 $toolbar->addButtonInstance($button);
99 $toolbar->addStickyItem($button);
102 if((
bool)$a_options[
'add_search'] ||
103 is_numeric($a_options[
'add_from_container']))
105 $lng->loadLanguageModule(
"search");
107 $toolbar->addSeparator();
109 if((
bool)$a_options[
'add_search'])
111 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
113 $button->setCaption(
"search_users");
114 $button->setUrl(
$ilCtrl->getLinkTargetByClass(
'ilStudyProgrammeRepositorySearchGUI',
''));
115 $toolbar->addButtonInstance($button);
118 if(is_numeric($a_options[
'add_from_container']))
120 $parent_ref_id = (int)$a_options[
'add_from_container'];
121 $parent_container_ref_id = $tree->checkForParentType($parent_ref_id,
"grp");
122 $parent_container_type =
"grp";
123 if(!$parent_container_ref_id)
125 $parent_container_ref_id = $tree->checkForParentType($parent_ref_id,
"crs");
126 $parent_container_type =
"crs";
128 if($parent_container_ref_id)
130 if((
bool)$a_options[
'add_search'])
132 $toolbar->addSpacer();
137 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
139 $button->setCaption(
"search_add_members_from_container_".$parent_container_type);
140 $button->setUrl(
$ilCtrl->getLinkTargetByClass(
array(get_class($parent_object),
'ilStudyProgrammeRepositorySearchGUI'),
'listUsers'));
141 $toolbar->addButtonInstance($button);
146 $toolbar->setFormAction(
149 get_class($parent_object),
150 'ilStudyProgrammeRepositorySearchGUI')
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
This is just the same as in the parent class, except for the hardcoded class name.
static _lookupObjId($a_id)
This class represents a text property in a property form.
Create styles array
The data for the language used.
Custom repository search gui class for study programme to make it possible to get a handle on users s...