From 4a9960797bc84dd65c74131382ec7eede79a342d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 17:27:12 +0200 Subject: [PATCH 1/2] responsive --- htdocs/societe/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 96a9dd7deed..681d4a37fc9 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1401,7 +1401,7 @@ else } $i++; } - if ($j % 2 == 1) print ''; + if ($NBCOLS > 1 && ($j % 2 == 1)) print ''; // Vat is used print ''.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).''; @@ -1445,11 +1445,11 @@ else //TODO: Place into a function to control showing by country or study better option if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { - print ''.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; + print ''.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); - print ''; + print ''; if ($conf->browser->layout == 'phone') print ''; - print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; + print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print ''; } @@ -2019,7 +2019,7 @@ else } $i++; } - if ($j % 2 == 1) print ''; + if ($NBCOLS > 0 && $j % 2 == 1) print ''; // VAT is used print ''.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).''; From a73eccf70d937f15bd9ebb4040e766845f177c9f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 18:41:46 +0200 Subject: [PATCH 2/2] FIX env of browser not loaded in website --- htdocs/core/website.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index b5053fcc814..a00de6a3b01 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -27,6 +27,18 @@ include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; +// Detection browser (copy of code from main.inc.php) +if (isset($_SERVER["HTTP_USER_AGENT"]) && is_object($conf) && empty($conf->browser->name)) +{ + $tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); + $conf->browser->name = $tmp['browsername']; + $conf->browser->os = $tmp['browseros']; + $conf->browser->version = $tmp['browserversion']; + $conf->browser->layout = $tmp['layout']; // 'classic', 'phone', 'tablet' + //var_dump($conf->browser); + + if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover = 1; +} // Define $website if (!is_object($website)) {