Fix switch date to datetime
This commit is contained in:
parent
780b8a6fb2
commit
8d8f0026c2
@ -153,7 +153,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php<br>Contact:con
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname', 'alpha'); ?>"> <span class="opacitymedium">(<?php echo $langs->trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</span></td></tr>
|
||||
<!-- Type -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||
<?php print $form->selectarray('type', $type2label, GETPOST('type', 'alpha')); ?>
|
||||
<?php print $form->selectarray('type', $type2label, GETPOST('type', 'alpha'), 0, 0, 0, '', 0, 0, 0, '', '', 1); ?>
|
||||
</td></tr>
|
||||
<!-- Size -->
|
||||
<tr class="extra_size"><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td class="valeur"><input id="size" type="text" name="size" size="5" value="<?php echo (GETPOST('size', 'alpha') ?GETPOST('size', 'alpha') : ''); ?>"></td></tr>
|
||||
|
||||
@ -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 '<option value="'.$key.'" disabled="disabled"'.$selected.'>'.$val.'</option>';
|
||||
}
|
||||
print '</select>';
|
||||
print ajax_combobox('type');
|
||||
} else {
|
||||
print $type2label[$type];
|
||||
print '<input type="hidden" name="type" id="type" value="'.$type.'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user