mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 13:42:04 +00:00
fix take over reviewers/approvers from last version, add field for members of a group
This commit is contained in:
parent
c86616b971
commit
ba23fa9073
|
@ -31,6 +31,7 @@ class SeedDMS_View_CheckInDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$strictformcheck = $this->params['strictformcheck'];
|
$strictformcheck = $this->params['strictformcheck'];
|
||||||
$dropfolderdir = $this->params['dropfolderdir'];
|
$dropfolderdir = $this->params['dropfolderdir'];
|
||||||
header('Content-Type: application/javascript; charset=UTF-8');
|
header('Content-Type: application/javascript; charset=UTF-8');
|
||||||
|
$this->printSelectPresetButtonJs();
|
||||||
?>
|
?>
|
||||||
function checkForm()
|
function checkForm()
|
||||||
{
|
{
|
||||||
|
@ -71,25 +72,6 @@ $(document).ready(function() {
|
||||||
<?php
|
<?php
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function __takeOverButton($name, $users) { /* {{{ */
|
|
||||||
?>
|
|
||||||
<span id="<?php echo $name; ?>_btn" style="cursor: pointer;" title="<?php printMLText("takeOver".$name); ?>"><i class="icon-arrow-left"></i></span>
|
|
||||||
<script>
|
|
||||||
$(document).ready( function() {
|
|
||||||
$('#<?php echo $name; ?>_btn').click(function(ev){
|
|
||||||
ev.preventDefault();
|
|
||||||
<?php
|
|
||||||
foreach($users as $_id) {
|
|
||||||
echo "$(\"#".$name." option[value='".$_id."']\").attr(\"selected\", \"selected\");\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
$("#<?php echo $name; ?>").trigger("chosen:updated");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
@ -260,7 +242,7 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($tmp) {
|
if($tmp) {
|
||||||
$this->__takeOverButton("IndReviewer", $tmp);
|
$this->printSelectPresetButtonHtml("IndReviewer", $tmp);
|
||||||
}
|
}
|
||||||
/* List all mandatory reviewers */
|
/* List all mandatory reviewers */
|
||||||
if($res) {
|
if($res) {
|
||||||
|
@ -294,6 +276,20 @@ $(document).ready( function() {
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||||
|
@ -329,7 +325,7 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($tmp) {
|
if($tmp) {
|
||||||
$this->__takeOverButton("GrpReviewer", $tmp);
|
$this->printSelectPresetButtonHtml("GrpReviewer", $tmp);
|
||||||
}
|
}
|
||||||
/* List all mandatory groups of reviewers */
|
/* List all mandatory groups of reviewers */
|
||||||
if($res) {
|
if($res) {
|
||||||
|
@ -407,7 +403,7 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($tmp) {
|
if($tmp) {
|
||||||
$this->__takeOverButton("IndApprover", $tmp);
|
$this->printSelectPresetButtonHtml("IndApprover", $tmp);
|
||||||
}
|
}
|
||||||
/* List all mandatory approvers */
|
/* List all mandatory approvers */
|
||||||
if($res) {
|
if($res) {
|
||||||
|
@ -441,7 +437,22 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<td>
|
||||||
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -477,7 +488,7 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($tmp) {
|
if($tmp) {
|
||||||
$this->__takeOverButton("GrpApprover", $tmp);
|
$this->printSelectPresetButtonHtml("GrpApprover", $tmp);
|
||||||
}
|
}
|
||||||
/* List all mandatory groups of approvers */
|
/* List all mandatory groups of approvers */
|
||||||
if($res) {
|
if($res) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user