app/Http/Livewire/Form/*: extend ModelForm to share ALOT of code and make concrete form classes smaller
This commit is contained in:
parent
5f960cf3d9
commit
40b73e1c5c
6 changed files with 31 additions and 176 deletions
|
|
@ -6,22 +6,22 @@
|
|||
<form class="space-y-4" wire:submit.prevent="submit">
|
||||
|
||||
<div>
|
||||
<x-ignite-label for="card.body">{{ __('Body') }}</x-ignite-label>
|
||||
<x-ignite-input name="card.body" wire:model="card.body" />
|
||||
<x-ignite-label for="record.body">{{ __('Body') }}</x-ignite-label>
|
||||
<x-ignite-input name="record.body" wire:model="record.body" />
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-3 space-x-4">
|
||||
<div>
|
||||
<x-ignite-label for="card.raid_id">{{ __('Raid') }}</x-ignite-label>
|
||||
<x-ignite-select name="card.raid_id" wire:model="card.raid_id" :options="$raids" placeholder="{{ __('Select a raid') }}" />
|
||||
<x-ignite-label for="record.raid_id">{{ __('Raid') }}</x-ignite-label>
|
||||
<x-ignite-select name="record.raid_id" wire:model="record.raid_id" :options="$raids" placeholder="{{ __('Select a raid') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<x-ignite-label for="card.character_id">{{ __('Character') }}</x-ignite-label>
|
||||
<x-ignite-select name="card.character_id" wire:model="card.character_id" :options="$characters" placeholder="{{ __('Select a character') }}" />
|
||||
<x-ignite-label for="record.character_id">{{ __('Character') }}</x-ignite-label>
|
||||
<x-ignite-select name="record.character_id" wire:model="record.character_id" :options="$characters" placeholder="{{ __('Select a character') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<x-ignite-label for="card.class">{{ __('Class') }}</x-ignite-label>
|
||||
<x-ignite-select name="card.class" wire:model="card.class" :options="$classes" placeholder="{{ __('Select a class') }}" />
|
||||
<x-ignite-label for="record.class">{{ __('Class') }}</x-ignite-label>
|
||||
<x-ignite-select name="record.class" wire:model="record.class" :options="$classes" placeholder="{{ __('Select a class') }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<form class="space-y-4" wire:submit.prevent="submit">
|
||||
|
||||
<div>
|
||||
<x-ignite-label for="character.name">{{ __('Name') }}</x-ignite-label>
|
||||
<x-ignite-input name="character.name" wire:model="character.name" />
|
||||
<x-ignite-label for="record.name">{{ __('Name') }}</x-ignite-label>
|
||||
<x-ignite-input name="record.name" wire:model="record.name" />
|
||||
</div>
|
||||
|
||||
<x-button type="info">{{ __('Save') }}</x-button>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<form class="space-y-4" wire:submit.prevent="submit">
|
||||
|
||||
<div>
|
||||
<x-ignite-label for="raid.name">{{ __('Name') }}</x-ignite-label>
|
||||
<x-ignite-input name="raid.name" wire:model="raid.name" />
|
||||
<x-ignite-label for="record.name">{{ __('Name') }}</x-ignite-label>
|
||||
<x-ignite-input name="record.name" wire:model="record.name" />
|
||||
</div>
|
||||
|
||||
<x-button type="info">{{ __('Save') }}</x-button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue