Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 0bb9f96

Browse files
committed
Only render id if there is a value
1 parent c049593 commit 0bb9f96

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

resources/views/components/choice/checkbox-or-radio.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="choice-input">
33
<input {!! $attributes->merge(['class' => $type === 'checkbox' ? 'form-checkbox' : 'form-radio'])->filter(fn ($value, $key) => $key !== 'type') !!}
44
name="{{ $name }}"
5-
id="{{ $id }}"
5+
@if ($id) id="{{ $id }}" @endif
66
type="{{ $type }}"
77
@if ($value) value="{{ $value }}" @endif
88
@if ($checked && ! $attributes->whereStartsWith('wire:model')->first()) checked @endif

resources/views/components/inputs/date-picker.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class="leading-addon cursor-pointer"
3232
{{ $attributes->merge(['class' => $inputClass()])->except('type')->whereDoesntStartWith('wire:model') }}
3333

3434
name="{{ $name }}"
35-
id="{{ $id }}"
35+
@if ($id) id="{{ $id }}" @endif
3636
x-ref="input"
3737
x-bind:value="value"
3838
placeholder="{{ $placeholder }}"

resources/views/components/inputs/input.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ $attributes->merge(['class' => $inputClass()]) }}
66

77
name="{{ $name }}"
8-
id="{{ $id }}"
8+
@if ($id) id="{{ $id }}" @endif
99
type="{{ $type }}"
1010

1111
@if ($value && ! $attributes->whereStartsWith('wire:model')->first()) value="{{ $value }}" @endif

resources/views/components/inputs/password.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class="form-text-container {{ $maxWidth }}"
99
{{ $attributes->merge(['class' => $inputClass()]) }}
1010

1111
name="{{ $name }}"
12-
id="{{ $id }}"
12+
@if ($id) id="{{ $id }}" @endif
1313

1414
@if ($showToggle)
1515
:type="show ? 'text' : 'password'"

resources/views/components/inputs/select.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@include('form-components::partials.leading-addons')
33

44
<select name="{{ $name }}"
5-
id="{{ $id }}"
5+
@if ($id) id="{{ $id }}" @endif
66
@if ($multiple) multiple @endif
77

88
@if ($hasErrorsAndShow($name))

resources/views/components/inputs/textarea.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@include('form-components::partials.leading-addons')
33

44
<textarea name="{{ $name }}"
5-
id="{{ $id }}"
5+
@if ($id) id="{{ $id }}" @endif
66
@if ($hasErrorsAndShow($name))
77
aria-invalid="true"
88

resources/views/components/inputs/timezone-select.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@include('form-components::partials.leading-addons')
33

44
<select name="{{ $name }}"
5-
id="{{ $id }}"
5+
@if ($id) id="{{ $id }}" @endif
66
@if ($multiple) multiple @endif
77

88
@if ($hasErrorsAndShow($name))

0 commit comments

Comments
 (0)