mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-10-04 23:22:24 +00:00
finish removal from process
This commit is contained in:
parent
d0ab0d0f9f
commit
d8ae673270
|
@ -202,13 +202,15 @@ else if ($action == "removefromprocesses") {
|
|||
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
|
||||
}
|
||||
|
||||
if (!$userToRemove->removeFromProcesses($user)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
if(isset($_POST["status"]) && is_array($_POST["status"]) && $_POST["status"]) {
|
||||
if (!$userToRemove->removeFromProcesses($user, $_POST['status'])) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
add_log_line(".php&action=removefromprocesses&userid=".$userid);
|
||||
|
||||
add_log_line(".php&action=removefromprocesses&userid=".$userid);
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_user_processes')));
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_user_processes')));
|
||||
}
|
||||
}
|
||||
|
||||
// modify user ------------------------------------------------------------
|
||||
|
|
|
@ -37,8 +37,8 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentStart();
|
||||
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
||||
$this->contentHeading(getMLText("rm_user"));
|
||||
$this->contentContainerStart();
|
||||
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
<form action="../op/op.UsrMgr.php" name="form1" method="post">
|
||||
<input type="hidden" name="userid" value="<?php print $rmuser->getID();?>">
|
||||
|
@ -48,6 +48,37 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
|||
<?php printMLText("confirm_rm_user_from_processes", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$reviewStatus = $rmuser->getReviewStatus();
|
||||
$tmpr = array();
|
||||
foreach($reviewStatus['indstatus'] as $ri) {
|
||||
if(isset($tmpr[$ri['status']]))
|
||||
$tmpr[$ri['status']][] = $ri;
|
||||
else
|
||||
$tmpr[$ri['status']] = array($ri);
|
||||
}
|
||||
|
||||
$approvalStatus = $rmuser->getApprovalStatus();
|
||||
$tmpa = array();
|
||||
foreach($approvalStatus['indstatus'] as $ai) {
|
||||
if(isset($tmpa[$ai['status']]))
|
||||
$tmpa[$ai['status']][] = $ai;
|
||||
else
|
||||
$tmpa[$ai['status']] = array($ai);
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php if(isset($tmpa["0"]) || isset($tmpr["0"])) { ?>
|
||||
<input type="checkbox" name="status[]" value="0" checked> <?php echo getMLText('approvals_and_reviews_not_touched', array('no_approvals' => count($tmpa["0"]), 'no_reviews' => count($tmpr["0"]))); ?><br />
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpa["1"]) || isset($tmpr["1"])) { ?>
|
||||
<input type="checkbox" name="status[]" value="1" checked> <?php echo getMLText('approvals_and_reviews_accepted', array('no_approvals' => count($tmpa["1"]), 'no_reviews' => count($tmpr["1"]))); ?><br />
|
||||
<?php } ?>
|
||||
<?php if(isset($tmpa["-1"]) || isset($tmpr["-1"])) { ?>
|
||||
<input type="checkbox" name="status[]" value="-1" checked> <?php echo getMLText('approvals_and_reviews_rejected', array('no_approvals' => count($tmpa["-1"]), 'no_reviews' => count($tmpr["-1"]))); ?><br />
|
||||
<?php } ?>
|
||||
|
||||
</p>
|
||||
<p><button type="submit" class="btn"><i class="icon-remove"></i> <?php printMLText("rm_user");?></button></p>
|
||||
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue
Block a user