5 require_once(
"./Services/Search/classes/class.ilRepositorySearchGUI.php");
18 $class = $this->callback[
'class'];
19 $method = $this->callback[
'method'];
23 $class->$method(
$_POST[
'user']);
36 $ilToolbar = $DIC[
'ilToolbar'];
42 $toolbar = $ilToolbar;
46 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'])) {
50 $a_options[
'auto_complete_size'] = 15;
52 if (!isset($a_options[
'submit_name'])) {
53 $a_options[
'submit_name'] =
$lng->txt(
'btn_add');
56 $ajax_url =
$ilCtrl->getLinkTargetByClass(
57 array(get_class($parent_object),
'ilStudyProgrammeRepositorySearchGUI'),
64 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
65 $ul =
new ilTextInputGUI($a_options[
'auto_complete_name'],
'user_login');
66 $ul->setDataSource($ajax_url);
67 $ul->setSize($a_options[
'auto_complete_size']);
69 $toolbar->addInputItem($ul,
true);
71 $toolbar->addStickyItem($ul,
true);
74 if (count((array) $a_options[
'user_type'])) {
75 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
77 $si->setOptions($a_options[
'user_type']);
79 $toolbar->addInputItem(
$si);
81 $toolbar->addStickyItem(
$si);
85 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
87 $button->setCaption($a_options[
'submit_name'],
false);
88 $button->setCommand(
'addUserFromAutoComplete');
90 $toolbar->addButtonInstance($button);
92 $toolbar->addStickyItem($button);
95 if ((
bool) $a_options[
'add_search'] ||
96 is_numeric($a_options[
'add_from_container'])) {
97 $lng->loadLanguageModule(
"search");
99 $toolbar->addSeparator();
101 if ((
bool) $a_options[
'add_search']) {
102 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
104 $button->setCaption(
"search_users");
105 $button->setUrl(
$ilCtrl->getLinkTargetByClass(
'ilStudyProgrammeRepositorySearchGUI',
''));
106 $toolbar->addButtonInstance($button);
109 if (is_numeric($a_options[
'add_from_container'])) {
110 $parent_ref_id = (int) $a_options[
'add_from_container'];
111 $parent_container_ref_id =
$tree->checkForParentType($parent_ref_id,
"grp");
112 $parent_container_type =
"grp";
113 if (!$parent_container_ref_id) {
114 $parent_container_ref_id =
$tree->checkForParentType($parent_ref_id,
"crs");
115 $parent_container_type =
"crs";
117 if ($parent_container_ref_id) {
118 if ((
bool) $a_options[
'add_search']) {
119 $toolbar->addSpacer();
124 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
126 $button->setCaption(
"search_add_members_from_container_" . $parent_container_type);
127 $button->setUrl(
$ilCtrl->getLinkTargetByClass(array(get_class($parent_object),
'ilStudyProgrammeRepositorySearchGUI'),
'listUsers'));
128 $toolbar->addButtonInstance($button);
133 $toolbar->setFormAction(
136 get_class($parent_object),
137 '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.
Custom repository search gui class for study programme to make it possible to get a handle on users s...