diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index f092ebe4b73f456c1d37db85d13dab6d97991053..98678e758ec06c2c94e9f347aa17eb546410fef8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1192,7 +1192,7 @@ function fieldList($fieldlist,$obj='',$tabname='') if ($fieldlist[$field] == 'pays') { if (in_array('region_id',$fieldlist)) { print '<td> </td>'; continue; } // For region page, we do not show the country input print '<td>'; - print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')),'pays'); + print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28); print '</td>'; } elseif ($fieldlist[$field] == 'pays_id') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index cab56780ed82a51f31f8d5708433c3e02c910eba..2b5cd5e6dde73d44418c008409ebeba710cf5b34 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -443,9 +443,10 @@ class Form * @param string $selected Id or Code or Label of preselected country * @param string $htmlname Name of html select object * @param string $htmloption Options html on select object + * @param string $maxlength Max length for labels (0=no limit) * @return string HTML string with select */ - function select_country($selected='',$htmlname='pays_id',$htmloption='') + function select_country($selected='',$htmlname='pays_id',$htmloption='',$maxlength=0) { global $conf,$langs; @@ -495,7 +496,7 @@ class Form { $out.= '<option value="'.$row['rowid'].'">'; } - $out.= $row['label']; + $out.= dol_trunc($row['label'],$maxlength,'middle'); if ($row['code_iso']) $out.= ' ('.$row['code_iso'] . ')'; $out.= '</option>'; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d3f05528298dc378b42132d6f650fdf2a8781849..fb02f0a2e0eea079d55836deb8dc1ce488bb7483 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1298,7 +1298,9 @@ Buy=Buy Sell=Sell InvoiceDateUsed=Invoice date used YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Foundation), so there is no VAT options to setup. -AccountancyCode=Accountancy Code +AccountancyCode=Accountancy Code +AccountancyCodeSell=Sale account. code +AccountancyCodeBuy=Purchase account. code ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link