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>
|
<tr>
|
||||||
<td><?php printMLText("owner");?>:</td>
|
<td><?php printMLText("owner");?>:</td>
|
||||||
<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'); ?>">
|
<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>
|
<option value=""></option>
|
||||||
<?php
|
<?php
|
||||||
foreach ($allUsers as $userObj) {
|
foreach ($allUsers as $userObj) {
|
||||||
if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin()))
|
if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin()))
|
||||||
continue;
|
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>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user