From 94fbcbdad11400265d03fefdb1da47ad8d28eb6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Aug 2021 20:22:50 +0200 Subject: [PATCH] CSS For support page --- htdocs/install/check.php | 55 +++++------ htdocs/install/default.css | 62 +++++++++++- htdocs/support/default.css | 191 ------------------------------------- htdocs/support/inc.php | 9 +- htdocs/support/index.php | 37 ++++--- 5 files changed, 113 insertions(+), 241 deletions(-) delete mode 100644 htdocs/support/default.css diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 99e9e38c958..cf7a1fd8e98 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -26,6 +26,7 @@ * \ingroup install * \brief Test if file conf can be modified and if does not exists, test if install process can create it */ + include_once 'inc.php'; global $langs; @@ -74,7 +75,7 @@ if (!empty($useragent)) { $browserversion = $tmp['browserversion']; $browsername = $tmp['browsername']; if ($browsername == 'ie' && $browserversion < 7) { - print 'Error '.$langs->trans("WarningBrowserTooOld")."
\n"; + print 'Error '.$langs->trans("WarningBrowserTooOld")."
\n"; } } @@ -83,13 +84,13 @@ if (!empty($useragent)) { $arrayphpminversionerror = array(5, 5, 0); $arrayphpminversionwarning = array(5, 6, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { // Minimum to use (error if lower) - print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); + print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok = 0; // 0=error, 1=warning } elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) { // Minimum supported (warning if lower) - print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); + print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); $checksok = 0; // 0=error, 1=warning } else { - print 'Ok '.$langs->trans("PHPVersion")." ".versiontostring(versionphparray()); + print 'Ok '.$langs->trans("PHPVersion")." ".versiontostring(versionphparray()); } if (empty($force_install_nophpinfo)) { print ' ('.$langs->trans("MoreInformation").')'; @@ -99,58 +100,58 @@ print "
\n"; // Check PHP support for $_GET and $_POST if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) { // We must keep $_GET and $_POST here - print 'Warning '.$langs->trans("PHPSupportPOSTGETKo"); + print 'Warning '.$langs->trans("PHPSupportPOSTGETKo"); print ' ('.$langs->trans("Recheck").')'; print "
\n"; $checksok = 0; } else { - print 'Ok '.$langs->trans("PHPSupportPOSTGETOk")."
\n"; + print 'Ok '.$langs->trans("PHPSupportPOSTGETOk")."
\n"; } // Check if session_id is enabled if (!function_exists("session_id")) { - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions")."
\n"; $checksok = 0; } else { - print 'Ok '.$langs->trans("PHPSupportSessions")."
\n"; + print 'Ok '.$langs->trans("PHPSupportSessions")."
\n"; } // Check if GD is supported (we need GD for image conversion) if (!function_exists("imagecreate")) { $langs->load("errors"); - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportGD")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportGD")."
\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) } else { - print 'Ok '.$langs->trans("PHPSupport", "GD")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "GD")."
\n"; } // Check if Curl is supported if (!function_exists("curl_init")) { $langs->load("errors"); - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCurl")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCurl")."
\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) } else { - print 'Ok '.$langs->trans("PHPSupport", "Curl")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "Curl")."
\n"; } // Check if PHP calendar extension is available if (!function_exists("easter_date")) { - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."
\n"; } else { - print 'Ok '.$langs->trans("PHPSupport", "Calendar")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "Calendar")."
\n"; } // Check if UTF8 is supported if (!function_exists("utf8_encode")) { $langs->load("errors"); - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."
\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) } else { - print 'Ok '.$langs->trans("PHPSupport", "UTF8")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "UTF8")."
\n"; } @@ -158,19 +159,19 @@ if (!function_exists("utf8_encode")) { if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') { if (!function_exists("locale_get_primary_language") || !function_exists("locale_get_region")) { $langs->load("errors"); - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportIntl")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportIntl")."
\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) } else { - print 'Ok '.$langs->trans("PHPSupport", "Intl")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "Intl")."
\n"; } } if (!class_exists('ZipArchive')) { $langs->load("errors"); - print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."
\n"; + print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."
\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) } else { - print 'Ok '.$langs->trans("PHPSupport", "ZIP")."
\n"; + print 'Ok '.$langs->trans("PHPSupport", "ZIP")."
\n"; } // Check memory @@ -192,9 +193,9 @@ if ($memmaxorig != '') { } } if ($memmax >= $memrequired || $memmax == -1) { - print 'Ok '.$langs->trans("PHPMemoryOK", $memmaxorig, $memrequiredorig)."
\n"; + print 'Ok '.$langs->trans("PHPMemoryOK", $memmaxorig, $memrequiredorig)."
\n"; } else { - print 'Warning '.$langs->trans("PHPMemoryTooLow", $memmaxorig, $memrequiredorig)."
\n"; + print 'Warning '.$langs->trans("PHPMemoryTooLow", $memmaxorig, $memrequiredorig)."
\n"; } } @@ -244,12 +245,12 @@ if (is_readable($conffile) && filesize($conffile) > 8) { // File is missing and cannot be created if (!file_exists($conffile)) { - print 'Error '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated", $conffiletoshow); - print "

"; + print 'Error '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated", $conffiletoshow); + print '

'; print $langs->trans("YouMustCreateWithPermission", $conffiletoshow); - print "

"; + print '


'."\n"; - print $langs->trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok'); + print ''.$langs->trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok').''; $err++; } else { if (dol_is_dir($conffile)) { @@ -380,7 +381,7 @@ if (!file_exists($conffile)) { $choice .= '
'; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); $choice .= '
'.$langs->trans("InstallChoiceSuggested").'
'; - // Ok '; + // Ok '; } $choice .= ''; diff --git a/htdocs/install/default.css b/htdocs/install/default.css index 85a2f4703c2..88967664ad8 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -16,10 +16,22 @@ */ +.center { + text-align: center; +} + +.centpercent { + width: 100%; +} + .paddingright { padding-right: 4px; } +.valignmiddle { + vertical-align: middle; +} + .opacitymedium { opacity: 0.5; } @@ -28,6 +40,10 @@ display: inline-block; } +.small { + font-size: 0.9em; +} + body { font-size:14px; font-family: roboto,arial,tahoma,verdana,helvetica; @@ -36,14 +52,14 @@ body { } table.main-inside { - padding-left: 10px; - padding-right: 10px; + /*padding-left: 10px; + padding-right: 10px;*/ padding-bottom: 10px; margin-bottom: 10px; margin-top: 10px; color: #000000; border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; + /* border-bottom: 1px solid #ccc; */ line-height: 22px; } @@ -418,3 +434,43 @@ a.button:hover { .text-security { -webkit-text-security: disc; } + + + +/* For support section */ + +.tablesupport { + padding: 6px; + width: 500px; +} + +table.login.tablesupport .title { + background: #eee !important; +} + +.blocksupport { + padding: 12px; + /* width: 90%; */ +} + +table.tablesupport { + min-height: 250px; + border: 1px solid #E0E0E0; + background: #FFF; +} + + +/* Force values for small screen 570 */ +@media only screen and (max-width: 570px) +{ + .blocksupport { + width: 90%; + } + + .tablesupport { + padding: 6px; + width: 100%; + } +} + +} diff --git a/htdocs/support/default.css b/htdocs/support/default.css deleted file mode 100644 index 735224254d3..00000000000 --- a/htdocs/support/default.css +++ /dev/null @@ -1,191 +0,0 @@ -/* Copyright (C) 2004 Rodolphe Quiedeville - * Copyright (C) 2009 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -body { -font-size:14px; -font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; -background: #f9f9f9; -/* background-color: #F4F4F4; */ -margin: 5px 5px; -} - -.center { - text-align: center; -} - -.centpercent { - width: 100%; -} - -.valignmiddle { - vertical-align: middle; -} - -inline-block { - display: inline-block; -} - -div.titre { -padding: 5px 5px 5px 5px; -margin: 0 0 0 0; -} - -span.titre { -font-size: 15px; -font-weight: bold; -background: #FFFFFF; -color: #4965B3; -padding: 5px 5px 5px 5px; -margin: 0 0 0 0; -border: 1px solid #AAAAAA; -} - -div.soustitre { -font-size: 15px; -font-weight: bold; -color: #4965B3; -padding: 0 1.2em 0.5em 2em; -margin: 1.2em 1.2em 1.2em 1.2em; -border-bottom: 1px solid #8CACBB; -border-right: 1px solid #8CACBB; -text-align: right; -} - -input:disabled -{ -background: #FDFDFD; -border: 1px solid #ACBCBB; -padding: 0 0 0 0; -margin: 0 0 0 0; -} - -table.main { -background: #dcdcd3; -text-align: left; -border: 1px solid #8CACBB; -} - -table.tablesupport { - min-height: 250px; -} - -div.ok { -color: #114466; -} - -div.warning { -color: #777711; -} - -div.error { -color: #550000; font-weight: bold; -padding: 0.2em 0.2em 0.2em 0.2em; -margin: 0.5em 0 0.5em 0; -border: 1px solid #6C7C8B; -} - -font.error { -color: #550000; -} - -div.header { -background-color: #dcdff4; -border-bottom: solid black 1px; -padding-left: 5px; -text-align: center; -} - -a:link,a:visited,a:active { - color: #2266DD; - text-decoration:none; -} -a:hover { - color: #2266DD; - text-decoration:underline; -} - -a.titre { -text-decoration:none; -} - - -div.main-inside h2 { -font-size:18px; -font-weight: bold; -color: #4965B3; -} - -tr.bg1 { -background-color: #E5E5E5; -} - -tr.bg2 { -background-color: #B5C5C5; -} - -td.label { -background: #dcdcd3; -color: #5945A3; -padding: 5px 5px 5px 5px; -margin: 0 0 0 0; -border-bottom: 1px solid #8CACBB; -} - -td.comment { -background: #dcdcd3; -color: black; -padding: 5px 5px 5px 5px; -margin: 0 0 0 0; -text-decoration:none; -font-size: 13px; -border-bottom: 1px solid #8CACBB; -} - -.install -{ -border: 1px solid #8CACBB; -padding: 4px 4px 4px 4px; -} - -tr.title -{ -background: #EEEEEE; -} - -table.login { border: 1px solid #E0E0E0; background: #FFF; } - -.tablesupport { - padding: 6px; -} - -.blocksupport { - padding: 12px; - /* width: 90%; */ -} -/* Force values for small screen 570 */ -@media only screen and (max-width: 570px) -{ - .blocksupport { - width: 90%; - } -} - -.inline-block -{ - display:inline-block; - vertical-align: top; -} diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 31236ab5fa9..2836650fe71 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -229,10 +229,9 @@ function conf($dolibarr_main_document_root) */ function pHeader($soutitre, $next, $action = 'none') { - global $conf; - global $langs; - $langs->load("main"); - $langs->load("admin"); + global $conf, $langs; + + $langs->loadLangs(array("main", "admin")); // On force contenu dans format sortie header("Content-type: text/html; charset=".$conf->file->character_set_client); @@ -246,7 +245,7 @@ function pHeader($soutitre, $next, $action = 'none') print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; + print ''."\n"; print ''.$langs->trans("DolibarrHelpCenter").''."\n"; print ''."\n"; diff --git a/htdocs/support/index.php b/htdocs/support/index.php index 220da1290ac..4c80445865b 100644 --- a/htdocs/support/index.php +++ b/htdocs/support/index.php @@ -40,14 +40,15 @@ if (!defined('DOL_URL_ROOT')) { $langs->loadLangs(array("other", $langs->load("help"))); + /* * View */ pHeader($langs->trans("DolibarrHelpCenter"), $_SERVER["PHP_SELF"]); -print '
'.$langs->trans("HelpCenterDesc1")."
\n"; -print $langs->trans("HelpCenterDesc2")."
\n"; +print '
'.$langs->trans("HelpCenterDesc1")."
\n"; +print $langs->trans("HelpCenterDesc2")."

\n"; print '
'; @@ -80,12 +81,14 @@ print ''; print ''; print '