diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 13b999aced9..68124630713 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1789,6 +1789,8 @@ class ExtraFields $langfile = $this->attributes[$extrafieldsobjectkey]['langfile'][$key]; $list = (string) dol_eval($this->attributes[$extrafieldsobjectkey]['list'][$key], 1, 1, '2'); $help = $this->attributes[$extrafieldsobjectkey]['help'][$key]; + $cssview = $this->attributes[$extrafieldsobjectkey]['cssview'][$key]; + $hidden = (empty($list) ? 1 : 0); // If $list empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller) if ($hidden) { @@ -2116,7 +2118,7 @@ class ExtraFields $value = ''; } } elseif ($type == 'text') { - $value = dol_htmlentitiesbr($value); + $value = '
'.dol_htmlentitiesbr($value).'
'; } elseif ($type == 'html') { $value = dol_htmlentitiesbr($value); } elseif ($type == 'password') { @@ -2143,8 +2145,6 @@ class ExtraFields */ public function getAlignFlag($key, $extrafieldsobjectkey = '') { - global $conf, $langs; - $type = 'varchar'; if (!empty($extrafieldsobjectkey)) { $type = $this->attributes[$extrafieldsobjectkey]['type'][$key]; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index ac5c3f815cb..2d331ed29b7 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2421,7 +2421,7 @@ CssOnEdit=CSS on edit pages CssOnView=CSS on view pages CssOnList=CSS on lists HelpCssOnEditDesc=The CSS used when editing the field.
Example: "minwiwdth100 maxwidth500 widthcentpercentminusx" -HelpCssOnViewDesc=The CSS used when viewing the field. +HelpCssOnViewDesc=The CSS used when viewing the field.
Example: "longmessagecut" HelpCssOnListDesc=The CSS used when field is inside a list table.
Example: "tdoverflowmax200" RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 72224fea8d8..bdb8c03d9d1 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1071,6 +1071,12 @@ td.wordbreak img, td.wordbreakimp img { .text-warning{ color : } +/* CSS used for extrafield text */ +.shortmessagecut { + max-height: 125px; + max-width: 100%; + overflow-y: auto; +} .longmessagecut { max-height: 250px; max-width: 100%; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 4a03d404a81..8f24dad1b51 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1256,6 +1256,12 @@ td.wordbreak img, td.wordbreakimp img { .text-warning{ color : } +/* CSS used for extrafield text */ +.shortmessagecut { + max-height: 125px; + max-width: 100%; + overflow-y: auto; +} .longmessagecut { max-height: 250px; max-width: 100%;