From cd2997b674af626795afdd4d615e1391b1c7af91 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 15 Nov 2022 08:08:26 -0600 Subject: [PATCH 1/3] Determine if email_logo or logo setting needs to be used in the Forgot Password email --- .../views/vendor/notifications/email.blade.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php index 986beb9c8..0147ef40d 100644 --- a/resources/views/vendor/notifications/email.blade.php +++ b/resources/views/vendor/notifications/email.blade.php @@ -73,16 +73,26 @@ $style = [ @if (($snipeSettings->show_images_in_email=='1' ) && ($snipeSettings::setupCompleted())) + @php + $logo = ''; + if ($snipeSettings->logo != ''){ + $logo = $snipeSettings->logo; + } + + if ($snipeSettings->email_logo != ''){ + $logo = $snipeSettings->email_logo; + } + @endphp @if ($snipeSettings->brand == '3') - @if ($snipeSettings->logo!='') - + @if ($logo!='') + @endif {{ $snipeSettings->site_name }} @elseif ($snipeSettings->brand == '2') - @if ($snipeSettings->logo!='') - + @if ($logo!='') + @endif @else {{ $snipeSettings->site_name }} From 7cc8b398630fcfd2de41374e52e694f015fb2b17 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 15 Nov 2022 10:55:54 -0600 Subject: [PATCH 2/3] Checks if settings let URL's be shown in email notifications --- resources/views/vendor/mail/html/message.blade.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index 3c03ea27e..93d3e7ba2 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -1,13 +1,18 @@ @component('mail::layout') {{-- Header --}} @slot('header') -@component('mail::header', ['url' => config('app.url')]) {{-- Check that the $snipeSettings variable is set, images are set to be shown, and setup is complete --}} @if (isset($snipeSettings) && ($snipeSettings::setupCompleted())) + @if ($snipeSettings->show_url_in_email=='1' ) + @component('mail::header', ['url' => config('app.url')]) + @else + @component('mail::header', ['url' => '']) + @endif + {{-- Show images in email! --}} @if (($snipeSettings->show_images_in_email=='1' ) && (($snipeSettings->brand == '3') || ($snipeSettings->brand == '2'))) From f0ecab7bb19b15db7cefdfe2a8be4a36e98f7b09 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 15 Nov 2022 11:00:40 -0600 Subject: [PATCH 3/3] Fix typo in variable (ah-hyuck!) --- resources/views/vendor/mail/html/message.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index 93d3e7ba2..dc9c4ce3b 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -7,7 +7,7 @@ @if (isset($snipeSettings) && ($snipeSettings::setupCompleted())) - @if ($snipeSettings->show_url_in_email=='1' ) + @if ($snipeSettings->show_url_in_emails=='1' ) @component('mail::header', ['url' => config('app.url')]) @else @component('mail::header', ['url' => ''])