Allow users to switch on e-mail headers again in UI

This commit is contained in:
Yoan Mollard 2022-04-18 04:54:50 +02:00
parent bf5076e181
commit 37ab728846
2 changed files with 31 additions and 0 deletions

View File

@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
dol_include_once('/emailcollector/class/emailcollector.class.php');
// Load translation files required by page
@ -594,6 +596,33 @@ print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
$formcategory = new FormCategory($db);
print load_fiche_titre($langs->trans("Other"), '', '');
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td></td>';
print '<td></td>';
print "</tr>\n";
// Hide e-mail headers from collected messages
print '<tr class="oddeven"><td>'.$langs->trans("EmailCollectorHideMailHeaders").'</td>';
print '<td class="left">';
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 $formcategory->selectarray("MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval, $conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND);
}
print '</td>';
print '<td class="center">';
print $formcategory->textwithpicto('', $langs->trans("EmailCollectorHideMailHeadersHelp"), 1, 'help');
print '</td>';
print '</tr>';
print '</table><br>';
print '</form>'."\n";
if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {

View File

@ -2070,6 +2070,8 @@ ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s
DateLastCollectResult=Date of latest collect try
DateLastcollectResultOk=Date of latest collect success
LastResult=Latest result
EmailCollectorHideMailHeaders=Hide headers of collected e-mails
EmailCollectorHideMailHeadersHelp=When enabled, e-mail headers are ignored during the collection
EmailCollectorConfirmCollectTitle=Email collect confirmation
EmailCollectorConfirmCollect=Do you want to run this collector now?
EmailCollectorExampleToCollectTicketRequestsDesc=Collect emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. Activate also Collect_Responses to collect answers of your client directly on the ticket view (you must reply from Dolibarr).