mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
individual approver/reviewer can be take from group
This commit is contained in:
parent
574cc53075
commit
7d88617964
|
@ -164,6 +164,16 @@ if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'tra
|
|||
$reviewers["g"][] = $grp;
|
||||
}
|
||||
}
|
||||
// Retrieve the list of reviewer groups whose members become individual reviewers
|
||||
if (isset($_POST["grpIndReviewers"])) {
|
||||
foreach ($_POST["grpIndReviewers"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member)
|
||||
$reviewers["i"][] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve the list of individual approvers from the form.
|
||||
|
@ -178,6 +188,17 @@ if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'tra
|
|||
$approvers["g"][] = $grp;
|
||||
}
|
||||
}
|
||||
// Retrieve the list of reviewer groups whose members become individual approvers
|
||||
if (isset($_POST["grpIndApprovers"])) {
|
||||
foreach ($_POST["grpIndApprovers"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member)
|
||||
$approvers["i"][] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add mandatory reviewers/approvers
|
||||
$docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp);
|
||||
if($settings->_workflowMode == 'traditional') {
|
||||
|
|
|
@ -104,6 +104,18 @@ foreach ($approvalStatus as $i=>$rs) {
|
|||
|
||||
// Get the list of proposed reviewers, stripping out any duplicates.
|
||||
$pIndRev = (isset($_POST["indReviewers"]) ? array_values(array_unique($_POST["indReviewers"])) : array());
|
||||
// Retrieve the list of reviewer groups whose members become individual reviewers
|
||||
if (isset($_POST["grpIndReviewers"])) {
|
||||
foreach ($_POST["grpIndReviewers"] 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["grpReviewers"]) ? array_values(array_unique($_POST["grpReviewers"])) : array());
|
||||
foreach ($pIndRev as $p) {
|
||||
if (is_numeric($p)) {
|
||||
|
@ -319,6 +331,18 @@ if (count($reviewIndex["g"]) > 0) {
|
|||
|
||||
// Get the list of proposed approvers, stripping out any duplicates.
|
||||
$pIndApp = (isset($_POST["indApprovers"]) ? array_values(array_unique($_POST["indApprovers"])) : array());
|
||||
// Retrieve the list of approver groups whose members become individual reviewers
|
||||
if (isset($_POST["grpIndApprovers"])) {
|
||||
foreach ($_POST["grpIndApprovers"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member) {
|
||||
if(!in_array($member->getID(), $pIndApp))
|
||||
$pIndApp[] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$pGrpApp = (isset($_POST["grpApprovers"]) ? array_values(array_unique($_POST["grpApprovers"])) : array());
|
||||
foreach ($pIndApp as $p) {
|
||||
if (is_numeric($p)) {
|
||||
|
|
|
@ -129,6 +129,16 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
$reviewers["g"][] = $grp;
|
||||
}
|
||||
}
|
||||
// Retrieve the list of reviewer groups whose members become individual reviewers
|
||||
if (isset($_POST["grpIndReviewers"])) {
|
||||
foreach ($_POST["grpIndReviewers"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member)
|
||||
$reviewers["i"][] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve the list of individual approvers from the form.
|
||||
|
@ -145,6 +155,16 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
$approvers["g"][] = $grp;
|
||||
}
|
||||
}
|
||||
// Retrieve the list of reviewer groups whose members become individual approvers
|
||||
if (isset($_POST["grpIndApprovers"])) {
|
||||
foreach ($_POST["grpIndApprovers"] as $grp) {
|
||||
if($group = $dms->getGroup($grp)) {
|
||||
$members = $group->getUsers();
|
||||
foreach($members as $member)
|
||||
$approvers["i"][] = $member->getID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add mandatory reviewers/approvers
|
||||
$docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp);
|
||||
|
|
|
@ -348,6 +348,20 @@ $(document).ready(function() {
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="chzn-select span9" name="grpIndReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_ind_reviewers'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $grp) {
|
||||
print "<option value=\"".$grp->getID()."\">".htmlspecialchars($grp->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||
|
@ -459,6 +473,20 @@ $(document).ready(function() {
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="chzn-select span9" name="grpIndApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_ind_approvers'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $grp) {
|
||||
print "<option value=\"". $grp->getID() ."\">".htmlspecialchars($grp->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||
</td>
|
||||
|
|
|
@ -123,6 +123,17 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
|
|||
?>
|
||||
</select>
|
||||
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups")?>:</div>
|
||||
<select class="chzn-select span9" name="grpIndReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_grp_reviewers'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<?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="grpReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_reviewers'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
|
||||
<?php
|
||||
|
@ -196,8 +207,19 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
|
||||
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups")?>:</div>
|
||||
<select class="chzn-select span9" name="grpIndApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_grp_approvers'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<?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="grpApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_approvers'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $group) {
|
||||
|
|
|
@ -300,6 +300,20 @@ function checkForm()
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="chzn-select span9" name="grpIndReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_ind_reviewers'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $grp) {
|
||||
print "<option value=\"".$grp->getID()."\">".htmlspecialchars($grp->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||
|
@ -448,6 +462,21 @@ function checkForm()
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("indivіduals_in_groups");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="chzn-select span9" name="grpIndApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_ind_approvers'); ?>">
|
||||
<?php
|
||||
foreach ($docAccess["groups"] as $grp) {
|
||||
print "<option value=\"". $grp->getID() ."\">".htmlspecialchars($grp->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user