Fix error handling for mailgateway forms
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-11-04 23:55:57 +01:00
parent 4f2f2b43ce
commit 2ded545a94
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class Form extends Component
'type' => 'Typ',
'name' => 'Beschreibung',
'domain' => 'Domain',
...$this->type ? collect($this->type::fieldNames())->mapWithKeys(fn ($attribute, $key) => ["params.{$key}" => $attribute]) : [],
...$this->type ? collect($this->type::fieldNames())->mapWithKeys(fn ($attribute, $key) => ["type.{$key}" => $attribute]) : [],
];
}
@ -104,11 +104,11 @@ class Form extends Component
<x-form::select name="typeClass" wire:model.live="typeClass" label="Typ" :options="$types" required />
@foreach($this->fields() as $index => $field)
<x-form::text
wire:key="index"
wire:key="$index"
wire:model="type.{{$field['name']}}"
:label="$field['label']"
:type="$field['type']"
:name="$field['name']"
:name="'type.'.$field['name']"
:required="str_contains('required', $field['validator'])"
></x-form::text>
@endforeach