From d1ae66dd1158d97c88a1ce1fc1837778e09a9b26 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Wed, 9 Nov 2022 12:37:00 +0100 Subject: [PATCH 1/4] Fix issue variables whithread and errors --- htdocs/core/class/html.formticket.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 0e5e6ff9e7c..b796215cd29 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -126,7 +126,7 @@ class FormTicket $this->withcompany = isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; - //$this->withreadid=0; + $this->withreadid=0; //$this->withtitletopic=''; $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; @@ -1394,7 +1394,7 @@ class FormTicket $result = $formmail->fetchAllEMailTemplate($this->param["models"], $user, $outputlangs); if ($result < 0) { - setEventMessages($this->error, $this->errors, 'errors'); + setEventMessage($this->error, 'errors'); } $modelmail_array = array(); foreach ($formmail->lines_model as $line) { From 628ec01daede88ff35652a02f8e184c4ccecb0eb Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Wed, 9 Nov 2022 18:20:21 +0100 Subject: [PATCH 2/4] fix issue after PR --- htdocs/core/class/html.formticket.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index b796215cd29..8611417f0e3 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -81,6 +81,7 @@ class FormTicket public $withtitletopic; public $withtopicreadonly; public $withreadid; + public $withcompany; // to show company drop-down list public $withfromsocid; public $withfromcontactid; @@ -108,6 +109,7 @@ class FormTicket * @var string Error code (or message) */ public $error; + public $errors = array(); /** @@ -1394,7 +1396,7 @@ class FormTicket $result = $formmail->fetchAllEMailTemplate($this->param["models"], $user, $outputlangs); if ($result < 0) { - setEventMessage($this->error, 'errors'); + setEventMessages($this->error, $this->errors, 'errors'); } $modelmail_array = array(); foreach ($formmail->lines_model as $line) { From e7fde14c7a923d9369ae50bd764882b59c13d265 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Wed, 9 Nov 2022 18:24:46 +0100 Subject: [PATCH 3/4] fix issue after PR --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 8611417f0e3..c41d0739269 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -133,7 +133,7 @@ class FormTicket $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; $this->withcreatereadonly = 1; - $this->withemail = 0; + //$this->withemail = 0; $this->withref = 0; $this->withextrafields = 0; // to show extrafields or not //$this->withtopicreadonly=0; From 58a66ca8a6c5d75804889faddfc002f38c999d4d Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Mon, 14 Nov 2022 16:19:21 +0100 Subject: [PATCH 4/4] uncomment attribute withemail in the constuct --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index c41d0739269..8611417f0e3 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -133,7 +133,7 @@ class FormTicket $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; $this->withcreatereadonly = 1; - //$this->withemail = 0; + $this->withemail = 0; $this->withref = 0; $this->withextrafields = 0; // to show extrafields or not //$this->withtopicreadonly=0;