From 3ea9ca350cddbdb1d11de2b5253303e79d04d415 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 26 Mar 2024 13:22:51 +0100 Subject: [PATCH] Fix arguments to dol_get_fiche_head --- htdocs/core/class/html.formticket.class.php | 31 +++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index a5bf6539ac3..aac53b58353 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2021 Juanjo Menent * Copyright (C) 2021 Alexandre Spangaro * Copyright (C) 2023 Charlene Benke + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -138,7 +139,7 @@ class FormTicket $this->withcompany = !getDolGlobalInt("TICKETS_NO_COMPANY_ON_FORM") && isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; - $this->withreadid=0; + $this->withreadid = 0; //$this->withtitletopic=''; $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; @@ -911,8 +912,8 @@ class FormTicket } elseif ($htmlname != '') { $selectedgroups = array(); $groupvalue = ""; - $groupticket=GETPOST($htmlname, 'aZ09'); - $child_id=GETPOST($htmlname.'_child_id', 'aZ09') ? GETPOST($htmlname.'_child_id', 'aZ09') : 0; + $groupticket = GETPOST($htmlname, 'aZ09'); + $child_id = GETPOST($htmlname.'_child_id', 'aZ09') ? GETPOST($htmlname.'_child_id', 'aZ09') : 0; if (!empty($groupticket)) { $tmpgroupticket = $groupticket; $sql = "SELECT ctc.rowid, ctc.fk_parent, ctc.code"; @@ -1025,7 +1026,7 @@ class FormTicket if ($resql) { $num_rows = $this->db->num_rows($resql); $i = 0; - $arrayidused=array(); + $arrayidused = array(); while ($i < $num_rows) { $obj = $this->db->fetch_object($resql); if ($obj) { @@ -1054,7 +1055,7 @@ class FormTicket } $stringtoprint .= ''; if (empty($tabscript[$groupcodefather])) { - $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid-1) : '').'").val() == "'.dol_escape_js($groupcodefather).'"){ + $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid - 1) : '').'").val() == "'.dol_escape_js($groupcodefather).'"){ $(".'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'").show() console.log("We show child tickets of '.$groupcodefather.' group ticket") }else{ @@ -1068,11 +1069,11 @@ class FormTicket } else { dol_print_error($this->db); } - $stringtoprint .=''; + $stringtoprint .= ''; - $stringtoprint .=''; + $stringtoprint .= '})'; + $stringtoprint .= ''; } - $stringtoprint .=''; + $stringtoprint .= ''; $stringtoprint .= ajax_combobox($htmlname); return $stringtoprint;