From 04536f9ec8bd641f8e97f8550f1b401fe693c7bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Apr 2021 17:49:13 +0200 Subject: [PATCH] Fix import --- htdocs/imports/import.php | 25 +++++++++++-------- .../{ => phpspreadsheet/src}/autoloader.php | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) rename htdocs/includes/phpoffice/{ => phpspreadsheet/src}/autoloader.php (81%) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index f484e3b0901..0783e6352a4 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -492,12 +492,16 @@ if ($step == 2 && $datatoimport) { print ''; print ''; + print '
'; + print ''; $s = $langs->trans("ChooseFormatOfFileToImport", '{s1}'); $s = str_replace('{s1}', img_picto('', 'next'), $s); print $s; print '

'; + print '
'; + print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; @@ -513,7 +517,9 @@ if ($step == 2 && $datatoimport) { print ''; $text = $objmodelimport->getDriverDescForKey($key); print ''; - print ''; + print ''; // Action button print '
'.img_picto_common($key, $objmodelimport->getPictoForKey($key)).''.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).''.$langs->trans("DownloadEmptyExample").''; + print img_picto('', 'download', 'class="paddingright opacitymedium"').''.$langs->trans("DownloadEmptyExample").''; + print ''; print ''.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15x"').''; @@ -587,7 +593,7 @@ if ($step == 3 && $datatoimport) { print '
'; print '
'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '
'; print '
'; @@ -598,8 +604,8 @@ if ($step == 3 && $datatoimport) { print ''; $text = $objmodelimport->getDriverDescForKey($format); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text); - print ''.$langs->trans("DownloadEmptyExample").''; - + print ''; + print img_picto('', 'download', 'class="paddingright opacitymedium"').''.$langs->trans("DownloadEmptyExample").''; print ''; print ''; @@ -890,7 +896,7 @@ if ($step == 4 && $datatoimport) { print ''; print '
'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '
'; print '
'; @@ -1374,7 +1380,7 @@ if ($step == 5 && $datatoimport) { print ''; print '
'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '
'; print '
'; @@ -1468,7 +1474,7 @@ if ($step == 5 && $datatoimport) { print '
'; - print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', ''); + print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', 'file-import'); print '
'; print '
'; @@ -1812,7 +1818,7 @@ if ($step == 6 && $datatoimport) { print ''; print '
'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '
'; print '
'; @@ -1875,8 +1881,7 @@ if ($step == 6 && $datatoimport) { print ''.$langs->trans("InformationOnTargetTables").''; print '
'; print '
'; - print ''; - //print ''; + print '
'.$langs->trans("InformationOnTargetTables").'
'; // Tables imported print '
'; diff --git a/htdocs/includes/phpoffice/autoloader.php b/htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php similarity index 81% rename from htdocs/includes/phpoffice/autoloader.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php index 71e94e9b738..809725dfb6f 100644 --- a/htdocs/includes/phpoffice/autoloader.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php @@ -5,6 +5,6 @@ spl_autoload_register(function ($class_name) { if (1 === $preg_match) { $class_name = preg_replace('/\\\/', '/', $class_name); $class_name = preg_replace('/^PhpOffice\\/PhpSpreadsheet\\//', '', $class_name); - require_once(__DIR__ . '/PhpSpreadsheet/' . $class_name . '.php'); + require_once __DIR__ . '/PhpSpreadsheet/' . $class_name . '.php'; } });