A free open source IT asset/license management system
Implement toggling message when email will be sent
Marcus Moore105c94aea999
diff --git a/app/Http/Livewire/CategoryEditForm.php b/app/Http/Livewire/CategoryEditForm.phpindex de5d0e5522..342046b1c1 100644--- a/app/Http/Livewire/CategoryEditForm.php+++ b/app/Http/Livewire/CategoryEditForm.php@@ -6,8 +6,6 @@ use Livewire\Component;class CategoryEditForm extends Component{-// public bool $displayEmailMessage = false;-public bool $checkinEmail;public $defaultEulaText;@@ -33,14 +31,17 @@ class CategoryEditForm extends Componentreturn view('livewire.category-edit-form');}- public function getDisplayEmailMessageProperty(): bool+ public function getShouldDisplayEmailMessageProperty(): bool{- return false;+ return $this->eulaText || $this->useDefaultEula;}public function getEmailMessageProperty(): string{- // @todo:- return '';+ if ($this->useDefaultEula) {+ return trans('admin/categories/general.email_will_be_sent_due_to_global_eula');+ }++ return trans('admin/categories/general.email_will_be_sent_due_to_category_eula');}}diff --git a/resources/views/livewire/category-edit-form.blade.php b/resources/views/livewire/category-edit-form.blade.phpindex 2116f2f615..fb54c125e2 100644--- a/resources/views/livewire/category-edit-form.blade.php+++ b/resources/views/livewire/category-edit-form.blade.php@@ -44,7 +44,7 @@{{ Form::checkbox('checkin_email', '1', null, ['wire:model' => 'checkinEmail', 'aria-label'=>'checkin_email']) }}{{ trans('admin/categories/general.checkin_email') }}</label>- @if ($this->displayEmailMessage)+ @if ($this->shouldDisplayEmailMessage)<div class="callout callout-info"><i class="far fa-envelope"></i><span>{{ $this->emailMessage }}</span>