Skip to content

Commit

Permalink
account for required parameter missing
Browse files Browse the repository at this point in the history
  • Loading branch information
richmarisa committed Jan 4, 2024
1 parent cdf88a0 commit cd72c27
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/cd/form/checkbox.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-cd.form.form-item field="{{ $name ?? $attributes->whereStartsWith('wire:model')->first() }}"
classes="{{ $classes ?? '' }}"
required="{{ ($required === 'false') ? 0 : (boolval($required)?1:0) }}"
required="{{ (($required??'') === 'false') ? 0 : (boolval($required??'')?1:0) }}"
description="{{ $description ?? ''}}"

>
Expand All @@ -17,4 +17,4 @@ classes="{{ $classes ?? '' }}"
/>
<label class="option-label" for="{{$field}}">{{$label}}</label>
</div>
</x-cd.form.form-item>
</x-cd.form.form-item>
4 changes: 2 additions & 2 deletions resources/views/components/cd/form/checkboxes.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-cd.form.form-item field="{{ $name ?? $attributes->whereStartsWith('wire:model')->first() }}"
classes="{{ $classes ?? '' }}"
required="{{ ($required === 'false') ? 0 : (boolval($required)?1:0) }}"
required="{{ (($required??'') === 'false') ? 0 : (boolval($required??'')?1:0) }}"
description="{{ $description ?? ''}}"
>
@php
Expand All @@ -21,4 +21,4 @@ classes="{{ $classes ?? '' }}"
</div>
@endforeach
</div>
</x-cd.form.form-item>
</x-cd.form.form-item>
4 changes: 2 additions & 2 deletions resources/views/components/cd/form/radios.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-cd.form.form-item field="{{ $name ?? $attributes->whereStartsWith('wire:model')->first() }}"
classes="{{ $classes ?? '' }}"
required="{{ ($required === 'false') ? 0 : (boolval($required)?1:0) }}"
required="{{ (($required??'') === 'false') ? 0 : (boolval($required??'')?1:0) }}"
description="{{ $description ?? ''}}"
>
<x-slot name="field_title">{{ $label }}</x-slot>
Expand All @@ -18,4 +18,4 @@ classes="{{ $classes ?? '' }}"
</div>
@endforeach
</div>
</x-cd.form.form-item>
</x-cd.form.form-item>
2 changes: 1 addition & 1 deletion resources/views/components/cd/form/select.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-cd.form.form-item field="{{ $name ?? $attributes->whereStartsWith('wire:model')->first() }}"
classes="{{ $classes ?? '' }}"
required="{{ ($required === 'false') ? 0 : (boolval($required)?1:0) }}"
required="{{ (($required??'') === 'false') ? 0 : (boolval($required??'')?1:0) }}"
description="{{ $description ?? ''}}"
>
<x-slot name="field_title">{{ $label }}</x-slot>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/cd/form/text.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-cd.form.form-item field="{{ $name ?? $attributes->whereStartsWith('wire:model')->first() }}"
classes="{{ $classes ?? '' }}"
required="{{ ($required === 'false') ? 0 : (boolval($required)?1:0) }}"
required="{{ (($required??'') === 'false') ? 0 : (boolval($required??'')?1:0) }}"
description="{{ $description ?? ''}}"
>
<x-slot name="field_title">{{ $label }}</x-slot>
Expand Down

0 comments on commit cd72c27

Please sign in to comment.