97 lines
4.2 KiB
PHP
97 lines
4.2 KiB
PHP
<div class="toast-container position-fixed bottom-0 end-0 p-3" id="fo-toast-container">
|
|
|
|
@if ($raw = Session::get('success', Session::get('bo.success')))
|
|
@php $msgs = is_array($raw) ? $raw : [$raw]; @endphp
|
|
<div class="toast fo-toast fo-toast--success align-items-center" data-bs-autohide="true" data-bs-delay="5000" aria-live="polite"
|
|
aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body">
|
|
<i class="fa-solid fa-circle-check fo-toast-icon me-2" aria-hidden="true"></i>
|
|
@if (count($msgs) === 1)
|
|
<strong>{!! nl2br(e($msgs[0])) !!}</strong>
|
|
@else
|
|
<ul class="list-unstyled mb-0">@foreach ($msgs as $m)<li>{!! nl2br(e($m)) !!}</li>@endforeach</ul>
|
|
@endif
|
|
</div>
|
|
<button class="btn-close m-auto me-2 flex-shrink-0" data-bs-dismiss="toast" type="button"
|
|
aria-label="{{ __('Close') }}"></button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($raw = Session::get('error', Session::get('bo.error')))
|
|
@php $msgs = is_array($raw) ? $raw : [$raw]; @endphp
|
|
<div class="toast fo-toast fo-toast--danger align-items-center" data-bs-autohide="false" role="alert" aria-live="assertive"
|
|
aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body">
|
|
<i class="fa-solid fa-circle-xmark fo-toast-icon me-2" aria-hidden="true"></i>
|
|
@if (count($msgs) === 1)
|
|
<strong>{!! nl2br(e($msgs[0])) !!}</strong>
|
|
@else
|
|
<ul class="list-unstyled mb-0">@foreach ($msgs as $m)<li>{!! nl2br(e($m)) !!}</li>@endforeach</ul>
|
|
@endif
|
|
</div>
|
|
<button class="btn-close m-auto me-2 flex-shrink-0" data-bs-dismiss="toast" type="button"
|
|
aria-label="{{ __('Close') }}"></button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($raw = Session::get('warning', Session::get('bo.warning')))
|
|
@php $msgs = is_array($raw) ? $raw : [$raw]; @endphp
|
|
<div class="toast fo-toast fo-toast--warning align-items-center" data-bs-autohide="true" data-bs-delay="7000" role="alert"
|
|
aria-live="assertive" aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body">
|
|
<i class="fa-solid fa-circle-exclamation fo-toast-icon me-2" aria-hidden="true"></i>
|
|
@if (count($msgs) === 1)
|
|
<strong>{!! nl2br(e($msgs[0])) !!}</strong>
|
|
@else
|
|
<ul class="list-unstyled mb-0">@foreach ($msgs as $m)<li>{!! nl2br(e($m)) !!}</li>@endforeach</ul>
|
|
@endif
|
|
</div>
|
|
<button class="btn-close m-auto me-2 flex-shrink-0" data-bs-dismiss="toast" type="button"
|
|
aria-label="{{ __('Close') }}"></button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($raw = Session::get('info', Session::get('bo.info')))
|
|
@php $msgs = is_array($raw) ? $raw : [$raw]; @endphp
|
|
<div class="toast fo-toast fo-toast--info align-items-center" data-bs-autohide="true" data-bs-delay="5000" aria-live="polite"
|
|
aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body">
|
|
<i class="fa-solid fa-circle-info fo-toast-icon me-2" aria-hidden="true"></i>
|
|
@if (count($msgs) === 1)
|
|
<strong>{!! nl2br(e($msgs[0])) !!}</strong>
|
|
@else
|
|
<ul class="list-unstyled mb-0">@foreach ($msgs as $m)<li>{!! nl2br(e($m)) !!}</li>@endforeach</ul>
|
|
@endif
|
|
</div>
|
|
<button class="btn-close m-auto me-2 flex-shrink-0" data-bs-dismiss="toast" type="button"
|
|
aria-label="{{ __('Close') }}"></button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($errors->any())
|
|
<div class="toast fo-toast fo-toast--danger" data-bs-autohide="false" role="alert" aria-live="assertive" aria-atomic="true">
|
|
<div class="d-flex align-items-start">
|
|
<div class="toast-body">
|
|
<p class="fw-bold mb-1">
|
|
<i class="fa-solid fa-circle-exclamation fo-toast-icon me-2" aria-hidden="true"></i>{{ __('Error list') }} :
|
|
</p>
|
|
<ul class="list-unstyled mb-0">
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
<button class="btn-close me-2 mt-2 flex-shrink-0" data-bs-dismiss="toast" type="button" aria-label="{{ __('Close') }}"></button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
</div>
|