Apply discharge template CSS to print fragments
This commit is contained in:
parent
e0ce677355
commit
8e9fe8fab3
|
|
@ -7144,12 +7144,24 @@ class Ipd_discharge extends BaseController
|
|||
trim((string) ($templateSettings['header_html'] ?? '')),
|
||||
$templateTokenVars
|
||||
);
|
||||
$templateCss = trim((string) ($templateSettings['template_css'] ?? ''));
|
||||
if ($templateCss !== '' && $configuredHeader !== '') {
|
||||
$configuredHeader = '<style>' . $templateCss . '</style>' . $configuredHeader;
|
||||
}
|
||||
$headerHtml = $this->sanitizeDischargePdfHtml($configuredHeader, false);
|
||||
$headerHtml = mpdf_normalize_font_weight_css($headerHtml);
|
||||
}
|
||||
|
||||
$configuredFooter = $this->applyDischargeTemplateTokens(
|
||||
trim((string) ($templateSettings['footer_html'] ?? '')),
|
||||
$templateTokenVars
|
||||
);
|
||||
$templateCss = trim((string) ($templateSettings['template_css'] ?? ''));
|
||||
if ($templateCss !== '' && $configuredFooter !== '') {
|
||||
$configuredFooter = '<style>' . $templateCss . '</style>' . $configuredFooter;
|
||||
}
|
||||
$footerHtml = $this->sanitizeDischargePdfHtml(
|
||||
$this->applyDischargeTemplateTokens(trim((string) ($templateSettings['footer_html'] ?? '')), $templateTokenVars),
|
||||
$configuredFooter,
|
||||
false
|
||||
);
|
||||
$footerHtml = mpdf_normalize_font_weight_css($footerHtml);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user