32 $this->form_action = $a_val;
33 $this->multipart = $a_multipart;
34 $this->form_target = $a_target;
44 return $this->form_action;
52 $this->lead_img = array(
"img" => $a_img,
"alt" => $a_alt);
63 function addButton($a_txt, $a_cmd, $a_target =
"", $a_acc_key =
"", $a_additional_attrs =
'')
65 $this->items[] = array(
"type" =>
"button",
"txt" => $a_txt,
"cmd" => $a_cmd,
66 "target" => $a_target,
"acc_key" => $a_acc_key,
'add_attrs' => $a_additional_attrs);
78 $this->items[] = array(
"type" =>
"fbutton",
"txt" => $a_txt,
"cmd" => $a_cmd,
79 "acc_key" => $a_acc_key);
87 $this->items[] = array(
"type" =>
"input",
"input" => $a_item,
"label" => $a_output_label);
95 $this->items[] = array(
"type" =>
"separator");
103 $this->items[] = array(
"type" =>
"spacer");
113 $this->open_form_tag = $a_val;
133 $this->close_form_tag = $a_val;
153 $tpl =
new ilTemplate(
"tpl.toolbar.html",
true,
true,
"Services/UIComponent/Toolbar");
154 if (count($this->items) > 0)
156 foreach($this->items as $item)
158 switch ($item[
"type"])
161 $tpl->setCurrentBlock(
"button");
162 $tpl->setVariable(
"BTN_TXT", $item[
"txt"]);
163 $tpl->setVariable(
"BTN_LINK", $item[
"cmd"]);
164 if ($item[
"target"] !=
"")
166 $tpl->setVariable(
"BTN_TARGET",
'target="'.$item[
"target"].
'"');
168 if ($item[
"acc_key"] !=
"")
170 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
171 $tpl->setVariable(
"BTN_ACC_KEY",
174 if(($item[
'add_attrs']))
176 $tpl->setVariable(
'BTN_ADD_ARG',$item[
'add_attrs']);
178 $tpl->parseCurrentBlock();
179 $tpl->touchBlock(
"item");
183 $tpl->setCurrentBlock(
"form_button");
184 $tpl->setVariable(
"SUB_TXT", $item[
"txt"]);
185 $tpl->setVariable(
"SUB_CMD", $item[
"cmd"]);
186 $tpl->parseCurrentBlock();
187 $tpl->touchBlock(
"item");
193 $tpl->setCurrentBlock(
"input_label");
194 $tpl->setVariable(
"TXT_INPUT", $item[
"input"]->getTitle());
195 $tpl->parseCurrentBlock();
197 $tpl->setCurrentBlock(
"input");
198 $tpl->setVariable(
"INPUT_HTML", $item[
"input"]->getToolbarHTML());
199 $tpl->parseCurrentBlock();
200 $tpl->touchBlock(
"item");
204 $tpl->touchBlock(
"separator");
205 $tpl->touchBlock(
"item");
209 $tpl->touchBlock(
"spacer");
210 $tpl->touchBlock(
"item");
215 $tpl->setVariable(
"TXT_FUNCTIONS", $lng->txt(
"functions"));
216 if ($this->lead_img[
"img"] !=
"")
218 $tpl->setCurrentBlock(
"lead_image");
219 $tpl->setVariable(
"IMG_SRC", $this->lead_img[
"img"]);
220 $tpl->setVariable(
"IMG_ALT", $this->lead_img[
"alt"]);
221 $tpl->parseCurrentBlock();
229 $tpl->setCurrentBlock(
"form_open");
231 if ($this->multipart)
233 $tpl->setVariable(
"ENC_TYPE",
'enctype="multipart/form-data"');
235 if ($this->form_target !=
"")
237 $tpl->setVariable(
"TARGET",
' target="'.$this->form_target.
'" ');
239 $tpl->parseCurrentBlock();
243 $tpl->touchBlock(
"form_close");