Skip to content

Commit

Permalink
feat(dropdown): show serial and inventory number when available
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jun 8, 2019
1 parent f3235ad commit bb92244
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions inc/fields/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ public function displayField($canEdit = true) {
$dparams['condition'] = $dparams_cond_crit;
}

$emptyItem = new $itemtype();
$emptyItem->getEmpty();
$dparams['displaywith'] = [];
if (isset($emptyItem->fields['serial'])) {
$dparams['displaywith'][] = 'serial';
}
if (isset($emptyItem->fields['otherserial'])) {
$dparams['displaywith'][] = 'otherserial';
}

$itemtype::dropdown($dparams);
}
echo PHP_EOL;
Expand Down

0 comments on commit bb92244

Please sign in to comment.