Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-07-22 13:23:00 +02:00
commit 8d7e2d7aa0
9 changed files with 48 additions and 37 deletions

View file

@ -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 '</td>';
print '</tr>';

View file

@ -1375,7 +1375,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");
@ -2280,8 +2280,8 @@ while ($i < $imaxinloop) {
// Alias name
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->alias;
print '<td class="nocellnopadd tdoverflowmax125" title="'.dolPrintHTMLForTextArea($obj->alias).'">';
print dolPrintLabel($obj->alias);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -2311,8 +2311,8 @@ while ($i < $imaxinloop) {
// Town
if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->town;
print '<td class="tdoverflowmax100">';
print dolPrintLabel($obj->town);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -2322,7 +2322,7 @@ while ($i < $imaxinloop) {
// Zip
if (!empty($arrayfields['s.zip']['checked'])) {
print '<td class="nocellnopadd">';
print $obj->zip;
print dolPrintLabel($obj->zip);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -2331,7 +2331,7 @@ while ($i < $imaxinloop) {
// State
if (!empty($arrayfields['state.nom']['checked'])) {
print "<td>".$obj->state_name."</td>\n";
print "<td>".dolPrintLabel($obj->state_name)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}

View file

@ -2374,7 +2374,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($dateemail, "dayhourtext", "gmt")));
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("MailFrom").($langs->trans("MailFrom") != 'From' ? ' (From)' : '').' : '.dol_escape_htmltag($fromstring));
@ -2765,7 +2767,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);
@ -3056,7 +3058,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);
@ -3191,7 +3193,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);
@ -3204,9 +3206,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);

View file

@ -1209,7 +1209,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");

View file

@ -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 <b>%s</b>. Trying to send more may result in having your instance slow down or suspended. Please contact your support if you need a higher quota.

View file

@ -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.<br>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

View file

@ -1600,6 +1600,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print '<input type="checkbox" id="mandatoryperiod" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').'>';
print '<label for="mandatoryperiod">';
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
print '</label>';
@ -2217,6 +2220,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print '<input type="checkbox" id="mandatoryperiod" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').'>';
print '<label for="mandatoryperiod">';
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
print '</label>';
@ -2741,6 +2747,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print ' &nbsp; &nbsp; &nbsp; ';
}
$htmltooltip = $langs->trans("mandatoryHelper");
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
}
print '<input type="checkbox" class="" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').' disabled>';
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);

View file

@ -1139,20 +1139,18 @@ if ($action == 'create' || $action == 'presend') {
print '</div><div class="fichehalfright">';
print '<form method="post" name="formticketproperties" action="'.$url_page_current.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="change_property">';
print '<input type="hidden" name="track_id" value="'.$track_id.'">';
print '<input type="hidden" name="trackid" value="'.$trackid.'">';
//print '<div class="underbanner clearboth"></div>';
// View Original message
$actionobject->viewTicketOriginalMessage($user, $action, $object);
// Classification of ticket
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="border tableforfield centpercent margintable">';
print '<table class="border tableforfield centpercent margintable bordertopimp">';
print '<tr class="liste_titre">';
print '<td>';
print $langs->trans('TicketProperties');
@ -1265,10 +1263,13 @@ if ($action == 'create' || $action == 'presend') {
print '</table>';
}
// View Original message
$actionobject->viewTicketOriginalMessage($user, $action, $object);
// Display navbar with links to change ticket status
print '<!-- navbar with status -->';
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);
}

View file

@ -199,19 +199,24 @@ class ActionsTicket extends CommonHookActions
// Initial message
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="border centpercent margintable bordertopimp">';
print '<table class="border centpercent margintable">';
print '<tr class="liste_titre trforfield"><td class="nowrap titlefield">';
print $langs->trans("InitialMessage");
print '</td><td>';
if ($user->hasRight("ticket", "manage")) {
print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=edit_message_init&token='.newToken().'&track_id='.$object->track_id.'">'.img_edit($langs->trans('Modify')).'</a>';
if ($action != 'edit_message_init') {
print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=edit_message_init&token='.newToken().'&track_id='.$object->track_id.'">'.img_edit($langs->trans('Modify')).'</a>';
} else {
print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
print ' <input type="submit" class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'">';
}
}
print '</td></tr>';
print '<tr>';
print '<td colspan="2">';
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 '<div class="longmessagecut">';
//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 '<div class="longmessagecut small">';
print dolPrintHTML($object->message);
print '</div>';
/*print '<div class="clear center">';
print $langs->trans("More").'...';
@ -232,12 +236,6 @@ class ActionsTicket extends CommonHookActions
//print '<div>' . $object->message . '</div>';
}
if ($user->hasRight('ticket', 'manage') && $action == 'edit_message_init') {
print '<div class="center">';
print ' <input type="submit" class="button button-edit small" value="'.$langs->trans('Modify').'">';
print ' <input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>';
}
print '</td>';
print '</tr>';
print '</table>';