|
3 | 3 | @if(!$user->id) {{ __('New') }} @endif |
4 | 4 | {{ __('User') }} |
5 | 5 | @if($user->id): {{ $user->name }} @endif |
| 6 | + @if($user->id) |
| 7 | + <a href="{{ route('users.edit') }}" class="float-right bg-blue-500 text-white font-bold uppercase text-xs px-4 py-2 rounded shadow hover:shadow-md outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150" type="button"> |
| 8 | + + {{ __('New') }} |
| 9 | + </a> |
| 10 | + @endif |
6 | 11 | </h2> |
7 | 12 | </x-slot> |
8 | 13 |
|
|
28 | 33 | <x-jet-input-error for="user.email" class="mt-2"/> |
29 | 34 | </div> |
30 | 35 | <div class="col-span-6 sm:col-span-4"> |
31 | | - <x-jet-label for="role" value="{{ __('Role') }}"/> |
32 | | - <div class="bg-white rounded-md -space-y-px"> |
33 | | - @foreach($roles as $role) |
34 | | - <!-- Checked: "bg-indigo-50 border-indigo-200 z-10", Not Checked: "border-gray-200" --> |
| 36 | + <x-jet-label for="role" value="{{ __('Role') }}"/> |
| 37 | + <div class="bg-white rounded-md -space-y-px"> |
| 38 | + @foreach($roles as $role) |
| 39 | + <!-- Checked: "bg-indigo-50 border-indigo-200 z-10", Not Checked: "border-gray-200" --> |
35 | 40 | <label class="@if(in_array($role->id,$userRoles)) bg-indigo-50 border-indigo-200 z-10 @else border-gray-200 @endif @if($loop->first) rounded-tl-md rounded-tr-md @endif @if($loop->last) rounded-bl-md rounded-br-md @endif relative border p-4 flex cursor-pointer"> |
36 | 41 | <input type="checkbox" value="{{ $role->id }}" wire:model="userRoles" class="invisible" aria-labelledby="privacy-setting-{{ $loop->iteration }}-label" aria-describedby="privacy-setting-{{ $loop->iteration }}-description"> |
37 | 42 | <div class="flex flex-col"> |
|
41 | 46 | <span id="privacy-setting-{{ $loop->iteration }}-description" class="text-gray-500 block text-sm">{{ $role->description }}</span> |
42 | 47 | </div> |
43 | 48 | </label> |
44 | | - @endforeach |
45 | | - </div> |
| 49 | + @endforeach |
| 50 | + </div> |
| 51 | + <x-jet-input-error for="user.email" class="mt-2"/> |
46 | 52 |
|
47 | 53 |
|
48 | 54 | <x-jet-input-error for="role" class="mt-2"/> |
49 | 55 | </div> |
50 | 56 | </x-slot> |
51 | | - <x-slot name="actions"> |
52 | | - <x-jet-action-message class="mr-3" on="saved"> |
53 | | - {{ __('Saved.') }} |
54 | | - </x-jet-action-message> |
| 57 | + @if($user->id) |
| 58 | + <x-slot name="actions"> |
| 59 | + <x-jet-action-message class="mr-3" on="saved"> |
| 60 | + {{ __('Saved.') }} |
| 61 | + </x-jet-action-message> |
55 | 62 |
|
56 | | - <x-jet-button wire:loading.attr="disabled"> |
57 | | - {{ __('Save') }} |
58 | | - </x-jet-button> |
59 | | - </x-slot> |
| 63 | + <x-jet-button wire:loading.attr="disabled"> |
| 64 | + {{ __('Save') }} |
| 65 | + </x-jet-button> |
| 66 | + </x-slot> |
| 67 | + @endif |
60 | 68 | </x-jet-form-section> |
61 | 69 | <x-jet-section-border/> |
62 | 70 |
|
|
93 | 101 | </x-jet-form-section> |
94 | 102 | <x-jet-section-border/> |
95 | 103 | @if($showPerks) |
96 | | - <div class="md:grid md:grid-cols-3 md:gap-6"> |
97 | | - <x-jet-section-title> |
98 | | - <x-slot name="title"> |
99 | | - {{ __('Permissions') }} |
100 | | - </x-slot> |
101 | | - <x-slot name="description"> |
102 | | - {{ __('These are the user specific permissions , grayed out permissions are set via a role and cannot be changed for the user.') }} |
103 | | - </x-slot> |
104 | | - </x-jet-section-title> |
105 | | - <div class="mt-5 md:mt-0 md:col-span-2"> |
106 | | - <div class="px-4 py-5 bg-white sm:p-6 shadow sm:rounded-md"> |
107 | | - @include('LLoadoutInforce-views::user-ui.access') |
| 104 | + <div class="md:grid md:grid-cols-3 md:gap-6"> |
| 105 | + <x-jet-section-title> |
| 106 | + <x-slot name="title"> |
| 107 | + {{ __('Permissions') }} |
| 108 | + </x-slot> |
| 109 | + <x-slot name="description"> |
| 110 | + {{ __('These are the user specific permissions , grayed out permissions are set via a role and cannot be changed for the user.') }} |
| 111 | + </x-slot> |
| 112 | + </x-jet-section-title> |
| 113 | + <div class="mt-5 md:mt-0 md:col-span-2"> |
| 114 | + <div class="px-4 py-5 bg-white sm:p-6 shadow sm:rounded-md"> |
| 115 | + @include('LLoadoutInforce-views::user-ui.access') |
| 116 | + </div> |
108 | 117 | </div> |
109 | 118 | </div> |
110 | | - </div> |
111 | | - @endif |
| 119 | + @endif |
112 | 120 |
|
113 | 121 | </div> |
0 commit comments