Merge pull request #2631 from Haendlerbund/show-multiple-flash-messages-in-admin-panel

bugfix: show multiple flash messages in admin panel
This commit is contained in:
Jitendra Singh 2020-03-12 14:53:46 +05:30 committed by GitHub
commit 30f94375f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 9 deletions

View File

@ -55,15 +55,11 @@
<script type="text/javascript">
window.flashMessages = [];
@if ($success = session('success'))
window.flashMessages = [{'type': 'alert-success', 'message': "{{ $success }}" }];
@elseif ($warning = session('warning'))
window.flashMessages = [{'type': 'alert-warning', 'message': "{{ $warning }}" }];
@elseif ($error = session('error'))
window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }];
@elseif ($info = session('info'))
window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }];
@endif
@foreach (['success', 'warning', 'error', 'info'] as $key)
@if ($value = session($key))
window.flashMessages.push({'type': 'alert-{{ $key }}', 'message': "{{ $value }}" });
@endif
@endforeach
window.serverErrors = [];
@if (isset($errors))