Extra fields: add support for the automated translation of extra field's display_text, if the term is found in the language terms

pull/2624/head
Yannick Warnier 6 years ago
parent ab28b822fd
commit 47685b169b
  1. 5
      main/inc/lib/extra_field.lib.php

@ -1049,6 +1049,11 @@ class ExtraField extends Model
$freezeElement = $field_details['visible_to_self'] == 0 || $field_details['changeable'] == 0;
}
$translatedDisplayText = get_lang($field_details['display_text'], true);
if (!empty($translatedDisplayText)) {
$field_details['display_text'] = $translatedDisplayText;
}
switch ($field_details['field_type']) {
case self::FIELD_TYPE_TEXT:
$form->addElement(

Loading…
Cancel
Save