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);
 
   53                 include_once(
"Services/Block/classes/class.ilExternalFeedBlock.php");
 
   54                 if (isset(
$_GET[
"external_feed_block_id"]) && 
$_GET[
"external_feed_block_id"] > 0)
 
   59                 $this->ctrl->saveParameter($this, array(
"external_feed_block_id"));
 
   73                 $next_class = $this->ctrl->getNextClass($this);
 
   74                 $cmd = $this->ctrl->getCmd();
 
   79                                 $html = $this->
$cmd();
 
   94                 $this->gui_object = $a_gui_object;
 
  114                 $this->form_edit_mode = $a_form_edit_mode;
 
  134                 return $this->form_gui->getHtml();
 
  146                 return $this->form_gui->getHtml();
 
  157                 if ($this->form_gui->checkInput())
 
  160                         $this->external_feed_block->setTitle($this->form_gui->getInput(
"block_title"));
 
  161                         $this->external_feed_block->setFeedUrl($this->form_gui->getInput(
"block_feed_url"));
 
  163                         $this->external_feed_block->create();
 
  168                         $this->form_gui->setValuesByPost();
 
  169                         return $this->form_gui->getHtml();
 
  181                 if ($this->form_gui->checkInput())
 
  184                         $this->external_feed_block->setTitle($this->form_gui->getInput(
"block_title"));
 
  185                         $this->external_feed_block->setFeedUrl($this->form_gui->getInput(
"block_feed_url"));
 
  186                         $this->external_feed_block->update();
 
  191                         $this->form_gui->setValuesByPost();
 
  192                         return $this->form_gui->getHtml();
 
  206                 $lng->loadLanguageModule(
"block");
 
  208                 include(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  214                 $text_input = 
new ilTextInputGUI($lng->txt(
"block_feed_block_title"), 
"block_title");
 
  216                 $text_input->setRequired(
true);
 
  217                 $text_input->setMaxLength(200);
 
  218                 $this->form_gui->addItem($text_input);
 
  221                 $text_input = 
new ilTextInputGUI($lng->txt(
"block_feed_block_feed_url"), 
"block_feed_url");
 
  222                 $text_input->
setInfo($lng->txt(
"block_feed_block_feed_url_info"));
 
  223                 $text_input->setRequired(
true);
 
  224                 $text_input->setMaxLength(250);
 
  225                 $this->form_gui->addItem($text_input);
 
  231                         $this->form_gui->addCommandButton(
"saveFeedBlock", $lng->txt(
"save"));
 
  232                         $this->form_gui->addCommandButton(
"cancelSaveFeedBlock", $lng->txt(
"cancel"));
 
  236                         $this->form_gui->addCommandButton(
"updateFeedBlock", $lng->txt(
"save"));
 
  237                         $this->form_gui->addCommandButton(
"cancelUpdateFeedBlock", $lng->txt(
"cancel"));
 
  240                 $this->form_gui->setTitle($lng->txt(
"block_feed_block_head"));
 
  241                 $this->form_gui->setFormAction($this->ctrl->getFormAction($this));
 
  255                 $values[
"block_title"] = $this->external_feed_block->getTitle();
 
  256                 $values[
"block_feed_url"] = $this->external_feed_block->getFeedUrl();
 
  258                 $this->form_gui->setValuesByArray($values);
 
  270                 $ilCtrl->returnToParent($this);
 
  281                 $ilCtrl->returnToParent($this);
 
  292                 $ilCtrl->returnToParent($this);
 
  303                 $ilCtrl->returnToParent($this);