Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Added name attribute when element is wired
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Sep 8, 2021
1 parent 96d340d commit 8541fa0
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 38 deletions.
4 changes: 2 additions & 2 deletions resources/views/bootstrap-4/form-checkbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
3 changes: 2 additions & 1 deletion resources/views/bootstrap-4/form-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
3 changes: 1 addition & 2 deletions resources/views/bootstrap-4/form-radio.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"
value="{{ $value }}"

@if($checked)
Expand Down
3 changes: 2 additions & 1 deletion resources/views/bootstrap-4/form-range.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-4/form-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<select
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($multiple)
multiple
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-4/form-textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<textarea
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-5/form-checkbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
3 changes: 2 additions & 1 deletion resources/views/bootstrap-5/form-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value ?? ($type === 'color' ? '#000000' : '') }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-5/form-radio.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
3 changes: 2 additions & 1 deletion resources/views/bootstrap-5/form-range.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-5/form-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<select
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($multiple)
multiple
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/bootstrap-5/form-textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<textarea
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($label && !$attributes->get('id'))
id="{{ $id() }}"
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind-2/form-checkbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($checked)
checked="checked"
@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/tailwind-2/form-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value }}"
@endif

name="{{ $name }}"
type="{{ $type }}" />
</label>

Expand Down
3 changes: 1 addition & 2 deletions resources/views/tailwind-2/form-radio.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"
value="{{ $value }}"

@if($checked)
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind-2/form-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<select
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($multiple)
multiple
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind-2/form-textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<textarea
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

{!! $attributes->merge(['class' => 'block w-full ' . ($label ? 'mt-1' : '')]) !!}
>@unless($isWired()){!! $value !!}@endunless</textarea>
</label>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind/form-checkbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($checked)
checked="checked"
@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/tailwind/form-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
value="{{ $value }}"
@endif

name="{{ $name }}"
type="{{ $type }}" />
</label>

Expand Down
3 changes: 1 addition & 2 deletions resources/views/tailwind/form-radio.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"
value="{{ $value }}"

@if($checked)
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind/form-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<select
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

@if($multiple)
multiple
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tailwind/form-textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<textarea
@if($isWired())
wire:model{!! $wireModifier() !!}="{{ $name }}"
@else
name="{{ $name }}"
@endif

name="{{ $name }}"

{!! $attributes->merge(['class' => 'form-textarea block w-full ' . ($label ? 'mt-1' : '')]) !!}
>@unless($isWired()){!! $value !!}@endunless</textarea>
</label>
Expand Down

0 comments on commit 8541fa0

Please sign in to comment.