Skip to content

Commit

Permalink
fix access select vs email select
Browse files Browse the repository at this point in the history
fix #63
  • Loading branch information
patrickmj committed Mar 29, 2017
1 parent a78f27c commit 7bb2bf1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions views/shared/exhibit_layouts/editorial-block/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,14 @@
<?php if (! empty($usersForSelect) && $changeAllowed): ?>
<div class='users-select'>
<?php
unset($usersForSelect[$blockOwner->id]);
unset($usersForSelect[$currentUser->id]);
$usersForAccessSelect = $usersForSelect;
unset($usersForAccessSelect[$blockOwner->id]);
unset($usersForAccessSelect[$currentUser->id]);
echo $this->formLabel($formStem.'[options][allowed_users]', __('Grant Access To:'));
echo $this->formSelect($formStem.'[options][allowed_users]',
@$options['allowed_users'],
array('multiple' => true, 'size' => 10),
$usersForSelect
$usersForAccessSelect
);
?>

Expand Down Expand Up @@ -188,9 +189,11 @@

if (isset($options['allowed_users'])) {
foreach ($usersForSelect as $userId => $name) {
debug($userId);
if (in_array($userId, $options['allowed_users'])) {
if ($userId == $currentUser->id) {
$recipientsArray[$userId] = $name.' '.__('(You)');
debug($userId);
$recipientsArray[$userId] = $name. ' ' . __('(You)');
} else {
$recipientsArray[$userId] = $name;
}
Expand Down

0 comments on commit 7bb2bf1

Please sign in to comment.