Skip to content
Snippets Groups Projects
Commit 2f3d3f18 authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FIX #19325 TIME 1:00 finish html of email meta data && code clean - Jean-Laurent

parent 22c3fd9b
No related branches found
No related tags found
No related merge requests found
...@@ -964,35 +964,34 @@ class FolderPrintController ...@@ -964,35 +964,34 @@ class FolderPrintController
$status = _EMAIL_ERROR_SENT; $status = _EMAIL_ERROR_SENT;
} }
#region JL $widthTable_px = "1000px";
$widthNoMargins_px = "950px";
$cellPaddingBottom_px = "30px"; $cellPaddingBottom_px = "30px";
$emailMeta = "<table style=\"width: $widthNoMargins_px;\" cellspacing=\"0\" cellpadding=\"5\"> $emailMeta = "<table style=\"width: $widthTable_px;\" cellspacing=\"0\" cellpadding=\"5\">
<tbody> <tbody>
<tr style=\"height: 18px; border-syle: none;\"> <tr style=\"border-syle: none;\">
<td style=\"height: 18px; \"><b>"._EMAIL."</b></td> <td style=\"\"><b>"._EMAIL."</b></td>
<td style=\"text-align: right; height: 18px; \">$sentDate</td> <td style=\"text-align: right; \">$sentDate</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table style=\"width: $widthNoMargins_px; border-style: solid; border-color: #000000;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"> <table style=\"width: $widthTable_px; border-style: solid; border-color: #000000;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">
<tbody> <tbody>
<tr> <tr>
<td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._SENDER."</b></td> <td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._SENDER."</b></td>
<td style=\"height: 18px; width: $widthThreeQuarter_px; padding-bottom: $cellPaddingBottom_px;\">$sender</td> <td style=\"padding-bottom: $cellPaddingBottom_px;\">$sender</td>
</tr> </tr>
<tr> <tr>
<td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._RECIPIENTS."</b></td> <td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._RECIPIENTS."</b></td>
<td style=\"height: 18px; width: $widthThreeQuarter_px; padding-bottom: $cellPaddingBottom_px;\">$recipients</td> <td style=\"padding-bottom: $cellPaddingBottom_px;\">$recipients</td>
</tr> </tr>
<tr> <tr>
<td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._TO_CC."</b></td> <td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._TO_CC."</b></td>
<td style=\"height: 18px; width: $widthThreeQuarter_px; padding-bottom: $cellPaddingBottom_px;\">$recipientsCopy</td> <td style=\"padding-bottom: $cellPaddingBottom_px;\">$recipientsCopy</td>
</tr> </tr>
<tr> <tr>
<td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._TO_CCI."</b></td> <td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._TO_CCI."</b></td>
<td style=\"height: 18px; width: $widthThreeQuarter_px; padding-bottom: $cellPaddingBottom_px;\">$recipientsCopyHidden</td> <td style=\"padding-bottom: $cellPaddingBottom_px;\">$recipientsCopyHidden</td>
</tr> </tr>
<tr> <tr>
<td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._SUBJECT."</b></td> <td style=\"padding-bottom: $cellPaddingBottom_px;\"><b>"._SUBJECT."</b></td>
...@@ -1003,9 +1002,13 @@ class FolderPrintController ...@@ -1003,9 +1002,13 @@ class FolderPrintController
<td style=\"padding-bottom: $cellPaddingBottom_px;\">$status</td> <td style=\"padding-bottom: $cellPaddingBottom_px;\">$status</td>
</tr> </tr>
</tbody> </tbody>
</table> </table><br>";
<br><br>"; $css_ = "<style>
$emailMeta_emailDataBody = $emailMeta.$email['body']; table, thead, tbody, tr, td, th {
page-break-inside: avoid !important;
}
</style>";
$emailMeta_emailDataBody = $css_.$emailMeta.$email['body'];
$tmpDir = CoreConfigModel::getTmpPath(); $tmpDir = CoreConfigModel::getTmpPath();
$filePathInTmpNoExtension = $tmpDir . 'email_' . $email['id'] . '_' . $GLOBALS['id']; $filePathInTmpNoExtension = $tmpDir . 'email_' . $email['id'] . '_' . $GLOBALS['id'];
...@@ -1014,7 +1017,6 @@ class FolderPrintController ...@@ -1014,7 +1017,6 @@ class FolderPrintController
ConvertPdfController::convertInPdf(['fullFilename' => $filePathInTmpNoExtension.'.html']); ConvertPdfController::convertInPdf(['fullFilename' => $filePathInTmpNoExtension.'.html']);
return $filePathInTmpNoExtension.'.pdf'; return $filePathInTmpNoExtension.'.pdf';
#endregion JL
} }
private static function getSummarySheet(array $args) private static function getSummarySheet(array $args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment