diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 8723541efda..281a0afb377 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2016 Frédéric France * @@ -187,7 +187,7 @@ if ($resql) print ''; // Type print ''; - $formsocialcontrib->select_type_socialcontrib($typeid,'typeid',1,16,0); + $formsocialcontrib->select_type_socialcontrib($typeid,'typeid',1,0,0,'maxwidth100onsmartphone'); print ''; // Period end date print ' '; diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index e6b31aa4a51..83886e63af8 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -50,11 +50,12 @@ class FormSocialContrib * @param int $useempty Set to 1 if we want an empty value * @param int $maxlen Max length of text in combo box * @param int $help Add or not the admin help picto + * @param string $morecss Add more CSS on select * @return void */ - function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1) + function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300') { - global $db,$langs,$user,$mysoc; + global $conf,$db,$langs,$user,$mysoc; if (empty($mysoc->country_id) && empty($mysoc->country_code)) { @@ -86,7 +87,7 @@ class FormSocialContrib $num = $db->num_rows($resql); if ($num) { - print ''; $i = 0; if ($useempty) print ''; @@ -100,6 +101,7 @@ class FormSocialContrib } print ''; if ($user->admin && $help) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); + if (! empty($conf->use_javascript_ajax)) print ajax_combobox($htmlname); } else {