From 0fe65591e80bfcc498a7be55bf9f73275e901ff6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Sep 2022 14:01:41 +0200 Subject: [PATCH] Fix message avec import simulation Fix suggested name of import profile avec a save. Fix trans --- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/imports/import.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 327262ce39f..7f7624b167f 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -747,7 +747,7 @@ class modSociete extends DolibarrModules 's.fk_departement' => "StateCode", 's.fk_pays' => "CountryCode", 's.birthday' => "DateOfBirth", - 's.poste' => "Role", + 's.poste' => "PostOrFunction", 's.phone' => "Phone", 's.phone_perso' => "PhonePerso", 's.phone_mobile' => "PhoneMobile", diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index a66814ce1b1..8916041520d 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -235,6 +235,7 @@ if ($action == 'add_import_model') { $result = $objimport->create($user); if ($result >= 0) { setEventMessages($langs->trans("ImportModelSaved", $objimport->model_name), null, 'mesgs'); + $import_name = ''; } else { $langs->load("errors"); if ($objimport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -1286,7 +1287,7 @@ if ($step == 4 && $datatoimport) { print ''; // Lines for remark - print ''.$langs->trans("Remark").''; + print ''.$langs->trans("Note").''; print '
'; print ''; @@ -1470,8 +1471,8 @@ if ($step == 4 && $datatoimport) { print ''; $nameofimportprofile = str_replace(' ', '-', $langs->trans("ImportProfile").' '.$titleofmodule.' '.dol_print_date(dol_now('gmt'), 'dayxcard')); - if (is_object($objimport) && !empty($objimport->model_name)) { - $nameofimportprofile = $objimport->model_name; + if (GETPOST('import_name')) { // If we have submited a form, we take value used fot the update try + $nameofimportprofile = $import_name; } print ''; @@ -1966,9 +1967,9 @@ if ($step == 5 && $datatoimport) { print '
'; print ''.$langs->trans("NowClickToRunTheImport", $langs->transnoentitiesnoconv("RunImportFile")).'
'; - if (empty($nboferrors)) { + /*if (empty($nboferrors)) { print $langs->trans("DataLoadedWithId", $importid).'
'; - } + }*/ print '
'; print '
';