This commit is contained in:
Laurent Destailleur 2024-09-03 17:50:36 +02:00
parent dd930e2d4b
commit d2608dfb08
2 changed files with 17 additions and 17 deletions

View file

@ -312,7 +312,7 @@ if ($statut != '') {
$param .= "&statut=".urlencode($statut);
}
if ($search_type) {
$param .= "&search_type=".urlencode($search_type);
$param .= "&search_type=".((int) $search_type);
}
if ($date_select) {
$param .= "&date_select=".urlencode($date_select);

View file

@ -8588,23 +8588,23 @@ class Form
* Return a HTML select string, built from an array of key+value.
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
*
* @param string $htmlname Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect
* @param string $htmlname Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect
* @param array{label:string,data-html:string,disable?:int<0,1>,css?:string} $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...))
* @param string|string[] $id Preselected key or array of preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record.
* @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or '&nbsp;', If placeholder string: key is -1 and value is the string), <0 to add an empty value with key that is this value.
* @param int<0,1> $key_in_label 1 to show key into label with format "[key] value"
* @param int<0,1> $value_as_key 1 to use value as key
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @param int<0,1> $translate 1=Translate and encode value
* @param int $maxlen Length maximum for labels
* @param int<0,1> $disabled Html select box is disabled
* @param string $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' or 'POS' = Do not sort, we keep original order
* @param string $morecss Add more class to css styles
* @param int $addjscombo Add js combo
* @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set
* @param int $disablebademail 1=Check if a not valid email, 2=Check string '---', and if found into value, disable and colorize entry
* @param int $nohtmlescape No html escaping (not recommended, use 'data-html' if you need to use label with HTML content).
* @return string HTML select string.
* @param string|string[]|int $id Preselected key or array of preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record.
* @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or '&nbsp;', If placeholder string: key is -1 and value is the string), <0 to add an empty value with key that is this value.
* @param int<0,1> $key_in_label 1 to show key into label with format "[key] value"
* @param int<0,1> $value_as_key 1 to use value as key
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @param int<0,1> $translate 1=Translate and encode value
* @param int $maxlen Length maximum for labels
* @param int<0,1> $disabled Html select box is disabled
* @param string $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' or 'POS' = Do not sort, we keep original order
* @param string $morecss Add more class to css styles
* @param int $addjscombo Add js combo
* @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set
* @param int $disablebademail 1=Check if a not valid email, 2=Check string '---', and if found into value, disable and colorize entry
* @param int $nohtmlescape No html escaping (not recommended, use 'data-html' if you need to use label with HTML content).
* @return string HTML select string.
* @see multiselectarray(), selectArrayAjax(), selectArrayFilter()
*/
public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = 'minwidth75', $addjscombo = 1, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0)