ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
FormMailCodesGUI Class Reference

Class FormMailCodesGUI. More...

+ Inheritance diagram for FormMailCodesGUI:
+ Collaboration diagram for FormMailCodesGUI:

Public Member Functions

 __construct ($guiclass)
 
 getSavedMessages ()
 
 getMailMessage ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 ilPropertyFormGUI ()
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 setTableWidth ($a_width)
 Set table width. More...
 
 getTableWidth ()
 get table width More...
 
 setMode ($a_mode)
 Set Mode ('std', 'subform'). More...
 
 getMode ()
 Get Mode ('std', 'subform'). More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setTitleIcon ($a_titleicon)
 Set TitleIcon. More...
 
 getTitleIcon ()
 Get TitleIcon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setShowTopButtons ($a_val)
 Get show top buttons. More...
 
 getShowTopButtons ()
 Set show top buttons. More...
 
 addItem ($a_item)
 Add Item (Property, SectionHeader). More...
 
 removeItemByPostVar ($a_post_var)
 Remove Item. More...
 
 getItemByPostVar ($a_post_var)
 Get Item by POST variable. More...
 
 setItems ($a_items)
 Set Items. More...
 
 getItems ()
 Get Items. More...
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage ($a_val)
 Set disable standard message. More...
 
 getDisableStandardMessage ()
 Get disable standard message. More...
 
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not. More...
 
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not. More...
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array. More...
 
 setValuesByPost ()
 Set form values from POST values. More...
 
 checkInput ()
 Check Post Input. More...
 
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id. More...
 
 addCustomProperty ($a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property. More...
 
 addCommandButton ($a_cmd, $a_text)
 Add Command button. More...
 
 clearCommandButtons ()
 Remove all command buttons. More...
 
 getContent ()
 Get Content. More...
 
 insertItem ($item, $a_sub_item=false)
 
 getHTML ()
 
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded? More...
 
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 ilFormGUI ()
 Constructor. More...
 
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Private Attributes

 $lng
 
 $guiclass
 
 $subject
 
 $messagetype
 
 $sendtype
 
 $savedmessages
 
 $mailmessage
 
 $savemessage
 
 $savemessagetitle
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 keepFileUpload ($a_hash, $a_field, $a_tmp_name, $a_name, $a_type, $a_index=null, $a_sub_index=null)
 Import upload into temp directory. More...
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 
- Protected Attributes inherited from ilPropertyFormGUI
 $mode = "std"
 
 $check_input_called = false
 
 $disable_standard_message = false
 
 $top_anchor = "il_form_top"
 
 $titleicon = false
 
 $description = ""
 
 $tbl_width = false
 
 $show_top_buttons = true
 
 $reloaded_files
 
 $hide_labels = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Detailed Description

Class FormMailCodesGUI.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 37 of file FormMailCodesGUI.php.

Constructor & Destructor Documentation

◆ __construct()

FormMailCodesGUI::__construct (   $guiclass)

Definition at line 49 of file FormMailCodesGUI.php.

References $_GET, $guiclass, $ilUser, $lng, $options, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilRadioGroupInputGUI\addOption(), ilFormGUI\setFormAction(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), and ilPropertyFormGUI\setTitle().

50  {
51  parent::__construct();
52 
53  global $lng;
54  global $ilAccess;
55 
56  $this->lng = &$lng;
57  $this->guiclass = &$guiclass;
58 
59  $this->setFormAction($guiclass->ctrl->getFormAction($this->guiclass));
60  $this->setTitle($this->lng->txt('compose'));
61 
62  $this->subject = new ilTextInputGUI($this->lng->txt('subject'), 'm_subject');
63  $this->subject->setSize(50);
64  $this->subject->setRequired(true);
65  $this->addItem($this->subject);
66 
67  $this->sendtype = new ilRadioGroupInputGUI($this->lng->txt('recipients'), "m_notsent");
68  $this->sendtype->addOption(new ilCheckboxOption($this->lng->txt("send_to_all"), 0, ''));
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);
73 
74  $existingdata = $this->guiclass->object->getExternalCodeRecipients();
75  $existingcolumns = array();
76  if (count($existingdata))
77  {
78  $first = array_shift($existingdata);
79  foreach ($first as $key => $value)
80  {
81  if (strcmp($key, 'code') != 0 && strcmp($key, 'email') != 0 && strcmp($key, 'sent') != 0) array_push($existingcolumns, '[' . $key . ']');
82  }
83  }
84 
85  global $ilUser;
86  $settings = $this->guiclass->object->getUserSettings($ilUser->getId(), 'savemessage');
87  if (count($settings))
88  {
89  $options = array(0 => $this->lng->txt('please_select'));
90  foreach ($settings as $setting)
91  {
92  $options[$setting['settings_id']] = $setting['title'];
93  }
94  $this->savedmessages = new ilSelectInputGUI($this->lng->txt("saved_messages"), "savedmessage");
95  $this->savedmessages->setOptions($options);
96  $this->addItem($this->savedmessages);
97  }
98 
99  $this->mailmessage = new ilTextAreaInputGUI($this->lng->txt('message_content'), 'm_message');
100  $this->mailmessage->setRequired(true);
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);
105 
106  // save message
107  $this->savemessage = new ilCheckboxInputGUI('', "savemessage");
108  $this->savemessage->setOptionTitle($this->lng->txt("save_reuse_message"));
109  $this->savemessage->setValue(1);
110 
111  $this->savemessagetitle = new ilTextInputGUI($this->lng->txt('save_reuse_title'), 'savemessagetitle');
112  $this->savemessagetitle->setSize(60);
113  $this->savemessage->addSubItem($this->savemessagetitle);
114 
115  $this->addItem($this->savemessage);
116 
117  if (count($settings))
118  {
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"));
121  }
122  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $this->addCommandButton("sendCodesMail", $this->lng->txt("send"));
123  }
This class represents an option in a checkbox group.
This class represents a selection list property in a property form.
$_GET["client_id"]
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
addOption($a_option)
Add Option.
setTitle($a_title)
Set Title.
if(!is_array($argv)) $options
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
addCommandButton($a_cmd, $a_text)
Add Command button.
global $ilUser
Definition: imgupload.php:15
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

Member Function Documentation

◆ getMailMessage()

FormMailCodesGUI::getMailMessage ( )

Definition at line 130 of file FormMailCodesGUI.php.

References $mailmessage.

131  {
132  return $this->mailmessage;
133  }

◆ getSavedMessages()

FormMailCodesGUI::getSavedMessages ( )

Definition at line 125 of file FormMailCodesGUI.php.

References $savedmessages.

126  {
127  return $this->savedmessages;
128  }

Field Documentation

◆ $guiclass

FormMailCodesGUI::$guiclass
private

Definition at line 40 of file FormMailCodesGUI.php.

Referenced by __construct().

◆ $lng

FormMailCodesGUI::$lng
private

Definition at line 39 of file FormMailCodesGUI.php.

Referenced by __construct().

◆ $mailmessage

FormMailCodesGUI::$mailmessage
private

Definition at line 45 of file FormMailCodesGUI.php.

Referenced by getMailMessage().

◆ $messagetype

FormMailCodesGUI::$messagetype
private

Definition at line 42 of file FormMailCodesGUI.php.

◆ $savedmessages

FormMailCodesGUI::$savedmessages
private

Definition at line 44 of file FormMailCodesGUI.php.

Referenced by getSavedMessages().

◆ $savemessage

FormMailCodesGUI::$savemessage
private

Definition at line 46 of file FormMailCodesGUI.php.

◆ $savemessagetitle

FormMailCodesGUI::$savemessagetitle
private

Definition at line 47 of file FormMailCodesGUI.php.

◆ $sendtype

FormMailCodesGUI::$sendtype
private

Definition at line 43 of file FormMailCodesGUI.php.

◆ $subject

FormMailCodesGUI::$subject
private

Definition at line 41 of file FormMailCodesGUI.php.


The documentation for this class was generated from the following file: