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 "visib_reg" =>
"header_visible_registration");
70 foreach ($props as $prop => $lv)
72 $up_prop = strtoupper($prop);
75 ($prop !=
"searchable"))
77 $this->tpl->setCurrentBlock($prop);
78 $this->tpl->setVariable(
"HEADER_".$up_prop,
80 $this->tpl->setVariable(
"PROFILE_OPTION_".$up_prop, $prop.
"_".$field);
88 if ($this->confirm_change == 1)
90 $checked =
$_POST[
"chb"][$prop.
"_".$field];
95 $this->tpl->setVariable(
"CHECKED_".$up_prop,
" checked=\"checked\"");
97 $this->tpl->parseCurrentBlock();
102 $ilCtrl->setParameter($this->parent_obj,
'field_id', $a_set[
"field_id"]);
103 $this->tpl->setCurrentBlock(
"action");
104 switch($a_set[
'field_type'])
107 $this->tpl->setVariable(
"HREF_CMD",
108 $ilCtrl->getLinkTarget($this->parent_obj,
'editTextField'));
112 $this->tpl->setVariable(
"HREF_CMD",
113 $ilCtrl->getLinkTarget($this->parent_obj,
'editWysiwygField'));
117 $this->tpl->setVariable(
"HREF_CMD",
118 $ilCtrl->getLinkTarget($this->parent_obj,
'editSelectField'));
121 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"edit"));
122 $this->tpl->parseCurrentBlock();
123 $this->tpl->setCurrentBlock(
"action");
124 $this->tpl->setVariable(
"HREF_CMD",
125 $ilCtrl->getLinkTarget($this->parent_obj,
'askDeleteField'));
126 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"delete"));
127 $this->tpl->parseCurrentBlock();
130 $this->tpl->setVariable(
"TXT_FIELD", $a_set[
"field_name"]);
135 $this->confirm_change =
true;