feat: new shared function name is_transactional_emails_enabled()

This commit is contained in:
peaklabs-dev
2024-12-09 15:34:24 +01:00
parent ee7a901a77
commit b13d77377c
7 changed files with 8 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
<div
class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
@if (is_transactional_emails_active())
@if (is_transactional_emails_enabled())
<form action="/forgot-password" method="POST" class="flex flex-col gap-2">
@csrf
<x-forms.input required type="email" name="email" label="{{ __('input.email') }}" />

View File

@@ -9,7 +9,7 @@
<x-forms.button type="submit">
Save
</x-forms.button>
@if ($this->isEmailEnabled() && auth()->user()->isAdminFromSession())
@if (is_transactional_emails_enabled() && auth()->user()->isAdminFromSession())
<x-modal-input buttonTitle="Send Test Email" title="Send Test Email">
<form wire:submit.prevent="sendTestEmail" class="flex flex-col w-full gap-2">
<x-forms.input wire:model="testEmailAddress" placeholder="test@example.com" id="testEmailAddress" label="Recipients" required />

View File

@@ -11,7 +11,7 @@
</div>
<div class="flex gap-2">
<x-forms.button type="submit">Generate Invitation Link</x-forms.button>
@if (is_transactional_emails_active())
@if (is_transactional_emails_enabled())
<x-forms.button wire:click.prevent='viaEmail'>Send Invitation via Email</x-forms.button>
@endif
</div>

View File

@@ -33,7 +33,7 @@
</div>
@if (auth()->user()->isAdminFromSession())
<div class="py-4">
@if (is_transactional_emails_active())
@if (is_transactional_emails_enabled())
<h2 class="pb-4">Invite New Member</h2>
@else
<h2>Invite New Member</h2>