From 75b6dc6f6159af51f610507412a2a91e8eb52cfe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 May 2018 12:23:39 +0200 Subject: [PATCH 1/4] Update modulebuilder.lib.php --- htdocs/core/lib/modulebuilder.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 81cf2b99c55..5066983d074 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -64,7 +64,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir=' return -2; } - if (! preg_match('/^(price|boolean|sellist|integer|date|timestamp|varchar|double)/', $addfieldentry['type'])) + if (! preg_match('/^(price|boolean|sellist|integer|date|timestamp|varchar|double|text|html)/', $addfieldentry['type'])) { setEventMessages($langs->trans('BadFormatForType', $objectname), null, 'errors'); From 86b1904a4198abfc93e265940cf07ab63bb1a98f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 May 2018 12:33:30 +0200 Subject: [PATCH 2/4] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 62c3176e829..1db8ebd2697 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5044,13 +5044,13 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $form=new Form($this->db); } -$val=$this->fields[$key]; + + $val=$this->fields[$key]; $out=''; $type=''; $param['options']=array(); $size =$this->fields[$key]['size']; - $keyprefix = $keyprefix.'options_'; // Because we work on extrafields if(preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)){ $param['options']=array($reg[1].':'.$reg[2]=>'N'); From 770e97431b11d5f29971c7ed751613517b345602 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 May 2018 12:36:38 +0200 Subject: [PATCH 3/4] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1db8ebd2697..1affb952905 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5081,7 +5081,6 @@ abstract class CommonObject } $label=$this->fields[$key]['label']; - $size =$this->fields[$key]['size']; //$elementtype=$this->fields[$key]['elementtype']; // Seems not used $default=$this->fields[$key]['default']; $computed=$this->fields[$key]['computed']; @@ -5108,7 +5107,6 @@ abstract class CommonObject $showsize = $val['css']; } if (empty($morecss)) - { if ($type == 'date') { From f3713844ee87b9cf3d8a3920d4224370bf327678 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 May 2018 12:38:01 +0200 Subject: [PATCH 4/4] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1affb952905..a506ae544bd 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5033,10 +5033,11 @@ abstract class CommonObject * @param string $moreparam To add more parameters on html input tag * @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names) - * @param string|int $showsize Value for css to define size. May also be a numeric. + * @param string|int $morecss Value for css to define style/length of field. May also be a numeric. * @return string */ - function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss=0){ + function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss=0) + { global $conf,$langs,$form; if (! is_object($form))