diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index abb5751a986..c82cffc420a 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -253,9 +253,9 @@ class FormTicket console.log("We called groupticketchange, so we try to load list KM linked to event"); $("#KWwithajax").html(""); idgroupticket = $("#selectcategory_code").val(); - + console.log("We have selected id="+idgroupticket); - + if (idgroupticket != "") { $.ajax({ url: \''.DOL_URL_ROOT.'/core/ajax/fetchKnowledgeRecord.php\', data: { action: \'getKnowledgeRecord\', idticketgroup: idgroupticket, token: \''.newToken().'\', lang:\''.$langs->defaultlang.'\', popupurl:false}, @@ -292,7 +292,7 @@ class FormTicket attributes: true }); } - + trackChange($("#selectcategory_code")[0]); if ($("#selectcategory_code").val() != "") { @@ -757,8 +757,11 @@ class FormTicket } elseif ($htmlname!='') { $groupticket=GETPOST($htmlname, 'aZ09'); $child_id=GETPOST($htmlname.'_child_id', 'aZ09')?GETPOST($htmlname.'_child_id', 'aZ09'):0; - $arraycodenotparent[] = ""; + $arrayidused = array(); + $arrayidusedconcat = array(); + $arraycodenotparent = array(); + $stringtoprint = ''.$langs->trans("GroupOfTicket").' '; $stringtoprint .= ' '; - $levelid = 1; - while ($levelid <= $use_multilevel) { + $levelid = 1; // The first combobox + while ($levelid <= $use_multilevel) { // Loop to take the child of the combo $tabscript = array(); $stringtoprint .= ''; $stringtoprint .='