mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
set individual recipients from group
This commit is contained in:
parent
52b64822c5
commit
ffc709c557
|
@ -87,6 +87,18 @@ foreach ($receiptStatus as $i=>$rs) {
|
|||
|
||||
// Get the list of proposed recipients, stripping out any duplicates.
|
||||
$pIndRev = (isset($_POST["indRecipients"]) ? array_values(array_unique($_POST["indRecipients"])) : array());
|
||||
// Retrieve the list of recipient groups whose members become individual recipients
|
||||
if (isset($_POST["grpIndRecipients"])) {
|
||||
foreach ($_POST["grpIndRecipients"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member) {
|
||||
if(!in_array($member->getID(), $pIndRev))
|
||||
$pIndRev[] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$pGrpRev = (isset($_POST["grpRecipients"]) ? array_values(array_unique($_POST["grpRecipients"])) : array());
|
||||
foreach ($pIndRev as $p) {
|
||||
if (is_numeric($p)) {
|
||||
|
|
|
@ -95,6 +95,15 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Bootstrap_Style {
|
|||
?>
|
||||
</select>
|
||||
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups")?>:</div>
|
||||
<select class="chzn-select span9" name="grpIndRecipients[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_ind_recipients'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $group) {
|
||||
print "<option value='". $group->getID() ."'>".htmlspecialchars($group->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
|
||||
<select class="chzn-select span9" name="grpRecipients[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_recipients'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue
Block a user