NEW: for developper select_dictionnry can now deal with label translated
This commit is contained in:
parent
02632e9e88
commit
be44e5b0ca
@ -1382,12 +1382,12 @@ class FormOther
|
|||||||
|
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
if ($selected == $obj->rowid || $selected == $obj->$keyfield) {
|
if ($selected == $obj->rowid || $selected == $obj->{$keyfield}) {
|
||||||
print '<option value="'.$obj->$keyfield.'" selected>';
|
print '<option value="'.$obj->{$keyfield}.'" selected>';
|
||||||
} else {
|
} else {
|
||||||
print '<option value="'.$obj->$keyfield.'">';
|
print '<option value="'.$obj->{$keyfield}.'">';
|
||||||
}
|
}
|
||||||
print $obj->$labelfield;
|
$label = ($langs->trans($dictionarytable.$obj->{$keyfield}) != ($dictionarytable.$obj->{$labelfield}) ? $langs->trans($dictionarytable.$obj->{$keyfield}) : $obj->{$labelfield});
|
||||||
print '</option>';
|
print '</option>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user