forked from Wavyzz/dolibarr
Fixed: Avoid spaces into address string
This commit is contained in:
@@ -749,10 +749,13 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
|||||||
$displaytab=$i;
|
$displaytab=$i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$out.="</div>\n";
|
||||||
|
|
||||||
if ($displaytab > $limittoshow)
|
if ($displaytab > $limittoshow)
|
||||||
{
|
{
|
||||||
$out.='<div id=moretabs class="inline-block tabsElem"><a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">Plus</a>';
|
$out.='<div id="moretabs" class="inline-block tabsElem">';
|
||||||
$out.='<div id=moretabsList style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div></div>';
|
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
|
||||||
|
$out.='<div id="moretabsList" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
||||||
$out.="</div>\n";
|
$out.="</div>\n";
|
||||||
|
|
||||||
$out.="<script>";
|
$out.="<script>";
|
||||||
@@ -844,7 +847,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
|||||||
else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country
|
else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country
|
||||||
{
|
{
|
||||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||||
$ret .= ' '.$object->town;
|
$ret .= ($object->town?' '.$object->town:'');
|
||||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||||
{
|
{
|
||||||
$ret.="\n".$object->state;
|
$ret.="\n".$object->state;
|
||||||
@@ -854,14 +857,14 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
|||||||
else // Other: title firstname name \n address lines \n zip town \n country
|
else // Other: title firstname name \n address lines \n zip town \n country
|
||||||
{
|
{
|
||||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||||
$ret .= ' '.$object->town;
|
$ret .= ($object->town?' '.$object->town:'');
|
||||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||||
{
|
{
|
||||||
$ret.=", ".$object->state;
|
$ret.=", ".$object->state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
if ($withcountry) $ret.=($object->country_code?($ret?$sep:'').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user