29 $this->form_action = $a_val;
30 $this->multipart = $a_multipart;
40 return $this->form_action;
48 $this->lead_img = array(
"img" => $a_img,
"alt" => $a_alt);
59 function addButton($a_txt, $a_cmd, $a_target =
"", $a_acc_key =
"")
61 $this->items[] = array(
"type" =>
"button",
"txt" => $a_txt,
"cmd" => $a_cmd,
62 "target" => $a_target,
"acc_key" => $a_acc_key);
74 $this->items[] = array(
"type" =>
"fbutton",
"txt" => $a_txt,
"cmd" => $a_cmd,
75 "acc_key" => $a_acc_key);
83 $this->items[] = array(
"type" =>
"input",
"input" => $a_item,
"label" => $a_output_label);
91 $this->items[] = array(
"type" =>
"separator");
99 $this->items[] = array(
"type" =>
"spacer");
109 $tpl =
new ilTemplate(
"tpl.toolbar.html",
true,
true,
"Services/UIComponent/Toolbar");
110 if (count($this->items) > 0)
112 foreach($this->items as $item)
114 switch ($item[
"type"])
117 $tpl->setCurrentBlock(
"button");
118 $tpl->setVariable(
"BTN_TXT", $item[
"txt"]);
119 $tpl->setVariable(
"BTN_LINK", $item[
"cmd"]);
120 if ($item[
"target"] !=
"")
122 $tpl->setVariable(
"BTN_TARGET",
'target="'.$item[
"target"].
'"');
124 if ($item[
"acc_key"] !=
"")
126 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
127 $tpl->setVariable(
"BTN_ACC_KEY",
130 $tpl->parseCurrentBlock();
131 $tpl->touchBlock(
"item");
135 $tpl->setCurrentBlock(
"form_button");
136 $tpl->setVariable(
"SUB_TXT", $item[
"txt"]);
137 $tpl->setVariable(
"SUB_CMD", $item[
"cmd"]);
138 $tpl->parseCurrentBlock();
139 $tpl->touchBlock(
"item");
145 $tpl->setCurrentBlock(
"input_label");
146 $tpl->setVariable(
"TXT_INPUT", $item[
"input"]->getTitle());
147 $tpl->parseCurrentBlock();
149 $tpl->setCurrentBlock(
"input");
150 $tpl->setVariable(
"INPUT_HTML", $item[
"input"]->getToolbarHTML());
151 $tpl->parseCurrentBlock();
152 $tpl->touchBlock(
"item");
156 $tpl->touchBlock(
"separator");
157 $tpl->touchBlock(
"item");
161 $tpl->touchBlock(
"spacer");
162 $tpl->touchBlock(
"item");
167 $tpl->setVariable(
"TXT_FUNCTIONS", $lng->txt(
"functions"));
168 if ($this->lead_img[
"img"] !=
"")
170 $tpl->setCurrentBlock(
"lead_image");
171 $tpl->setVariable(
"IMG_SRC", $this->lead_img[
"img"]);
172 $tpl->setVariable(
"IMG_ALT", $this->lead_img[
"alt"]);
173 $tpl->parseCurrentBlock();
179 $tpl->setCurrentBlock(
"form_open");
181 if ($this->multipart)
183 $tpl->setVariable(
"ENC_TYPE",
'enctype="multipart/form-data"');
185 $tpl->parseCurrentBlock();
186 $tpl->touchBlock(
"form_close");