35 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
   60                 $this->
setTitle($this->lng->txt(
'compose'));
 
   62                 $this->subject = 
new ilTextInputGUI($this->lng->txt(
'subject'), 
'm_subject');
 
   64                 $this->subject->setRequired(
true);
 
   69                 $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"not_sent_only"), 1, 
''));
 
   70                 $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"send_to_unanswered"), 3, 
''));
 
   71                 $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"send_to_answered"), 2, 
''));
 
   72                 $this->
addItem($this->sendtype);
 
   74                 $existingdata = $this->guiclass->object->getExternalCodeRecipients();
 
   75                 $existingcolumns = array();
 
   76                 if (count($existingdata))
 
   78                         $first = array_shift($existingdata);
 
   79                         foreach ($first as $key => $value)
 
   81                                 if (strcmp($key, 
'code') != 0 && strcmp($key, 
'email') != 0 && strcmp($key, 
'sent') != 0) array_push($existingcolumns, 
'[' . $key . 
']');
 
   86                 $settings = $this->guiclass->object->getUserSettings($ilUser->getId(), 
'savemessage');
 
   89                         $options = array(0 => $this->lng->txt(
'please_select'));
 
   90                         foreach ($settings as $setting)
 
   92                                 $options[$setting[
'settings_id']] = $setting[
'title'];
 
   94                         $this->savedmessages = 
new ilSelectInputGUI($this->lng->txt(
"saved_messages"), 
"savedmessage");
 
   96                         $this->
addItem($this->savedmessages);
 
   99                 $this->mailmessage = 
new ilTextAreaInputGUI($this->lng->txt(
'message_content'), 
'm_message');
 
  101                 $this->mailmessage->setCols(80);
 
  102                 $this->mailmessage->setRows(10);
 
  103                 $this->mailmessage->setInfo(sprintf($this->lng->txt(
'message_content_info'), join($existingcolumns, 
', ')));
 
  104                 $this->
addItem($this->mailmessage);
 
  108                 $this->savemessage->setOptionTitle($this->lng->txt(
"save_reuse_message"));
 
  109                 $this->savemessage->setValue(1);
 
  111                 $this->savemessagetitle = 
new ilTextInputGUI($this->lng->txt(
'save_reuse_title'), 
'savemessagetitle');
 
  112                 $this->savemessagetitle->
setSize(60);
 
  113                 $this->savemessage->addSubItem($this->savemessagetitle);
 
  115                 $this->
addItem($this->savemessage);
 
  117                 if (count($settings))
 
  119                         if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) $this->
addCommandButton(
"deleteSavedMessage", $this->lng->txt(
"delete_saved_message"));
 
  120                         if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) $this->
addCommandButton(
"insertSavedMessage", $this->lng->txt(
"insert_saved_message"));
 
  122                 if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) $this->
addCommandButton(
"sendCodesMail", $this->lng->txt(
"send"));