From d00abc7046401776c69387ce0791a993488d154a Mon Sep 17 00:00:00 2001 From: thibdrev Date: Sun, 25 Sep 2022 21:30:15 +0200 Subject: [PATCH 1/6] FIX|Fix #22404 Improve logo tooltip with max uploadsize info --- htdocs/admin/company.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 55d87673a98..ef4e6e64a5b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -27,7 +27,6 @@ * \brief Setup page to configure company/foundation */ -// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -467,7 +466,7 @@ print ''."\n"; // Barcode -if (isModEnabled('barcode')) { +if (!empty($conf->barcode->enabled)) { print ''; print ''; print ''; @@ -475,11 +474,15 @@ if (isModEnabled('barcode')) { print ''; } -// Logo -print ''; -print '
'; +// Tooltip for both Logo and LogSquarred +$tooltiplogo = $langs->trans('AvailableFormats').' : png, jpg, jpeg'; $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; +$tooltiplogo .= ($maxmin > 0) ? '
'.$langs->trans('MaxSize').' : '.$maxmin.' '.$langs->trans('Kb') : ''; + +// Logo +print ''; +print '
'; if ($maxmin > 0) { print ''; // MAX_FILE_SIZE must precede the field type=file } @@ -518,7 +521,7 @@ print '
'; print ''; // Logo (squarred) -print ''; +print ''; print '
'; $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; From 021abc7509650c7fc3302d792e6eeac6954c3483 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Sun, 25 Sep 2022 21:34:36 +0200 Subject: [PATCH 2/6] FIX|Fix Dolibarr#22404 Improve logo tooltip with max uploadsize info --- htdocs/admin/company.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index ef4e6e64a5b..54aa7fcdd74 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -27,6 +27,7 @@ * \brief Setup page to configure company/foundation */ +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -466,7 +467,7 @@ print ''."\n"; // Barcode -if (!empty($conf->barcode->enabled)) { +if (isModEnabled('barcode') { print ''; print ''; print ''; From 439c625b427a293d0b9d932bb53f937c7ab952c2 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Sun, 25 Sep 2022 21:41:39 +0200 Subject: [PATCH 3/6] Add files via upload --- htdocs/admin/company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 54aa7fcdd74..93d37a7973b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -467,7 +467,7 @@ print ''."\n"; // Barcode -if (isModEnabled('barcode') { +if (isModEnabled('barcode')) { print ''; print ''; print ''; From ab2c1aa265d7d38f868caafd92379b03da419b25 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Tue, 27 Sep 2022 18:49:39 +0200 Subject: [PATCH 4/6] typo fix small typo fix in order to be consistent with how menus are described elsewhere in Dolibarr (like this: Menu 1 > Menu 1.1 > Menu 1.1.1). --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 80cd8bb79e2..7819b876ffd 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -179,7 +179,7 @@ class FormFile if (!empty($conf->global->MAIN_UPLOAD_DOC)) { if ($perm) { - $menudolibarrsetupmax = $langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("Security"); + $menudolibarrsetupmax = $langs->transnoentitiesnoconv("Home").' > '.$langs->transnoentitiesnoconv("Setup").' > '.$langs->transnoentitiesnoconv("Security"); $langs->load('other'); $out .= ' '; $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1); From 076dcd542b9cbd205eaae8e9142146dd977cfd07 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Sep 2022 21:00:07 +0200 Subject: [PATCH 5/6] Update html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 7819b876ffd..a0067925334 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -179,7 +179,7 @@ class FormFile if (!empty($conf->global->MAIN_UPLOAD_DOC)) { if ($perm) { - $menudolibarrsetupmax = $langs->transnoentitiesnoconv("Home").' > '.$langs->transnoentitiesnoconv("Setup").' > '.$langs->transnoentitiesnoconv("Security"); + $menudolibarrsetupmax = $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Security"); $langs->load('other'); $out .= ' '; $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1); From bed2497c3b8a278e985a474141ec15e51c369ca1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Sep 2022 21:00:43 +0200 Subject: [PATCH 6/6] Must use HTML instead of XML --- htdocs/admin/company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 93d37a7973b..10615b15fbc 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -479,7 +479,7 @@ if (isModEnabled('barcode')) { $tooltiplogo = $langs->trans('AvailableFormats').' : png, jpg, jpeg'; $maxfilesizearray = getMaxFileSizeArray(); $maxmin = $maxfilesizearray['maxmin']; -$tooltiplogo .= ($maxmin > 0) ? '
'.$langs->trans('MaxSize').' : '.$maxmin.' '.$langs->trans('Kb') : ''; +$tooltiplogo .= ($maxmin > 0) ? '
'.$langs->trans('MaxSize').' : '.$maxmin.' '.$langs->trans('Kb') : ''; // Logo print '';