5 require_once(
"Services/Table/classes/class.ilTableGUI.php");
36 $this->lng = $DIC->language();
41 $this->form_action = $a_form_action;
46 return $this->form_action;
56 $this->headertext = $a_headertext;
66 return $this->headertext;
77 $this->buttons[] = array(
78 "txt" => $a_txt,
"cmd" => $a_cmd);
87 final public function setCancel($a_txt, $a_cmd, $a_id =
"")
89 $this->cancel_txt = $a_txt;
90 $this->cancel_cmd = $a_cmd;
91 $this->cancel_id = $a_id;
102 $this->confirm_txt = $a_txt;
103 $this->confirm_cmd = $a_cmd;
104 $this->confirm_id = $a_id;
122 $this->item[] = array(
"var" => $a_post_var,
"id" => $a_id,
123 "text" => $a_text,
"img" => $a_img,
"alt" => $a_alt);
125 $this->use_images =
true;
137 $this->hidden_item[] = array(
"var" => $a_post_var,
"value" => $a_value);
151 include_once(
"./Services/Utilities/classes/class.ilConfirmationTableGUI.php");
154 if (count($this->item) > 0) {
156 $ctab->setData($this->item);
159 foreach ($this->buttons as $b) {
160 $ctab->addCommandButton($b[
"cmd"], $b[
"txt"]);
162 $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
163 $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
166 $ctab->addHiddenInput($hidden_item[
"var"], $hidden_item[
"value"]);
169 if ($this->form_name) {
170 $ctab->setFormName($this->form_name);
173 return $ctab->getHTML();
176 $tb->setPreventDoubleSubmission(
true);
178 if ($this->hidden_item) {
179 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
182 $hiddenInput->setValue($hidden_item[
'value']);
183 $tb->addInputItem($hiddenInput);
186 require_once
'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
188 $confirm->setCommand($this->confirm_cmd);
189 $confirm->setCaption($this->confirm_txt,
false);
190 $confirm->setId($this->confirm_id);
193 $cancel->setCommand($this->cancel_cmd);
194 $cancel->setCaption($this->cancel_txt,
false);
195 $cancel->setId($this->cancel_id);
197 $tb->addStickyItem($confirm);
198 $tb->addStickyItem($cancel);
200 return $tb->getHTML();
211 $this->form_name = $a_name;
addHiddenItem($a_post_var, $a_value)
Add hidden item.
addButton($a_txt, $a_cmd)
Set cancel button command and text.
setFormAction($a_form_action)
getHeaderText()
Get Set header text.
setConfirm($a_txt, $a_cmd, $a_id="")
Set confirmation button command and text.
getHTML()
Get confirmation screen HTML.
setFormName($a_name)
Set form name.
setCancel($a_txt, $a_cmd, $a_id="")
Set cancel button command and text.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
setHeaderText($a_headertext)
Set Set header text.
__construct()
Constructor.
addItem( $a_post_var, $a_id, $a_text, $a_img="", $a_alt="")
Add row item.
Confirmation screen class.