This commit is contained in:
Ryan Scherler
2020-12-20 11:16:37 -08:00
parent a1314bfab0
commit 22a5f2ee09
6 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -9,7 +9,7 @@
x-on:livewire-upload-progress="progress = $event.detail.progress"
class="flex items-center space-x-4">
<div class="flex-shrink-0 relative">
<label for="{{ $id ?? $model }}" class="cursor-pointer rounded-full shadow flex overflow-hidden">
<label for="{{ $id }}" class="cursor-pointer rounded-full shadow flex overflow-hidden">
@if ($avatar)
<img src="{{ $avatar->temporaryUrl() }}" alt="{{ $user->name }}" class="h-full object-cover" width="{{ $size }}" height="{{ $size }}" loading="lazy">
@else
@@ -26,12 +26,12 @@
@endif
</div>
<div class="flex-grow relative">
<label class="btn" for="{{ $id ?? $model }}">{{ __($buttonLabel) }}</label>
<label class="btn" for="{{ $id }}">{{ __($buttonLabel) }}</label>
<input type="file"
{{ $modelDirective }}="{{ $model }}"
value="{{ $value }}"
class="sr-only"
id="{{ $id ?? $model }}"
id="{{ $id }}"
@foreach ($extraAttributes as $attribute => $value)
{{ $attribute }}="{{ $value }}"
@endforeach
+1 -1
View File
@@ -4,7 +4,7 @@
<input type="{{ $type }}"
{{ $modelDirective }}="{{ $model }}"
value="{{ $value }}"
id="{{ $id ?? $model }}"
id="{{ $id }}"
@foreach ($extraAttributes as $attribute => $value)
{{ $attribute }}="{{ $value }}"
@endforeach
+1 -1
View File
@@ -2,7 +2,7 @@
@section('field')
<textarea
id="{{ $id ?? $model }}"
id="{{ $id }}"
{{ $modelDirective }}="{{ $model }}"
@foreach ($extraAttributes as $attribute => $value)
{{ $attribute }}="{{ $value }}"
+5 -5
View File
@@ -16,7 +16,7 @@
<input
type="hidden"
value="{{ $value }}"
id="value-{{ $id ?? $model }}"
id="value-{{ $id }}"
@foreach ($extraAttributes as $attribute => $value)
{{ $attribute }}="{{ $value }}"
@endforeach
@@ -27,12 +27,12 @@
@trix-change="content = $event.target.value"
@trix-file-accept="$event.preventDefault()"
>
<x-filament::trix-toolbar id="toolbar-{{ $id ?? $model }}" />
<x-filament::trix-toolbar id="toolbar-{{ $id }}" />
<trix-editor
id="{{ $id ?? $model }}"
toolbar="toolbar-{{ $id ?? $model }}"
input="value-{{ $id ?? $model }}"
id="{{ $id }}"
toolbar="toolbar-{{ $id }}"
input="value-{{ $id }}"
class="block w-full rounded shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 border-gray-300 prose max-w-none"
></trix-editor>
</div>
@@ -1,7 +1,7 @@
<div class="space-y-2">
<div class="flex items-center justify-between space-x-2">
@if ($label)
<x-filament::label :for="$id ?? $model">
<x-filament::label :for="$id">
{{ __($label) }}
</x-filament::label>
@endif
+1 -1
View File
@@ -14,7 +14,7 @@ class Field extends BaseField {
public function __construct($model)
{
$this->model = $model;
$this->model = $this->id = $model;
}
/**