From 3346fb1c75ed4bed8e3bfbdac3f3d25ac4d9be1e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Nov 2016 17:30:48 +0100 Subject: [PATCH] Fix can change type from url to other string --- htdocs/core/class/extrafields.class.php | 4 ++-- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5034be1c901..8479bab7563 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1243,7 +1243,7 @@ class ExtraFields } elseif ($type == 'mail') { - $value=dol_print_email($value); + $value=dol_print_email($value,0,0,0,64,1,1); } elseif ($type == 'url') { @@ -1251,7 +1251,7 @@ class ExtraFields } elseif ($type == 'phone') { - $value=dol_print_phone($value); + $value=dol_print_phone($value, '', 0, 0, '', ' ', 1); } elseif ($type == 'price') { diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 881ec69190b..b6c43b10ce9 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -131,6 +131,7 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') ) $typewecanchangeinto=array( 'varchar'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), + 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'select'=>array('varchar', 'phone', 'mail', 'url', 'select') );