24 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
25 define(
"IL_FORM_EDIT", 0);
26 define(
"IL_FORM_CREATE", 1);
27 define(
"IL_FORM_RE_EDIT", 2);
28 define(
"IL_FORM_RE_CREATE", 3);
52 include_once(
"Services/Block/classes/class.ilHtmlBlock.php");
53 if (
$_GET[
"html_block_id"] > 0)
58 $this->ctrl->saveParameter($this, array(
"html_block_id"));
72 $next_class = $this->ctrl->getNextClass($this);
73 $cmd = $this->ctrl->getCmd();
78 $html = $this->
$cmd();
93 $this->form_edit_mode = $a_form_edit_mode;
114 $lng->loadLanguageModule(
"block");
116 include(
"Services/Form/classes/class.ilPropertyFormGUI.php");
123 $alert = ($this->form_check[
"HtmlBlock"][
"Title"][
"error"] !=
"")
124 ? $this->form_check[
"HtmlBlock"][
"Title"][
"error"]
126 $form_gui->addTextProperty($lng->txt(
"block_html_block_title"),
133 $alert = ($this->form_check[
"HtmlBlock"][
"Content"][
"error"] !=
"")
134 ? $this->form_check[
"HtmlBlock"][
"Content"][
"error"]
136 $form_gui->addTextAreaProperty($lng->txt(
"block_html_block_content"),
145 $form_gui->addCommandButton(
"saveHtmlBlock", $lng->txt(
"save"));
146 $form_gui->addCommandButton(
"cancelSaveHtmlBlock", $lng->txt(
"cancel"));
150 $form_gui->addCommandButton(
"updateHtmlBlock", $lng->txt(
"save"));
151 $form_gui->addCommandButton(
"cancelUpdateHtmlBlock", $lng->txt(
"cancel"));
154 $form_gui->setTitle($lng->txt(
"block_html_block_head"));
155 $form_gui->setFormAction($this->ctrl->getFormAction($this));
160 return $form_gui->getHTML();
192 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
200 $this->html_block->create();
216 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
223 $this->html_block->update();
244 $values[
"Title"] =
"";
245 $values[
"Content"] =
"";
249 $values[
"Title"] = $this->html_block->getTitle();
250 $values[
"Content"] = $this->html_block->getContent();
272 include_once(
"./Services/Utilities/classes/class.ilTypeCheck.php");
275 $this->form_check[
"HtmlBlock"] = array();
276 $this->form_check[
"HtmlBlock"][
"Title"] =
278 $this->form_check[
"HtmlBlock"][
"Content"] =
281 foreach($this->form_check[
"HtmlBlock"] as $prop_check)
283 if (!$prop_check[
"ok"])