Skip to content

Commit

Permalink
Fix list must show only employee
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 21, 2018
1 parent 891ebc0 commit a2b9dbf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htdocs/holiday/define_holiday.php
Expand Up @@ -220,6 +220,7 @@
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
}
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
$filters.= ' AND employee = 1'; // Only employee users are visible

$listUsers = $holiday->fetchUsers(false, true, $filters);
if (is_numeric($listUsers) && $listUsers < 0)
Expand Down Expand Up @@ -356,8 +357,10 @@
print '<td>';
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
print '</td>';

// Button modify
print '<td>';
if (! empty($user->rights->holiday->define_holiday))
if (! empty($user->rights->holiday->define_holiday)) // Allowed to set the balance of any user
{
print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>';
}
Expand Down

0 comments on commit a2b9dbf

Please sign in to comment.