From 8d8f0026c292436f7656959b681deac83865f7b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Nov 2020 13:06:30 +0100 Subject: [PATCH] Fix switch date to datetime --- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 05d0ffebc41..367faa630ba 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -153,7 +153,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
Contact:con trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>) trans("Type"); ?> -selectarray('type', $type2label, GETPOST('type', 'alpha')); ?> +selectarray('type', $type2label, GETPOST('type', 'alpha'), 0, 0, 0, '', 0, 0, 0, '', '', 1); ?> trans("Size"); ?> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 61971945183..5c1680d9ecb 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -205,7 +205,8 @@ $typewecanchangeinto = array( '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') + 'select'=>array('varchar', 'phone', 'mail', 'url', 'select'), + 'date'=>array('date', 'datetime') ); /* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert if ($size <= 255 && in_array($type, array('text', 'html'))) { @@ -224,6 +225,7 @@ if (in_array($type, array_keys($typewecanchangeinto))) else print ''; } print ''; + print ajax_combobox('type'); } else { print $type2label[$type]; print '';