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))
{
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).' | ';
|