60 $this->ctrl = $DIC[
'ilCtrl'];
61 $this->tpl = $DIC[
'tpl'];
62 $this->lng = $DIC[
'lng'];
63 $this->access = $DIC[
'ilAccess'];
65 $this->lng->loadLanguageModule(
'mail');
66 $this->lng->loadLanguageModule(
'search');
69 $this->ref_id = $ref_id;
72 $this->mail_roles = $objMailMemberRoles->
getMailRoles($ref_id);
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
83 $this->ctrl->setReturn($this,
'');
85 switch ($next_class) {
88 case 'sendMailToSelectedUsers':
92 case 'showSelectableUsers':
105 if (isset(
$_GET[
'returned_from_mail']) &&
$_GET[
'returned_from_mail'] ==
'1') {
138 return (strlen($stored_referer) ? $stored_referer :
false);
155 if (
$form->checkInput()) {
156 if (
$form->getInput(
'mail_member_type') ==
'mail_member_roles') {
157 if (is_array(
$form->getInput(
'roles')) && count(
$form->getInput(
'roles')) > 0) {
158 $role_mail_boxes = array();
159 $roles =
$form->getInput(
'roles');
160 foreach ($roles as $role_id) {
161 $mailbox = $this->objMailMemberRoles->getMailboxRoleAddress($role_id);
162 $role_mail_boxes[] = $mailbox;
165 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
166 $_SESSION[
'mail_roles'] = $role_mail_boxes;
171 array(
'type' =>
'role'),
174 'rcp_to' => implode(
',', $role_mail_boxes),
175 'sig' => $this->gui->createMailSignature()
180 $form->setValuesByPost();
191 $form->setValuesByPost();
205 if ($this->access->checkAccess(
'write',
"", $this->ref_id)) {
206 $context_array = array(
208 'ref_id' => $this->ref_id,
215 if ($this->access->checkAccess(
'write',
"", $this->ref_id)) {
216 $context_array = array(
218 'ref_id' => $this->ref_id,
224 return $context_array;
232 include_once
'./Services/Contact/classes/class.ilMailMemberSearchTableGUI.php';
233 include_once
'./Services/Contact/classes/class.ilMailMemberSearchDataProvider.php';
235 $this->tpl->getStandardTemplate();
240 $this->tpl->setContent(
$tbl->getHTML());
248 if (!is_array(
$_POST[
'user_ids']) || 0 === count(
$_POST[
'user_ids'])) {
255 foreach (
$_POST[
'user_ids'] as $usr_id) {
259 if (!count(array_filter($rcps))) {
265 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
274 'sig' => $this->gui->createMailSignature()
290 $this->tpl->setContent(
$form->getHTML());
314 $this->lng->loadLanguageModule(
'mail');
316 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
318 $form->setTitle($this->lng->txt(
'mail_members'));
320 $form->setFormAction($this->ctrl->getFormAction($this,
'nextMailForm'));
324 $form->addItem($radio_grp);
325 $form->addCommandButton(
'nextMailForm', $this->lng->txt(
'mail_members_search_continue'));
326 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
348 $radio_sel_users =
new ilRadioOption($this->lng->txt(
'mail_sel_users'),
'mail_sel_users');
350 $radio_roles =
new ilRadioOption($this->objMailMemberRoles->getRadioOptionTitle(),
'mail_member_roles');
354 if (array_key_exists(
'default_checked', $role) && $role[
'default_checked']) {
355 $chk_role->setChecked(
true);
357 $chk_role->setValue($role[
'role_id']);
358 $chk_role->setInfo($role[
'mailbox']);
362 $radio_grp->setValue(
'mail_member_roles');
364 $radio_grp->addOption($radio_sel_users);
365 $radio_grp->addOption($radio_roles);
static _lookupLogin($a_user_id)
lookup login
This class represents an option in a radio group.
setObjParticipants($objParticipants)
__construct($gui, $ref_id, ilAbstractMailMemberRoles $objMailMemberRoles)
ilMailMemberSearchGUI constructor.
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
Class ilMailMemberSearchGUI.
if(isset($_POST['submit'])) $form
addSubItem($a_item)
Add Subitem.
sendMailToSelectedUsers()
redirectToParentReferer()
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilMailMemberSearchDataProvider.
static redirect($a_script)
Class ilAbstractMailMemberRoles.