From 4bc0a6db2d0bcf68b6d99d341aa38f1f238ee237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 16 Oct 2019 22:56:29 +0200 Subject: [PATCH] Update html.formticket.class.php --- htdocs/core/class/html.formticket.class.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 8d0c45bbb41..87b9d1fcb99 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -67,6 +67,7 @@ class FormTicket public $withsubstit; public $withfile; + public $withfilereadonly; public $ispublic; // To show information or not into public form @@ -374,7 +375,7 @@ class FormTicket $listofmimes = explode(';', $_SESSION["listofmimes"]); } - $out .= ''; + $out = ''; $out .= '' . $langs->trans("MailFile") . ''; $out .= ''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript @@ -409,7 +410,8 @@ class FormTicket } // Other attributes - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $action); // Note that $action and $object may have been modified by hook + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { print $ticketstat->showOptionals($extrafields, 'edit'); @@ -504,23 +506,18 @@ class FormTicket } print '>'; + $value = ' '; if ($format == 0) { $value = ($maxlength ? dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); - } - - if ($format == 1) { + } elseif ($format == 1) { $value = $arraytypes['code']; - } - - if ($format == 2) { + } elseif ($format == 2) { $value = ($maxlength ? dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); - } - - if ($format == 3) { + } elseif ($format == 3) { $value = $arraytypes['code']; } - print $value ? $value : ' '; + print $value; print ''; } }