mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
output warning if list of recipients contains disabled users
This commit is contained in:
parent
fb37e526cc
commit
192e750f00
|
@ -1233,7 +1233,7 @@ $(document).ready( function() {
|
|||
print getReviewStatusText($r["status"])."</td>\n";
|
||||
print "<td><ul class=\"actions unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
echo "<li><span class=\"text-error text-danger\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessobject->mayReview($latestContent->getDocument())) {
|
||||
if ($is_reviewer) {
|
||||
|
@ -1339,7 +1339,7 @@ $(document).ready( function() {
|
|||
print getApprovalStatusText($a["status"])."</td>\n";
|
||||
print "<td><ul class=\"actions unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
echo "<li><span class=\"text-error text-danger\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessobject->mayApprove($latestContent->getDocument())) {
|
||||
if ($is_approver) {
|
||||
|
@ -1627,7 +1627,7 @@ $(document).ready( function() {
|
|||
|
||||
print "<thead>\n";
|
||||
print "<tr>\n";
|
||||
print "<th width='20%'>".((count($receiptStatus) > 10) ? '<input type="text" id="filterRecipientsInput" placeholder="'.getMLText('type_to_filter').'">' : getMLText('name'))."</th>\n";
|
||||
print "<th width='20%'>".((count($receiptStatus) > 10) ? '<input class="form-control" type="text" id="filterRecipientsInput" placeholder="'.getMLText('type_to_filter').'">' : getMLText('name'))."</th>\n";
|
||||
print "<th width='20%'>".getMLText("last_update")."</th>\n";
|
||||
print "<th width='25%'>".getMLText("comment")."</th>";
|
||||
print "<th width='15%'>".getMLText("status")."</th>\n";
|
||||
|
@ -1637,6 +1637,8 @@ $(document).ready( function() {
|
|||
print "<tbody>\n";
|
||||
|
||||
$stat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0);
|
||||
$disabledcount = 0;
|
||||
$removedusers = '';
|
||||
foreach ($receiptStatus as $r) {
|
||||
$required = null;
|
||||
$is_recipient = false;
|
||||
|
@ -1652,8 +1654,10 @@ $(document).ready( function() {
|
|||
if($user->isAdmin()) {
|
||||
if($document->getAccessMode($required) < M_READ || $latestContent->getAccessMode($required) < M_READ)
|
||||
$accesserr = getMLText("access_denied");
|
||||
elseif(is_object($required) && $required->isDisabled())
|
||||
elseif(is_object($required) && $required->isDisabled()) {
|
||||
$disabledcount++;
|
||||
$accesserr = getMLText("login_disabled_title");
|
||||
}
|
||||
}
|
||||
}
|
||||
if($r["required"] == $user->getId()/* && ($user->getId() != $owner->getId() || $enableownerreceipt == 1)*/)
|
||||
|
@ -1676,7 +1680,7 @@ $(document).ready( function() {
|
|||
}
|
||||
break;
|
||||
}
|
||||
/* Do not list users that has been removed from the list of recipients
|
||||
/* Do not list users that have been removed from the list of recipients
|
||||
* unless admin is logged in.
|
||||
*/
|
||||
if($user->isAdmin() || $r["status"] > -2) {
|
||||
|
@ -1703,7 +1707,7 @@ $(document).ready( function() {
|
|||
print getReceiptStatusText($r["status"])."</td>\n";
|
||||
print "<td><ul class=\"actions unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
echo "<li><span class=\"text-error text-danger\">".$accesserr."</span></li>";
|
||||
if($accessobject->mayReceipt($document)) {
|
||||
if ($is_recipient) {
|
||||
if($r["status"]==0) {
|
||||
|
@ -1722,6 +1726,9 @@ $(document).ready( function() {
|
|||
<tbody>
|
||||
</table>
|
||||
<?php
|
||||
if($disabledcount) {
|
||||
$this->warningMsg(getMLText('list_of_recipients_has_disabled_users'));
|
||||
}
|
||||
// $this->contentContainerEnd();
|
||||
if($accessobject->check_view_access('ViewDocument', array('action'=>'receptionBar'))/* $user->isAdmin() || $user->getId() == $document->getOwner()->getId()*/) {
|
||||
/* Do not count entries '-2' as they are removed userѕ */
|
||||
|
@ -1834,7 +1841,7 @@ $(document).ready( function() {
|
|||
print getRevisionStatusText($r["status"])."</td>\n";
|
||||
print "<td><ul class=\"actions unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
echo "<li><span class=\"text-error text-danger\">".$accesserr."</span></li>";
|
||||
if($accessobject->mayRevise($document)) {
|
||||
if ($is_recipient && $r["status"]==0) {
|
||||
print $this->html_link('ReviseDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'revisionid'=>$r['revisionID']), array('class'=>'btn btn-mini btn-primary'), getMLText("add_revision"), false, true, array('<li>', '</li>'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user