forked from protonemedia/laravel-form-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
65 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@error($name, $bag) | ||
<div {!! $attributes->merge(['class' => 'invalid-feedback']) !!}> | ||
{{ $message }} | ||
{!! $message !!} | ||
</div> | ||
@enderror | ||
@enderror |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
@if($label) | ||
<label {!! $attributes !!}>{{ $label }}</label> | ||
@endif | ||
@if($attributes->get('icon1') ?? null || $attributes->get('icon2') ?? null) | ||
<div class="d-inline-flex align-items-center w-100 justify-content-between gap-5"> | ||
<label {!! $attributes !!} class="form-label">{!! $label !!}</label> | ||
<div class="tool_icons d-flex gap-3"> | ||
@if($attributes->get('icon1') ?? null) | ||
<button type="button" data-bs-html="true" class="btn btn-sm btn-success" data-bs-toggle="tooltip" data-bs-title="{!! $attributes->get('icon1') !!}" data-bs-custom-class="custom-tooltip">i</button> | ||
@endif | ||
@if($attributes->get('icon2') ?? null) | ||
<button type="button" data-bs-html="true" data-bs-toggle="tooltip" data-bs-title="{!! $attributes->get('icon2') !!}" class="btn btn-sm btn-danger" data-bs-custom-class="custom-tooltip">§</button> | ||
@endif | ||
</div> | ||
</div> | ||
@else | ||
<label {!! $attributes !!} class="form-label">{!! $label !!}</label> | ||
@endif | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
@if($floating) <div class="form-floating"> @endif | ||
<div > | ||
@if($floating) <div class="form-floating mb-3"> @endif | ||
|
||
@if(!$floating) | ||
<x-form-label :label="$label" :for="$attributes->get('id') ?: $id()" /> | ||
@endif | ||
@if(!$floating) | ||
<x-form-label :label="$label" :for="$attributes->get('id') ?: $id()" /> | ||
@endif | ||
|
||
<textarea | ||
@if($isWired()) | ||
<textarea | ||
@if($isWired()) | ||
wire:model{!! $wireModifier() !!}="{{ $name }}" | ||
@endif | ||
@endif | ||
|
||
name="{{ $name }}" | ||
name="{{ $name }}" | ||
|
||
@if($label && !$attributes->get('id')) | ||
@if($label && !$attributes->get('id')) | ||
id="{{ $id() }}" | ||
@endif | ||
@endif | ||
|
||
{{-- Placeholder is required as of writing --}} | ||
@if($floating && !$attributes->get('placeholder')) | ||
{{-- Placeholder is required as of writing --}} | ||
@if($floating && !$attributes->get('placeholder')) | ||
placeholder=" " | ||
@endif | ||
|
||
{!! $attributes->merge(['class' => 'form-control' . ($hasError($name) ? ' is-invalid' : '')]) !!} | ||
{!! $attributes->merge(['class' => 'form-control' . ($hasError($name) ? ' is-invalid' : '')]) !!} | ||
>@unless($isWired()){!! $value !!}@endunless</textarea> | ||
|
||
@if($floating) | ||
<x-form-label :label="$label" :for="$attributes->get('id') ?: $id()" /> | ||
@endif | ||
|
||
@if($floating) </div> @endif | ||
|
||
{!! $help ?? null !!} | ||
|
||
@if($hasErrorAndShow($name)) | ||
<x-form-errors :name="$name" /> | ||
@endif | ||
@if($floating) | ||
<x-form-label :label="$label" :for="$attributes->get('id') ?: $id()" /> | ||
@endif | ||
{!! $help ?? null !!} | ||
@if($hasErrorAndShow($name)) | ||
<x-form-errors :name="$name" /> | ||
@endif | ||
@if($floating) </div> @endif | ||
</div> |