This commit is contained in:
Benjamin Beganović 2021-04-21 17:56:18 +02:00
parent 326ef52cd5
commit ca15b03eda
2 changed files with 21 additions and 40 deletions

View File

@ -262,6 +262,10 @@ class TemplateEngine
public static function wrapElementsIntoTables(string $wrapper, string $body, $settings): ?string
{
$wrapper = $wrapper == strip_tags($wrapper)
? '<div id="content-wrapper"></div>'
: $wrapper;
$documents['wrapper'] = new \DOMDocument();
$documents['wrapper']->loadHTML($wrapper);

View File

@ -8,47 +8,24 @@
<title>Invoice Ninja</title>
</head>
<body>
<table role="presentation" cellpadding="0" cellspacing="0" width="100%">
<div id="content-wrapper">
{!! $body !!}
</div>
@if($signature)
<tr>
<td style="font-family: Arial, sans-serif, 'Open Sans'">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td id="email-content">
{!! $body !!}
</td>
</tr>
</table>
</td>
</tr>
@if($signature)
<tr>
<td>
<p>{!! $signature !!}</p>
</td>
</tr>
@endif
<tr>
@isset($whitelabel)
@if(!$whitelabel)
<td>
<p>
<a href="https://invoiceninja.com" target="_blank">
{{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
</a>
</p>
</td>
@endif
@endif
</tr>
</table>
<td>
<p>{!! $signature !!}</p>
</td>
</tr>
</table>
</body>
</html>
@endif
@isset($whitelabel)
@if(!$whitelabel)
<p>
<a href="https://invoiceninja.com" target="_blank">
{{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
</a>
</p>
@endif
@endisset