From ff46f57ea58ed3433ca56bbed1118cbd3ca3d947 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Jul 2024 11:28:00 +0200 Subject: [PATCH 1/4] Fix css --- htdocs/commande/list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 88fe138c231..9da62e62ec8 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2269,8 +2269,8 @@ while ($i < $imaxinloop) { // Alias name if (!empty($arrayfields['s.name_alias']['checked'])) { - print ''; - print $obj->alias; + print ''; + print dolPrintLabel($obj->alias); print ''; if (!$i) { $totalarray['nbfield']++; @@ -2300,8 +2300,8 @@ while ($i < $imaxinloop) { // Town if (!empty($arrayfields['s.town']['checked'])) { - print ''; - print $obj->town; + print ''; + print dolPrintLabel($obj->town); print ''; if (!$i) { $totalarray['nbfield']++; @@ -2311,7 +2311,7 @@ while ($i < $imaxinloop) { // Zip if (!empty($arrayfields['s.zip']['checked'])) { print ''; - print $obj->zip; + print dolPrintLabel($obj->zip); print ''; if (!$i) { $totalarray['nbfield']++; @@ -2320,7 +2320,7 @@ while ($i < $imaxinloop) { // State if (!empty($arrayfields['state.nom']['checked'])) { - print "".$obj->state_name."\n"; + print "".dolPrintLabel($obj->state_name)."\n"; if (!$i) { $totalarray['nbfield']++; } From e0d6d2d7c7c9335feeb5ca850fc247c8ea74fb93 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Jul 2024 11:44:00 +0200 Subject: [PATCH 2/4] Fix bad tooltip when option SERVICE_STRICT_MANDATORY_PERIOD is on --- htdocs/langs/en_US/products.lang | 3 ++- htdocs/product/card.php | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index af8f850a858..7181b24d39b 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -404,7 +404,8 @@ PMPValueShort=WAP mandatoryperiod=Mandatory periods mandatoryPeriodNeedTobeSet=Note: Period (start and end date) must be defined mandatoryPeriodNeedTobeSetMsgValidate=A service requires a start and end period -mandatoryHelper=Check this if you want a message to the user when creating / validating an invoice, commercial proposal, sales order without entering a start and end date on lines with this service.
Note that the message is a warning and not a blocking error. +mandatoryHelper=Check this if you want a message to the user when creating / validating an invoice, commercial proposal, sales order without entering a start and end date on lines with this service. +mandatoryHelper2=Note that the message is a warning and not a blocking error. DefaultBOM=Default BOM DefaultBOMDesc=The default BOM recommended to use to manufacture this product. This field can be set only if nature of product is '%s'. Rank=Rank diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 88c2acf96a7..6ea9c3f8848 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1560,6 +1560,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; print ''; @@ -2179,6 +2182,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; print ''; @@ -2703,6 +2709,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print '       '; } $htmltooltip = $langs->trans("mandatoryHelper"); + if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) { + $htmltooltip .= '
'.$langs->trans("mandatoryHelper2"); + } print 'mandatory_period == 1 ? ' checked="checked"' : '').' disabled>'; print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0); From 12c7edfd63a979d0689f17d8ae973fe6ced85edb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Jul 2024 12:19:56 +0200 Subject: [PATCH 3/4] Debug v20 --- htdocs/commande/list.php | 2 +- htdocs/fourn/commande/list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 9da62e62ec8..79290e8fd64 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1364,7 +1364,7 @@ if ($permissiontovalidate) { $arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"); } if ($permissiontoclose) { - $arrayofmassactions['preshipped'] = img_picto('', 'dollyrevert', 'class="pictofixedwidth"').$langs->trans("ClassifyShipped"); + $arrayofmassactions['preshipped'] = img_picto('', 'dolly', 'class="pictofixedwidth"').$langs->trans("ClassifyShipped"); } if (isModEnabled('invoice') && $user->hasRight("facture", "creer")) { $arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer"); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 3d81db42c25..181abb3663d 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1198,7 +1198,7 @@ if ($resql) { } if ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight("supplier_invoice", "creer")) { - $arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier"); + $arrayofmassactions['createbills'] = img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier"); } if ($permissiontodelete) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); From 940b946dfb4e38675a667cebdaaa071988e9696a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Jul 2024 13:19:35 +0200 Subject: [PATCH 4/4] Debug v20 --- htdocs/admin/emailcollector_list.php | 2 +- .../class/emailcollector.class.php | 16 ++++++++------ htdocs/langs/en_US/mails.lang | 2 +- htdocs/ticket/card.php | 15 +++++++------ htdocs/ticket/class/actions_ticket.class.php | 22 +++++++++---------- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 351a4fbbf18..be297d9423d 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -722,7 +722,7 @@ if ($conf->use_javascript_ajax) { print ajax_constantonoff('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval, $conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND); + print $form->selectarray("MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval, getDolGlobalString('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND')); } print ''; print ''; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 03f1c319454..ba322abf602 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2356,7 +2356,9 @@ class EmailCollector extends CommonObject $description = $descriptiontitle = $descriptionmeta = $descriptionfull = ''; - $descriptiontitle = $langs->trans("RecordCreatedByEmailCollector", $this->ref, $msgid); + $descriptiontitle = $langs->transnoentitiesnoconv("RecordCreatedByEmailCollector", $this->ref); + + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("EmailMsgID").' : '.dol_escape_htmltag($msgid)); $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailTopic").' : '.dol_escape_htmltag($subject)); $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailDate").($langs->trans("MailDate") != 'Date' ? ' (Date)' : '').' : '.dol_escape_htmltag(dol_print_date($date, "dayhourtext"))); $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailFrom").($langs->trans("MailFrom") != 'From' ? ' (From)' : '').' : '.dol_escape_htmltag($fromstring)); @@ -2747,7 +2749,7 @@ class EmailCollector extends CommonObject } $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); $description = dol_concatdesc($description, "-----"); $description = dol_concatdesc($description, $messagetext); @@ -3038,7 +3040,7 @@ class EmailCollector extends CommonObject } $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); $description = dol_concatdesc($description, "-----"); $description = dol_concatdesc($description, $messagetext); @@ -3173,7 +3175,7 @@ class EmailCollector extends CommonObject } $description = $descriptiontitle; - $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); $description = dol_concatdesc($description, "-----"); $description = dol_concatdesc($description, $messagetext); @@ -3186,9 +3188,9 @@ class EmailCollector extends CommonObject $tickettocreate->subject = $subject; $tickettocreate->message = $description; - $tickettocreate->type_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE') ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_type', 'use_default', 'code', 1)); - $tickettocreate->category_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE') ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_category', 'use_default', 'code', 1)); - $tickettocreate->severity_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE') ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1)); + $tickettocreate->type_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_TYPE_CODE', dol_getIdFromCode($this->db, 1, 'c_ticket_type', 'use_default', 'code', 1))); + $tickettocreate->category_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_CATEGORY_CODE', dol_getIdFromCode($this->db, 1, 'c_ticket_category', 'use_default', 'code', 1))); + $tickettocreate->severity_code = (getDolGlobalString('MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE', dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1))); $tickettocreate->origin_email = $from; $tickettocreate->origin_replyto = (!empty($replyto) ? $replyto : null); $tickettocreate->origin_references = (!empty($headers['References']) ? $headers['References'] : null); diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 40e94f779e7..3570e6a36c4 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -182,7 +182,7 @@ Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email -RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s +RecordCreatedByEmailCollector=Record created by the Email Collector %s DefaultBlacklistMailingStatus=Default value for field '%s' when creating a new contact DefaultStatusEmptyMandatory=Empty but mandatory WarningLimitSendByDay=WARNING: The setup or contract of your instance limits your number of emails per day to %s. Trying to send more may result in having your instance slow down or suspended. Please contact your support if you need a higher quota. diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index d922ce933a1..b99beae3d83 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1139,20 +1139,18 @@ if ($action == 'create' || $action == 'presend') { print '
'; + + + print '
'; print ''; print ''; print ''; print ''; - //print '
'; - - // View Original message - $actionobject->viewTicketOriginalMessage($user, $action, $object); - // Classification of ticket print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table - print ''; + print '
'; print ''; print '
'; print $langs->trans('TicketProperties'); @@ -1265,10 +1263,13 @@ if ($action == 'create' || $action == 'presend') { print '
'; } + // View Original message + $actionobject->viewTicketOriginalMessage($user, $action, $object); + // Display navbar with links to change ticket status print ''; - if (!$user->socid && $user->hasRight('ticket', 'write') && isset($object->status) && $object->status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { + if (!$user->socid && $user->hasRight('ticket', 'write') && isset($object->status) && $object->status < $object::STATUS_CLOSED) { $actionobject->viewStatusActions($object); } diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index e75f6c0f59d..7bb1dbc713a 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -199,19 +199,24 @@ class ActionsTicket extends CommonHookActions // Initial message print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table - print ''; + print '
'; print ''; print ''; print ''; print ''; print '
'; print $langs->trans("InitialMessage"); print ''; if ($user->hasRight("ticket", "manage")) { - print ''.img_edit($langs->trans('Modify')).''; + if ($action != 'edit_message_init') { + print ''.img_edit($langs->trans('Modify')).''; + } else { + print ''; + print ' '; + } } print '
'; if ($user->hasRight('ticket', 'manage') && $action == 'edit_message_init') { - // MESSAGE + // Message $msg = GETPOSTISSET('message_initial') ? GETPOST('message_initial', 'restricthtml') : $object->message; include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $uselocalbrowser = true; @@ -222,9 +227,8 @@ class ActionsTicket extends CommonHookActions $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $ckeditorenabledforticket, ROWS_9, '95%'); $doleditor->Create(); } else { - print '
'; - //print dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->message), 1, 1, 1, 0)), 1, 1, 'common', 0, 1); - print nl2br($object->message); + print '
'; + print dolPrintHTML($object->message); print '
'; /*print '
'; print $langs->trans("More").'...'; @@ -232,12 +236,6 @@ class ActionsTicket extends CommonHookActions //print '
' . $object->message . '
'; } - if ($user->hasRight('ticket', 'manage') && $action == 'edit_message_init') { - print '
'; - print ' '; - print ' '; - print '
'; - } print '
';