From f36b8b062b6f9ae5322d0d56c091ed718ec09707 Mon Sep 17 00:00:00 2001
From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com>
Date: Fri, 23 Sep 2022 11:17:36 +0200
Subject: [PATCH] Update html.formticket.class.php
---
htdocs/core/class/html.formticket.class.php | 96 +++++++++++----------
1 file changed, 49 insertions(+), 47 deletions(-)
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 176e2346c17..31482200b6c 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -20,13 +20,14 @@
*/
/**
- * \file htdocs/core/class/html.formticket.class.php
- * \ingroup ticket
- * \brief File of class to generate the form for creating a new ticket.
+ * \file htdocs/core/class/html.formticket.class.php
+ * \ingroup ticket
+ * \brief File of class to generate the form for creating a new ticket.
*/
-require_once DOL_DOCUMENT_ROOT."/core/class/html.form.class.php";
-require_once DOL_DOCUMENT_ROOT."/core/class/html.formmail.class.php";
-require_once DOL_DOCUMENT_ROOT."/core/class/html.formprojet.class.php";
+
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
if (!class_exists('FormCompany')) {
include DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@@ -35,8 +36,8 @@ if (!class_exists('FormCompany')) {
/**
* Class to generate the form for creating a new ticket.
* Usage: $formticket = new FormTicket($db)
- * $formticket->proprietes=1 ou chaine ou tableau de valeurs
- * $formticket->show_form() affiche le formulaire
+ * $formticket->proprietes = 1 or string or array of values
+ * $formticket->show_form() shows the form
*
* @package Ticket
*/
@@ -64,8 +65,8 @@ class FormTicket
public $withtopic;
public $withemail;
+
/**
- *
* @var int $withsubstit Show substitution array
*/
public $withsubstit;
@@ -75,19 +76,19 @@ class FormTicket
public $backtopage;
- public $ispublic; // To show information or not into public form
+ public $ispublic; // to show information or not into public form
public $withtitletopic;
public $withtopicreadonly;
public $withreadid;
- public $withcompany; // affiche liste déroulante company
+ public $withcompany; // to show company drop-down list
public $withfromsocid;
public $withfromcontactid;
public $withnotifytiersatcreate;
- public $withusercreate; // Show name of creating user in form
+ public $withusercreate; // to show name of creating user in form
public $withcreatereadonly;
- public $withref; // Show ref field
+ public $withref; // to show ref field
public $withcancel;
@@ -132,7 +133,7 @@ class FormTicket
$this->withcreatereadonly = 1;
$this->withemail = 0;
$this->withref = 0;
- $this->withextrafields = 0; // Show extrafields or not
+ $this->withextrafields = 0; // to show extrafields or not
//$this->withtopicreadonly=0;
}
@@ -316,12 +317,12 @@ class FormTicket
print '
';
@@ -339,7 +340,7 @@ class FormTicket
if ($this->withtitletopic) {
print '
';
- // Réponse à un ticket : affichage du titre du thread en readonly
+ // Answer to a ticket : display of the thread title in readonly
if ($this->withtopicreadonly) {
print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
print '
';
@@ -669,14 +670,14 @@ class FormTicket
/**
* Return html list of tickets type
*
- * @param string $selected Id du type pre-selectionne
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @param string $morecss More CSS
+ * @param string $selected Id du type pre-selectionne
+ * @param string $htmlname Nom de la zone select
+ * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
+ * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
+ * @param int $empty 1=peut etre vide, 0 sinon
+ * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
+ * @param int $maxlength Max length of label
+ * @param string $morecss More CSS
* @return void
*/
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
@@ -707,7 +708,7 @@ class FormTicket
continue;
}
- // We discard empty line if showempty is on because an empty line has already been output.
+ // If 'showempty' is enabled we discard empty line because an empty line has already been output.
if ($empty && empty($arraytypes['code'])) {
continue;
}
@@ -728,7 +729,7 @@ class FormTicket
print '