From 22f8b7e7be00c51c389812e424ad5375de694ee9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 19 Mar 2018 11:32:24 +0100 Subject: [PATCH] do not list empty groups as reviewers/approvers --- views/bootstrap/class.AddDocument.php | 4 ++-- views/bootstrap/class.SetReviewersApprovers.php | 4 ++-- views/bootstrap/class.UpdateDocument.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 20a41cef4..460ba317c 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -494,7 +494,7 @@ $(document).ready(function() { $mandatory=false; foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $mandatory=true; - if ($mandatory) print ""; + if ($mandatory || !$grp->getUsers()) print ""; else print ""; } ?> @@ -604,7 +604,7 @@ $(document).ready(function() { $mandatory=false; foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $mandatory=true; - if ($mandatory) print ""; + if ($mandatory || !$grp->getUsers()) print ""; else print ""; } diff --git a/views/bootstrap/class.SetReviewersApprovers.php b/views/bootstrap/class.SetReviewersApprovers.php index ffd4f2780..a11549970 100644 --- a/views/bootstrap/class.SetReviewersApprovers.php +++ b/views/bootstrap/class.SetReviewersApprovers.php @@ -153,7 +153,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style { $mandatory=false; foreach ($res as $r) if ($r['reviewerGroupID']==$group->getID()) $mandatory=true; - if ($mandatory){ + if ($mandatory || !$group->getUsers()){ print ""; // print ""; @@ -264,7 +264,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style { $mandatory=false; foreach ($res as $r) if ($r['approverGroupID']==$group->getID()) $mandatory=true; - if ($mandatory){ + if ($mandatory || !$group->getUsers()){ print ""; // print ""; diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 4133de761..24c7dc094 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -415,7 +415,7 @@ console.log(element); $mandatory=false; foreach ($res as $r) if ($r['reviewerGroupID']==$grp->getID()) $mandatory=true; - if ($mandatory) print ""; + if ($mandatory || !$grp->getUsers()) print ""; else print ""; } ?> @@ -562,7 +562,7 @@ console.log(element); $mandatory=false; foreach ($res as $r) if ($r['approverGroupID']==$grp->getID()) $mandatory=true; - if ($mandatory) print ""; + if ($mandatory || !$grp->getUsers()) print ""; else print ""; }