From ca15b03eda16a4993ca1455f721e314163fc94cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 21 Apr 2021 17:56:18 +0200 Subject: [PATCH] wip --- app/Utils/TemplateEngine.php | 4 ++ .../views/email/template/plain.blade.php | 57 ++++++------------- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index 33ee07c3c212..5780ec1b1da8 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -262,6 +262,10 @@ class TemplateEngine public static function wrapElementsIntoTables(string $wrapper, string $body, $settings): ?string { + $wrapper = $wrapper == strip_tags($wrapper) + ? '
' + : $wrapper; + $documents['wrapper'] = new \DOMDocument(); $documents['wrapper']->loadHTML($wrapper); diff --git a/resources/views/email/template/plain.blade.php b/resources/views/email/template/plain.blade.php index 910e93e31ad5..c896a646f184 100644 --- a/resources/views/email/template/plain.blade.php +++ b/resources/views/email/template/plain.blade.php @@ -8,47 +8,24 @@ Invoice Ninja - - +
+ {!! $body !!} +
+ +@if($signature) - -
- - - - - @if($signature) - - - - @endif - - @isset($whitelabel) - @if(!$whitelabel) - - @endif - @endif - -
- - - - -
- {!! $body !!} -
-
-

{!! $signature !!}

-
-

- - {{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }} - -

-
+
+

{!! $signature !!}

- - - +@endif +@isset($whitelabel) + @if(!$whitelabel) +

+ + {{ __('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }} + +

+ @endif +@endisset