Merge pull request #14714 from bafbes/abb120141

fix: unuseful truncations in extrafield select lists
This commit is contained in:
Laurent Destailleur 2020-09-12 01:08:08 +02:00 committed by GitHub
commit 95fb79c749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1218,13 +1218,13 @@ class ExtraFields
} else {
$labeltoshow = $obj->{$InfoFieldList[1]};
}
$labeltoshow = dol_trunc($labeltoshow, 45);
$labeltoshow = $labeltoshow;
if ($value == $obj->rowid) {
if (!$notrans) {
foreach ($fields_label as $field_toshow) {
$translabel = $langs->trans($obj->$field_toshow);
$labeltoshow = dol_trunc($translabel, 18).' ';
$labeltoshow = $translabel.' ';
}
}
$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';