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 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'] = new \DOMDocument();
$documents['wrapper']->loadHTML($wrapper); $documents['wrapper']->loadHTML($wrapper);

View File

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