fix error handling
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
'flex flex-col' => $type !== 'checkbox',
|
||||
])>
|
||||
@if (!$noLabel)
|
||||
<label for={{ $id }}>
|
||||
<label for={{ $id }} @if (!$noDirty) wire:dirty.class="text-amber-300" @endif
|
||||
wire:target={{ $id }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
@@ -29,8 +30,8 @@
|
||||
required={{ $required }} type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}></textarea>
|
||||
@else
|
||||
<input {{ $attributes }} @if ($required) required @endif
|
||||
@if (!$noDirty) wire:dirty.class="text-black bg-amber-300" @endif type={{ $type }}
|
||||
id={{ $id }}
|
||||
@if (!$noDirty) wire:dirty.class="text-black bg-amber-300" @endif
|
||||
type={{ $type }} id={{ $id }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif />
|
||||
@endif
|
||||
@error($id)
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
<x-inputs.input noDirty id="value" label="Value" required />
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" wire:model.defer="is_build_time" />
|
||||
<label>Build Variable?</label>
|
||||
<x-inputs.input noDirty type="checkbox" id="is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
</div>
|
||||
<x-inputs.button type="submit">
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<div x-data="{ deleteEnvironment: false }">
|
||||
<form wire:submit.prevent='submit' class="flex gap-2 px-2">
|
||||
<input type="text" wire:model.defer="env.key" wire:dirty.class="text-black bg-amber-300" />
|
||||
<input type="text" wire:model.defer="env.value" wire:dirty.class="text-black bg-amber-300" />
|
||||
<x-inputs.input id="env.key" noLabel />
|
||||
<x-inputs.input id="env.value" noLabel />
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" wire:model.defer="env.is_build_time" />
|
||||
<label wire:dirty.class="text-amber-300" wire:target="env.is_build_time">Build Variable?</label>
|
||||
<x-inputs.input type="checkbox" id="env.is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
</div>
|
||||
<x-inputs.button type="submit">
|
||||
|
||||
Reference in New Issue
Block a user