26        $ilAccess = 
$DIC->access();
 
   29        $rbacsystem = 
$DIC->rbac()->system();
 
   35        $this->
setFormAction($this->ctrl->getFormAction($this->guiclass));
 
   36        $this->
setTitle($this->lng->txt(
'compose'));
 
   38        $this->subject = 
new ilTextInputGUI($this->lng->txt(
'subject'), 
'm_subject');
 
   39        $this->subject->setSize(50);
 
   40        $this->subject->setRequired(
true);
 
   44        $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"send_to_all"), 0, 
''));
 
   45        $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"not_sent_only"), 1, 
''));
 
   46        $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"send_to_unanswered"), 3, 
''));
 
   47        $this->sendtype->addOption(
new ilCheckboxOption($this->lng->txt(
"send_to_answered"), 2, 
''));
 
   48        $this->
addItem($this->sendtype);
 
   50        $existingdata = $this->guiclass->getObject()->getExternalCodeRecipients();
 
   52        $existingcolumns = array();
 
   53        if (count($existingdata)) {
 
   54            $first = array_shift($existingdata);
 
   55            foreach ($first as $key => $value) {
 
   56                if (strcmp($key, 
'code') != 0 && strcmp($key, 
'email') != 0 && strcmp($key, 
'sent') != 0) {
 
   57                    array_push($existingcolumns, 
'[' . $key . 
']');
 
   62        $settings = $this->guiclass->getObject()->getUserSettings(
$ilUser->getId(), 
'savemessage');
 
   64            $options = array(0 => $this->lng->txt(
'please_select'));
 
   66                $options[$setting[
'settings_id']] = $setting[
'title'];
 
   68            $this->savedmessages = 
new ilSelectInputGUI($this->lng->txt(
"saved_messages"), 
"savedmessage");
 
   69            $this->savedmessages->setOptions($options);
 
   70            $this->
addItem($this->savedmessages);
 
   73        $this->mailmessage = 
new ilTextAreaInputGUI($this->lng->txt(
'message_content'), 
'm_message');
 
   74        $this->mailmessage->setRequired(
true);
 
   75        $this->mailmessage->setCols(80);
 
   76        $this->mailmessage->setRows(10);
 
   77        $this->mailmessage->setInfo(sprintf($this->lng->txt(
'message_content_info'), join(
', ', $existingcolumns)));
 
   78        $this->
addItem($this->mailmessage);
 
   82        $this->savemessage->setOptionTitle($this->lng->txt(
"save_reuse_message"));
 
   83        $this->savemessage->setValue(1);
 
   85        $this->savemessagetitle = 
new ilTextInputGUI($this->lng->txt(
'save_reuse_title'), 
'savemessagetitle');
 
   86        $this->savemessagetitle->setSize(60);
 
   87        $this->savemessage->addSubItem($this->savemessagetitle);
 
   89        $this->
addItem($this->savemessage);
 
   92            if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) {
 
   93                $this->
addCommandButton(
"deleteSavedMessage", $this->lng->txt(
"delete_saved_message"));
 
   95            if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) {
 
   96                $this->
addCommandButton(
"insertSavedMessage", $this->lng->txt(
"insert_saved_message"));
 
  100        if ((
int) 
$ilSetting->get(
'mail_allow_external')) {
 
An exception for terminatinating execution or to throw for unit testing.
This class represents an option in a checkbox group.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc