|
1 |
| -@foreach ($users as $label => $credentials) |
2 |
| - @if ($loop->first) |
3 |
| - <div class="flex flex-col gap-y-6"> |
4 |
| - <div class="relative flex items-center justify-center text-center"> |
5 |
| - <div class="absolute border-t border-gray-200 w-full h-px"></div> |
6 |
| - <p class="inline-block relative bg-white text-sm p-2 rounded-full font-medium text-gray-500 dark:bg-gray-800 dark:text-gray-100"> |
7 |
| - {{ __('filament-developer-logins::auth.login-as') }} |
| 1 | +@if (! empty($users)) |
| 2 | + <div class="flex flex-col gap-y-6"> |
| 3 | + <div class="relative flex items-center justify-center text-center"> |
| 4 | + <div class="absolute border-t border-gray-200 w-full h-px"></div> |
| 5 | + <p class="inline-block relative bg-white text-sm p-2 rounded-full font-medium text-gray-500 dark:bg-gray-800 dark:text-gray-100"> |
| 6 | + {{ __('filament-developer-logins::auth.login-as') }} |
| 7 | + </p> |
| 8 | + </div> |
| 9 | + |
| 10 | + @if ($errors->has('developer-logins-failed')) |
| 11 | + <div class="justify-center text-center"> |
| 12 | + <p class="fi-fo-field-wrp-error-message text-sm text-danger-600 dark:text-danger-400"> |
| 13 | + {{ $errors->first('developer-logins-failed') }} |
8 | 14 | </p>
|
9 | 15 | </div>
|
| 16 | + @endif |
| 17 | + <div class="grid grid-cols-2 gap-4"> |
| 18 | + @foreach ($users as $label => $credentials) |
| 19 | + <form action="{{ route('filament-developer-logins.login-as') }}" method="POST"> |
| 20 | + @csrf |
10 | 21 |
|
11 |
| - @if ($errors->has('developer-logins-failed')) |
12 |
| - <div class="justify-center text-center"> |
13 |
| - <p class="fi-fo-field-wrp-error-message text-danger-600 dark:text-danger-400"> |
14 |
| - {{ $errors->first('developer-logins-failed') }} |
15 |
| - </p> |
16 |
| - </div> |
17 |
| - @endif |
18 |
| - |
19 |
| - <div class="grid grid-cols-2 gap-4"> |
20 |
| - @endif |
21 |
| - <form action="{{ route('filament-developer-logins.login-as') }}" method="POST"> |
22 |
| - @csrf |
| 22 | + <input type="hidden" name="panel_id" value="{{ \Filament\Facades\Filament::getId() }}"> |
| 23 | + <input type="hidden" name="credentials" value="{{ $credentials }}"> |
23 | 24 |
|
24 |
| - <input type="hidden" name="panel_id" value="{{ \Filament\Facades\Filament::getId() }}"> |
25 |
| - <input type="hidden" name="credentials" value="{{ $credentials }}"> |
26 |
| - |
27 |
| - <x-filament::button class="w-full" color="gray" outlined="true" type="submit"> |
28 |
| - {{ "$label ($credentials)" }} |
29 |
| - </x-filament::button> |
30 |
| - </form> |
31 |
| - @if ($loop->first) |
32 |
| - </div> |
| 25 | + <x-filament::button class="w-full" color="gray" outlined="true" type="submit"> |
| 26 | + {{ "$label ($credentials)" }} |
| 27 | + </x-filament::button> |
| 28 | + </form> |
| 29 | + @endforeach |
33 | 30 | </div>
|
34 |
| - @endif |
35 |
| -@endforeach |
| 31 | + </div> |
| 32 | +@endif |
| 33 | + |
0 commit comments