From 4adaf67d4742b3a78f7252c635430329d06a8dbb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Oct 2020 11:40:30 +0100 Subject: [PATCH] Hide setup we don't need if email are disabled globally CSS --- htdocs/admin/mails.php | 378 +++++++++++++++-------------- htdocs/core/lib/functions.lib.php | 5 +- htdocs/index.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 10 +- htdocs/theme/md/info-box.inc.php | 15 +- 5 files changed, 216 insertions(+), 194 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 17846b05452..c3792812210 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -529,209 +529,213 @@ if ($action == 'edit') if (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) print img_warning($langs->trans("Disabled")); print ''; - // Force e-mail recipient - print ''.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.$conf->global->MAIN_MAIL_FORCE_SENDTO; - if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) - { - if (!isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail")); - else print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue")); + if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { + // Force e-mail recipient + print ''.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.$conf->global->MAIN_MAIL_FORCE_SENDTO; + if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) + { + if (!isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail")); + else print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue")); + } + print ''; } - print ''; print ''; - print '
'; + if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { + print '
'; - print ''; - print ''; + print '
'.$langs->trans("MAIN_MAIL_SENDMODE").'
'; + print ''; - // Method - print ''; + print ''; - // Host server - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) - { - print ''; - } else { - print ''; - } - - // Port - if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) - { - print ''; - } else { - print ''; - } - - // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) - { - print ''; - } - - // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) - { - print ''; - } - - // TLS - print ''; + print ''; + } else { + print ''; + } - // STARTTLS - print ''; + print ''; + } else { + print ''; + } - // SMTP_ALLOW_SELF_SIGNED - print ''; + print ''; + } + // SMTPS PW + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) + { + print ''; + } - if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer') - { - // DKIM - print ''; - // Domain - print ''; - print ''; - - // Selector - print ''; - print ''; - - // PRIVATE KEY - print ''; - print ''; - } - - print '
'.$langs->trans("MAIN_MAIL_SENDMODE").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; - $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; - if (empty($text)) $text = $langs->trans("Undefined").img_warning(); - print $text; + // Method + print '
'.$langs->trans("MAIN_MAIL_SENDMODE").''; + $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; + if (empty($text)) $text = $langs->trans("Undefined").img_warning(); + print $text; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { - print $form->textwithpicto('', $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 1, 'warning'); - } + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + print $form->textwithpicto('', $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 1, 'warning'); + } - print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) - { - if (function_exists('openssl_open')) + // Host server + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { - print yn($conf->global->MAIN_MAIL_EMAIL_TLS); - } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; - print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').'
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) - { - if (function_exists('openssl_open')) + // Port + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { - print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS); - } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; - print '
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) - { - if (function_exists('openssl_open')) + // SMTPS ID + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { - print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED); - } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; - print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW).'
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('swiftmailer'))) + // TLS + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print yn($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED); + print yn($conf->global->MAIN_MAIL_EMAIL_TLS); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; - print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; - print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; - print '
'; - - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { - print info_admin($langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 0, 0, 'warning'); - } - - print '
'; - - print ''; - print ''; - - // From - print ''; - print ''; - - // Default from type - $liste = array(); - $liste['user'] = $langs->trans('UserEmail'); - $liste['company'] = $langs->trans('CompanyEmail').' ('.(empty($conf->global->MAIN_INFO_SOCIETE_MAIL) ? $langs->trans("NotDefined") : $conf->global->MAIN_INFO_SOCIETE_MAIL).')'; - $sql = 'SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile'; - $sql .= ' WHERE active = 1 AND (private = 0 OR private = '.$user->id.')'; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) + // STARTTLS + print ''; - print ''; - print ''; + + + if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer') + { + // DKIM + print ''; + + // Domain + print ''; + print ''; + + // Selector + print ''; + print ''; + + // PRIVATE KEY + print ''; + print ''; } + + print '
'.$langs->trans("OtherOptions").'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_EMAIL_FROM; - if (!empty($conf->global->MAIN_MAIL_EMAIL_FROM) && !isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail")); - print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { - $obj = $db->fetch_object($resql); - if ($obj) + if (function_exists('openssl_open')) { - $liste['senderprofile_'.$obj->rowid] = $obj->label.' <'.$obj->email.'>'; - } - $i++; - } - } else dol_print_error($db); + print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; - if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'robot') - { - print $langs->trans('RobotEmail'); - } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') - { - print $langs->trans('UserEmail'); - } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') - { - print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>'); - } else { - $id = preg_replace('/senderprofile_/', '', $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE); - if ($id > 0) + // SMTP_ALLOW_SELF_SIGNED + print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { - include_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php'; - $emailsenderprofile = new EmailSenderProfile($db); - $emailsenderprofile->fetch($id); - print $emailsenderprofile->label.' '.dol_escape_htmltag('<'.$emailsenderprofile->email.'>'); + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").''.$conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; + print '
'; + + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + print info_admin($langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC").'

'.$langs->trans("WarningPHPMailD"), 0, 0, 'warning'); + } + + print '
'; + + print ''; + print ''; + + // From + print ''; + print ''; + + // Default from type + $liste = array(); + $liste['user'] = $langs->trans('UserEmail'); + $liste['company'] = $langs->trans('CompanyEmail').' ('.(empty($conf->global->MAIN_INFO_SOCIETE_MAIL) ? $langs->trans("NotDefined") : $conf->global->MAIN_INFO_SOCIETE_MAIL).')'; + $sql = 'SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile'; + $sql .= ' WHERE active = 1 AND (private = 0 OR private = '.$user->id.')'; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + if ($obj) + { + $liste['senderprofile_'.$obj->rowid] = $obj->label.' <'.$obj->email.'>'; + } + $i++; + } + } else dol_print_error($db); + + print ''; + print ''; + + // Errors To + print ''; + print ''; + + // Autocopy to + print ''; + print ''; + + //Add user to select destinaries list + print ''; + + print '
'.$langs->trans("OtherOptions").'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_EMAIL_FROM; + if (!empty($conf->global->MAIN_MAIL_EMAIL_FROM) && !isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail")); + print '
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; + if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'robot') + { + print $langs->trans('RobotEmail'); + } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') + { + print $langs->trans('UserEmail'); + } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') + { + print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>'); + } else { + $id = preg_replace('/senderprofile_/', '', $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE); + if ($id > 0) + { + include_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php'; + $emailsenderprofile = new EmailSenderProfile($db); + $emailsenderprofile->fetch($id); + print $emailsenderprofile->label.' '.dol_escape_htmltag('<'.$emailsenderprofile->email.'>'); + } + } + print '
'.$langs->trans("MAIN_MAIL_ERRORS_TO").''.$conf->global->MAIN_MAIL_ERRORS_TO; + if (!empty($conf->global->MAIN_MAIL_ERRORS_TO) && !isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail")); + print '
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; + if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) + { + print $conf->global->MAIN_MAIL_AUTOCOPY_TO; + if (!isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail")); + } else { + print ' '; + } + print '
'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'
'; } - print ''; - - // Errors To - print ''.$langs->trans("MAIN_MAIL_ERRORS_TO").''; - print ''.$conf->global->MAIN_MAIL_ERRORS_TO; - if (!empty($conf->global->MAIN_MAIL_ERRORS_TO) && !isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail")); - print ''; - - // Autocopy to - print ''.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; - print ''; - if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) - { - print $conf->global->MAIN_MAIL_AUTOCOPY_TO; - if (!isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail")); - } else { - print ' '; - } - print ''; - - //Add user to select destinaries list - print ''.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).''; - - print ''; dol_fiche_end(); @@ -741,21 +745,23 @@ if ($action == 'edit') print ''.$langs->trans("Modify").''; - if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) - { - if (function_exists('fsockopen') && $port && $server) + if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { + if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) { - print ''.$langs->trans("DoTestServerAvailability").''; + if (function_exists('fsockopen') && $port && $server) + { + print ''.$langs->trans("DoTestServerAvailability").''; + } + } else { + print ''.$langs->trans("DoTestServerAvailability").''; } - } else { - print ''.$langs->trans("DoTestServerAvailability").''; - } - print ''.$langs->trans("DoTestSend").''; + print ''.$langs->trans("DoTestSend").''; - if (!empty($conf->fckeditor->enabled)) - { - print ''.$langs->trans("DoTestSendHTML").''; + if (!empty($conf->fckeditor->enabled)) + { + print ''.$langs->trans("DoTestSendHTML").''; + } } print ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1f54af58ff0..a3eb00a38ec 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1456,6 +1456,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab * * @param int $notab -1 or 0=Add tab footer, 1=no tab footer * @return void + * @deprecated Use print dol_get_fiche_end() instead */ function dol_fiche_end($notab = 0) { @@ -3316,9 +3317,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $enabledisablehtml = ''; - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + /*if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $enabledisablehtml .= $titlealt; - } + }*/ $enabledisablehtml .= ''; return $enabledisablehtml; diff --git a/htdocs/index.php b/htdocs/index.php index 492dd7b0ec2..ebc343b5e8d 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -916,7 +916,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) $boxstat .= '
'; $boxstat .= ''; $boxstat .= ''; - $boxstat .= ''; $boxstat .= ''; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 9bbc4101065..811a3cac853 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -435,19 +435,20 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = min-width: 350px; max-width: 350px; } + @media only screen and (max-width: 1740px) { .info-box-module { min-width: 315px; max-width: 315px; } } + @media only screen and (max-width: 767px) { .info-box-module { min-width: 260px; } } - .info-box-module .info-box-content { height: 98px; } @@ -463,9 +464,14 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = margin: 0 0 0 0px !important; width: 100% !important; } - .info-box-module { width: 100%; max-width: unset; } + .info-box-sm .info-box-icon { + width: 60px; + } + .info-box-sm .info-box-content { + margin-left: 60px; + } } diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 9b4b0618dd9..a784a1ec7d9 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -473,6 +473,12 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = min-width: 350px; max-width: 350px; } + +.info-box-module .info-box-content { + height: 6.3em; +} + + @media only screen and (max-width: 1740px) { .info-box-module { min-width: 315px; @@ -483,8 +489,11 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = .info-box-module { min-width: 260px; } + .info-box-sm .info-box-icon { + width: 60px; + } + .info-box-sm .info-box-content { + margin-left: 60px; + } } -.info-box-module .info-box-content { - height: 6.3em; -}
'; + $boxstat .= ''; $boxstat .= '
'.$langs->trans("DolibarrStateBoard").'
'; $boxstat .= '