Merge pull request #2897 from atm-ph/fix_37_create_contact

FIX : create contact with extrafiel is null when it is require
This commit is contained in:
Laurent Destailleur 2015-05-25 19:28:17 +02:00
commit cb0b0fba7c

View File

@ -200,8 +200,12 @@ if (empty($reshook))
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
if ($ret < 0) $error++;
if ($ret < 0)
{
$error++;
$action = 'create';
}
if (! GETPOST("lastname"))
{
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));