diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5486b57d3d4..94d9c25a7bd 100755 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2011 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ * \file htdocs/core/class/extrafields.class.php * \ingroup core * \brief File of class to manage extra fields - * \version $Id: extrafields.class.php,v 1.6 2011/07/31 23:45:14 eldy Exp $ + * \version $Id: extrafields.class.php,v 1.7 2011/08/08 12:28:08 hregis Exp $ */ /** @@ -405,6 +405,8 @@ class ExtraFields */ function showInputField($key,$value,$moreparam='') { + global $conf; + $label=$this->attribute_label[$key]; $type=$this->attribute_type[$key]; $size=$this->attribute_size[$key]; @@ -426,10 +428,19 @@ class ExtraFields $showsize=round($size); if ($showsize > 48) $showsize=48; } - //print $type.'-'.$size; - $out=''; - if ($type == 'date') $out.=' (YYYY-MM-DD)'; - if ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)'; + + if ($type == 'varchar') + { + $out=''; + } + else if ($type == 'text') + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('options_'.$key,$value,'',360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,5,100); + $out=$doleditor->Create(1); + } + else if ($type == 'date') $out.=' (YYYY-MM-DD)'; + else if ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)'; return $out; }