Merge pull request #22405 from thibdrev/develop
Fix #22404 Improve logo tooltip with max uploadsize info
This commit is contained in:
commit
33dc54f967
@ -475,11 +475,15 @@ if (isModEnabled('barcode')) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logo
|
// Tooltip for both Logo and LogSquarred
|
||||||
print '<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans("Logo"), 'png, jpg').'</label></td><td>';
|
$tooltiplogo = $langs->trans('AvailableFormats').' : png, jpg, jpeg';
|
||||||
print '<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
|
|
||||||
$maxfilesizearray = getMaxFileSizeArray();
|
$maxfilesizearray = getMaxFileSizeArray();
|
||||||
$maxmin = $maxfilesizearray['maxmin'];
|
$maxmin = $maxfilesizearray['maxmin'];
|
||||||
|
$tooltiplogo .= ($maxmin > 0) ? '<br>'.$langs->trans('MaxSize').' : '.$maxmin.' '.$langs->trans('Kb') : '';
|
||||||
|
|
||||||
|
// Logo
|
||||||
|
print '<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans("Logo"), $tooltiplogo).'</label></td><td>';
|
||||||
|
print '<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
|
||||||
if ($maxmin > 0) {
|
if ($maxmin > 0) {
|
||||||
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||||
}
|
}
|
||||||
@ -518,7 +522,7 @@ print '</div>';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Logo (squarred)
|
// Logo (squarred)
|
||||||
print '<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans("LogoSquarred"), 'png, jpg').'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans("LogoSquarred"), $tooltiplogo).'</label></td><td>';
|
||||||
print '<div class="centpercent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
|
print '<div class="centpercent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
|
||||||
$maxfilesizearray = getMaxFileSizeArray();
|
$maxfilesizearray = getMaxFileSizeArray();
|
||||||
$maxmin = $maxfilesizearray['maxmin'];
|
$maxmin = $maxfilesizearray['maxmin'];
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class FormFile
|
|||||||
|
|
||||||
if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
|
if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
|
||||||
if ($perm) {
|
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');
|
$langs->load('other');
|
||||||
$out .= ' ';
|
$out .= ' ';
|
||||||
$out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1);
|
$out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user