4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
26 $this->
setTitle($lng->txt(
"user_defined_list"));
30 $this->
addColumn($this->lng->txt(
"user_field"),
"");
31 $this->
addColumn($this->lng->txt(
"access"),
"");
32 $this->
addColumn($this->lng->txt(
"export").
" / ".$this->lng->txt(
"search"),
"");
33 $this->
addColumn($this->lng->txt(
"actions"),
"");
37 $this->
setRowTemplate(
"tpl.std_fields_settings_row.html",
"Services/User");
42 $fds = $user_field_definitions->getDefinitions();
44 foreach ($fds as $k => $f)
50 $this->
addCommandButton(
"chooseFieldType", $lng->txt(
"add_user_defined_field"));
60 $field = $a_set[
"field_id"];
62 $props = array(
"visible" =>
"user_visible_in_profile",
63 "changeable" =>
"changeable",
64 "searchable" =>
"header_searchable",
65 "required" =>
"required_field",
67 "course_export" =>
"course_export",
68 'group_export' =>
'group_export',
69 "visib_reg" =>
"header_visible_registration",
70 'visib_lua' =>
'usr_settings_visib_lua',
71 'changeable_lua' =>
'usr_settings_changeable_lua'
74 foreach ($props as $prop => $lv)
76 $up_prop = strtoupper($prop);
79 ($prop !=
"searchable"))
81 $this->tpl->setCurrentBlock($prop);
82 $this->tpl->setVariable(
"HEADER_".$up_prop,
84 $this->tpl->setVariable(
"PROFILE_OPTION_".$up_prop, $prop.
"_".$field);
92 if ($this->confirm_change == 1)
94 $checked =
$_POST[
"chb"][$prop.
"_".$field];
99 $this->tpl->setVariable(
"CHECKED_".$up_prop,
" checked=\"checked\"");
101 $this->tpl->parseCurrentBlock();
106 $ilCtrl->setParameter($this->parent_obj,
'field_id', $a_set[
"field_id"]);
107 $this->tpl->setCurrentBlock(
"action");
108 switch($a_set[
'field_type'])
111 $this->tpl->setVariable(
"HREF_CMD",
112 $ilCtrl->getLinkTarget($this->parent_obj,
'editTextField'));
116 $this->tpl->setVariable(
"HREF_CMD",
117 $ilCtrl->getLinkTarget($this->parent_obj,
'editWysiwygField'));
121 $this->tpl->setVariable(
"HREF_CMD",
122 $ilCtrl->getLinkTarget($this->parent_obj,
'editSelectField'));
125 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"edit"));
126 $this->tpl->parseCurrentBlock();
127 $this->tpl->setCurrentBlock(
"action");
128 $this->tpl->setVariable(
"HREF_CMD",
129 $ilCtrl->getLinkTarget($this->parent_obj,
'askDeleteField'));
130 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"delete"));
131 $this->tpl->parseCurrentBlock();
134 $this->tpl->setVariable(
"TXT_FIELD", $a_set[
"field_name"]);
139 $this->confirm_change =
true;