diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 28a61ce5190..bec9388a0ed 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -219,7 +220,10 @@ if (empty($reshook)) $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); $object->birthday_alert = GETPOST("birthday_alert", 'alpha'); - // Fill array 'array_options' with data from add form + //Default language + $object->default_lang = GETPOST('default_lang'); + + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) { @@ -402,7 +406,10 @@ if (empty($reshook)) $object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty - // Fill array 'array_options' with data from add form + //Default language + $object->default_lang = GETPOST('default_lang'); + + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); if ($ret < 0) $error++; @@ -521,6 +528,7 @@ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); $form = new Form($db); +$formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; @@ -843,6 +851,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print $form->selectarray('priv', $selectarray, (GETPOST("priv", 'alpha') ?GETPOST("priv", 'alpha') : $object->priv), 0); print ''; + //Default language + if (!empty($conf->global->MAIN_MULTILANGS)) + { + print '