diff --git a/composer.json b/composer.json index b55abc993f5c..6b364fa997c6 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,6 @@ "composer/composer": "^2", "czproject/git-php": "^3.17", "doctrine/dbal": "^2.10", - "fedeisas/laravel-mail-css-inliner": "^3", "fideloper/proxy": "^4.2", "fzaninotto/faker": "^1.4", "google/apiclient": "^2.7", diff --git a/composer.lock b/composer.lock index 0c5cc87e8da1..33c1e55ec7d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0afe2d541cb6e16cfb9d29faf3425c2d", + "content-hash": "94ab2953278081e3fdf663e1e7cf14c4", "packages": [ { "name": "asgrim/ofxparser", @@ -1657,66 +1657,6 @@ ], "time": "2020-12-29T14:50:06+00:00" }, - { - "name": "fedeisas/laravel-mail-css-inliner", - "version": "3.1", - "source": { - "type": "git", - "url": "https://github.com/fedeisas/laravel-mail-css-inliner.git", - "reference": "263f395b46ef9666151ac78daf429632b0b2e2c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fedeisas/laravel-mail-css-inliner/zipball/263f395b46ef9666151ac78daf429632b0b2e2c3", - "reference": "263f395b46ef9666151ac78daf429632b0b2e2c3", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "illuminate/mail": "^7.4 || ^8.0", - "illuminate/support": "^7.4 || ^8.0", - "php": "^7.2.5", - "tijsverkoyen/css-to-inline-styles": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5", - "swiftmailer/swiftmailer": "^6.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fedeisas\\LaravelMailCssInliner\\LaravelMailCssInlinerServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Fedeisas\\LaravelMailCssInliner\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fede Isas", - "email": "fedeisas@hotmail.com" - } - ], - "description": "Inline the CSS of your HTML emails using Laravel", - "keywords": [ - "css", - "laravel", - "mailer" - ], - "support": { - "issues": "https://github.com/fedeisas/laravel-mail-css-inliner/issues", - "source": "https://github.com/fedeisas/laravel-mail-css-inliner/tree/3.1" - }, - "time": "2020-09-12T05:00:14+00:00" - }, { "name": "fideloper/proxy", "version": "4.4.1", diff --git a/resources/views/email/auth/password-reset.blade.php b/resources/views/email/auth/password-reset.blade.php index 73f8dbe8ae3b..2f366cf1f224 100644 --- a/resources/views/email/auth/password-reset.blade.php +++ b/resources/views/email/auth/password-reset.blade.php @@ -1,22 +1,19 @@ -@component('email.template.master', ['design' => 'light']) +@component('email.template.master', ['design' => 'light', 'whitelabel' => false]) -@slot('header') - @component('email.components.header', ['p' => '', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) - Hello! - @endcomponent + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -@endslot +

You are receiving this email because we received a password reset request for your account.

-You are receiving this email because we received a password reset request for your account. + + Reset Password + -@component('email.components.button', ['url' => $link, 'show_link' => true]) - Reset Password -@endcomponent +

+ If you’re having trouble clicking the "Reset Password" button, copy and paste the URL below into your web + browser: +

- -@component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) - If you’re having trouble clicking the "Reset Password" button, copy and paste the URL below into your web browser: {{ $link }} @endcomponent - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/auth/verify.blade.php b/resources/views/email/auth/verify.blade.php index c61fb0198fe5..47b119b938e7 100644 --- a/resources/views/email/auth/verify.blade.php +++ b/resources/views/email/auth/verify.blade.php @@ -1,35 +1,12 @@ -@component('mail::layout') +@component('email.template.master', ['design' => 'light', 'whitelabel' => false]) -{{-- Header --}} -@slot('header') -@component('mail::header', ['url' => config('app.url')]) -Header Title + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot + +

{{ ctrans('texts.confirmation_message') }}

+ + confirmation_code}") }}" target="_blank" class="button"> + {{ ctrans('texts.confirm') }} + @endcomponent -@endslot - -{{-- Body --}} -{{ $user }} -trans('texts.confirmation_message') - -@component('mail::button', ['url' => url("/user/confirm/{$user->confirmation_code}")]) -trans('texts.confirm') -@endcomponent - -{{-- Subcopy --}} -@isset($subcopy) -@slot('subcopy') -@component('mail::subcopy') -{{ $subcopy }} -@endcomponent -@endslot -@endisset - - -{{-- Footer --}} -@slot('footer') -@component('mail::footer') -© {{ date('Y') }} {{ config('ninja.app_name') }}. -@endcomponent -@endslot - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/import/completed.blade.php b/resources/views/email/import/completed.blade.php index 6763d0575f87..4f62a77bede3 100644 --- a/resources/views/email/import/completed.blade.php +++ b/resources/views/email/import/completed.blade.php @@ -1,82 +1,56 @@ -@component('email.template.master', ['design' => 'light', 'settings' =>$settings]) +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -@slot('header') - @component('email.components.header') - Import completed - @endcomponent -@endslot +

Import completed

+

Hello, here is the output of your recent import job.

-@slot('greeting') - Hello, -@endslot + @if(isset($clients) && count($clients) >=1) +

Clients Imported: {{ count($clients) }}

+ @endif -Here is the output of your recent import job.

+ @if(isset($errors['clients']) && count($errors['clients']) >=1) +

Client Errors

-@if(isset($clients) && count($clients) >=1) + + @endif -

Clients Imported: {{ count($clients) }}

+ @if(isset($invoices) && count($invoices) >=1) -@endif +

Invoices Imported: {{ count($invoices) }}

-@if(isset($errors['clients']) && count($errors['clients']) >=1) + @endif -

Client Errors

+ @if(isset($errors['invoices']) && count($errors['invoices']) >=1) +

Invoices Errors

- -@endif + + @endif -@if(isset($invoices) && count($invoices) >=1) + @if(isset($products) && count($products) >=1) +

Products Imported: {{ count($products) }}

+ @endif -

Invoices Imported: {{ count($invoices) }}

+ @if(isset($errors['products']) && count($errors['products']) >=1) +

Client Errors

-@endif + + @endif -@if(isset($errors['invoices']) && count($errors['invoices']) >=1) + Visit portal -

Invoices Errors

- - -@endif - -@if(isset($products) && count($products) >=1) - -

Products Imported: {{ count($products) }}

- -@endif - -@if(isset($errors['products']) && count($errors['products']) >=1) - -

Client Errors

- - -@endif - -@component('email.components.button', ['url' => url('/')]) - Visit portal +

Thank you,
Invoice Ninja.

@endcomponent - - -@slot('signature') -Thank you,
-Invoice Ninja -@endslot - -@slot('footer') - @component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) - For any info, please visit InvoiceNinja. - @endcomponent -@endslot - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/invoices/paid.blade.php b/resources/views/email/invoices/paid.blade.php index 5e8f36f3152a..3f2bfc0dcd0c 100644 --- a/resources/views/email/invoices/paid.blade.php +++ b/resources/views/email/invoices/paid.blade.php @@ -1,26 +1,10 @@ -@component('email.template.master', ['design' => 'light', 'settings' =>$settings]) +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -@slot('header') - @component('email.components.header', ['p' => 'Payment for your invoice has been completed!', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) - Invoice paid - @endcomponent +

Payment for your invoice has been completed!

+

We want to inform you that payment was completed for your invoice.

-@endslot - -@slot('greeting') - Hello, -@endslot - -We want to inform you that payment was completed for your invoice. Amount: $10,000.00. - -@component('email.components.button', ['url' => 'https://invoiceninja.com', 'show_link' => true]) - Visit InvoiceNinja + Visit Invoice Ninja @endcomponent - -@slot('below_card') - @component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) - For any info, please visit InvoiceNinja. - @endcomponent -@endslot - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/migration/completed.blade.php b/resources/views/email/migration/completed.blade.php index fb0b335f7d9b..6c72f61b7deb 100644 --- a/resources/views/email/migration/completed.blade.php +++ b/resources/views/email/migration/completed.blade.php @@ -1,31 +1,13 @@ -@component('email.template.master', ['design' => 'light', 'settings' =>$settings]) +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) -@slot('header') - @component('email.components.header') - Migration completed - @endcomponent -@endslot + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -@slot('greeting') - Hello, -@endslot +

Migration completed

+

We're happy to inform you that migration has been completed successfully. It is ready for you to review it.

-We're happy to inform you that migration has been completed successfully. It is ready for you to review it. + Visit portal -@component('email.components.button', ['url' => url('/')]) - Visit portal +

Thank you,
Invoice Ninja

@endcomponent - - -@slot('signature') -Thank you,
-Invoice Ninja -@endslot - -@slot('footer') - @component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) - For any info, please visit InvoiceNinja. - @endcomponent -@endslot - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/migration/existing.blade.php b/resources/views/email/migration/existing.blade.php index 3454441ecef9..1491488b17d6 100644 --- a/resources/views/email/migration/existing.blade.php +++ b/resources/views/email/migration/existing.blade.php @@ -1,4 +1,4 @@ -@component('email.template.master', ['design' => 'light', 'settings' =>$settings]) +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) @slot('header') @component('email.components.header') @@ -19,7 +19,7 @@ Looks like you already migrated your data to V2 version of the Invoice Ninja. In @slot('signature') Thank you,
-Invoice Ninja +Invoice Ninja @endslot @slot('footer') @@ -28,4 +28,4 @@ Invoice Ninja @endcomponent @endslot -@endcomponent \ No newline at end of file +@endcomponent diff --git a/resources/views/email/migration/failed.blade.php b/resources/views/email/migration/failed.blade.php index 780f2051fa02..41c6421e7c97 100644 --- a/resources/views/email/migration/failed.blade.php +++ b/resources/views/email/migration/failed.blade.php @@ -1,7 +1,13 @@ -Whoops! -Looks like your migration failed. +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -
-    {!! $exception->getMessage() !!}
-    {!! $content !!}
-
+

Whoops, migration failed.

+

Looks like your migration failed. Here's the error message:

+ +
+        {!! $exception->getMessage() !!}
+        {!! $content !!}
+    
+@endcomponent diff --git a/resources/views/email/quotes/approved.blade.php b/resources/views/email/quotes/approved.blade.php index 8c2680138e2f..78815d6be93a 100644 --- a/resources/views/email/quotes/approved.blade.php +++ b/resources/views/email/quotes/approved.blade.php @@ -1,26 +1,10 @@ -@component('email.template.master', ['design' => 'light', 'settings' =>$settings]) +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot -@slot('header') - @component('email.components.header', ['p' => 'Your quote was approved!', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) - Quote approved - @endcomponent +

Quote approved!

+

We want to inform you that quote was approved.

-@endslot - -@slot('greeting') - Hello, -@endslot - -We want to inform you that quote was approved. Put nicer text here. - -@component('email.components.button', ['url' => 'https://invoiceninja.com', 'show_link' => true]) - Visit InvoiceNinja + Visit Invoice Ninja @endcomponent - -@slot('below_card') - @component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) - For any info, please visit InvoiceNinja. - @endcomponent -@endslot - -@endcomponent \ No newline at end of file diff --git a/resources/views/email/support/cancellation.blade.php b/resources/views/email/support/cancellation.blade.php index 507584f0c18e..ca907bd37661 100644 --- a/resources/views/email/support/cancellation.blade.php +++ b/resources/views/email/support/cancellation.blade.php @@ -1,30 +1,7 @@ -@component('mail::layout') - -{{-- Header --}} -@slot('header') -@component('mail::header', ['url' => config('app.url')]) -Header Title -@endcomponent -@endslot - -{{-- Body --}} -{{ $message }} - -{{-- Subcopy --}} -@isset($subcopy) -@slot('subcopy') -@component('mail::subcopy') -{{ $subcopy }} -@endcomponent -@endslot -@endisset - - -{{-- Footer --}} -@slot('footer') -@component('mail::footer') -© {{ date('Y') }} {{ config('ninja.app_name') }}. -@endcomponent -@endslot +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot + {{ $message }} @endcomponent diff --git a/resources/views/email/support/message.blade.php b/resources/views/email/support/message.blade.php index 362b36bd04db..d19c6887e14f 100644 --- a/resources/views/email/support/message.blade.php +++ b/resources/views/email/support/message.blade.php @@ -1,40 +1,19 @@ -@component('mail::layout') - -{{-- Header --}} -@slot('header') -@component('mail::header', ['url' => config('app.url')]) -Header Title -@endcomponent -@endslot - -{{-- Body --}} -{{ $message }} - -{!! str_replace('\n', '
', $system_info) !!} - -@if(@count($laravel_log) > 0) -
- {{ ctrans('texts.display_log') }} - @foreach($laravel_log as $log_line) - {{ $log_line }}
- @endforeach -
-@endif -{{-- Subcopy --}} -@isset($subcopy) -@slot('subcopy') -@component('mail::subcopy') -{{ $subcopy }} -@endcomponent -@endslot -@endisset - - -{{-- Footer --}} -@slot('footer') -@component('mail::footer') -© {{ date('Y') }} {{ config('ninja.app_name') }}. -@endcomponent -@endslot +@component('email.template.master', ['design' => 'light', 'settings' => $settings]) + @slot('header') + @include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png']) + @endslot + {{-- Body --}} + {{ $message }} + + {!! str_replace('\n', '
', $system_info) !!} + + @if(@count($laravel_log) > 0) +
+ {{ ctrans('texts.display_log') }} + @foreach($laravel_log as $log_line) + {{ $log_line }}
+ @endforeach +
+ @endif @endcomponent diff --git a/resources/views/email/template/master.blade.php b/resources/views/email/template/master.blade.php index 230a89f0aa57..1bc331a21960 100644 --- a/resources/views/email/template/master.blade.php +++ b/resources/views/email/template/master.blade.php @@ -22,14 +22,18 @@ background-color: var(--primary-color); } - #email-content h1 { + #email-content h1, h2, h3, h4 { display: block; color: {{ $design == 'light' ? 'black' : 'white' }}; + padding-bottom: 20px; + padding-top: 20px; } #email-content p { display: block; color: {{ $design == 'light' ? 'black' : 'white' }}; + padding-bottom: 20px; + padding-top: 20px; } .button {