mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-29 04:57:20 +00:00
fix selection of owner
This commit is contained in:
parent
0ebd044cac
commit
904eef7816
|
@ -158,16 +158,13 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
<tr>
|
||||
<td><?php printMLText("owner");?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$ownerids = array_map(function($n) {return $n->getId();}, $owner);
|
||||
?>
|
||||
<select class="chzn-select" name="owner[]" data-allow-clear="true" data-placeholder="<?php printMLText('select_users'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
|
||||
<option value=""></option>
|
||||
<?php
|
||||
foreach ($allUsers as $userObj) {
|
||||
if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin()))
|
||||
continue;
|
||||
print "<option value=\"".$userObj->getLogin()."\" ".(in_array($userObj->getId(), $ownerids) ? "selected" : "").">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "</option>\n";
|
||||
print "<option value=\"".$userObj->getLogin()."\" ".(in_array($userObj->getLogin(), $owner) ? "selected" : "").">" . htmlspecialchars($userObj->getLogin()." - ".$userObj->getFullName()) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue
Block a user