|
1 | 1 | <x-forms::form-group :inline-input-class="$inlineInputClass" :inline-label-class="$inlineLabelClass" :wrap="$showLabel && $type != 'hidden'" :label="$label ?: $label()" :name="$attributes->get('id') ?: $id()" :framework="$framework" :inline="$inline" :required="$required" :floating="$floating"> |
2 | | - @if($isDateInput() || (! empty($prepend)) || (! empty($append))) |
3 | | - <div class="input-group mb-0"> |
4 | | - @if($isDateInput() || (! empty($prepend))) |
5 | | - <div class="input-group-prepend"> |
6 | | - @if($isDateInput()) |
7 | | - <span class="input-group-text {{ $iconWrapperClass }}"> |
8 | | - <i class="{{ $icon }}"></i> |
9 | | - </span> |
10 | | - @elseif(! empty($prepend)) |
11 | | - {{ $prepend }} |
12 | | - @endif |
13 | | - </div> |
| 2 | + <div class="position-relative"> |
| 3 | + @if($isDateInput() || (! empty($prepend)) || (! empty($append))) |
| 4 | + <div class="input-group mb-0"> |
| 5 | + @if($isDateInput() || (! empty($prepend))) |
| 6 | + <div class="input-group-prepend"> |
| 7 | + @if($isDateInput()) |
| 8 | + <span class="input-group-text {{ $iconWrapperClass }}"> |
| 9 | + <i class="{{ $icon }}"></i> |
| 10 | + </span> |
| 11 | + @elseif(! empty($prepend)) |
| 12 | + {{ $prepend }} |
| 13 | + @endif |
| 14 | + </div> |
| 15 | + @endif |
14 | 16 | @endif |
15 | | - @endif |
16 | 17 |
|
17 | | - <input |
18 | | - {!! $attributes->merge([ |
19 | | - 'class' => 'form-control' . ($type === 'color' ? ' form-control-color' : '') . ($hasError($name) ? ' is-invalid' : '') . ($isDateInput() ? ' ' . $datePickerClass() : ''), |
20 | | - 'required' => $required |
21 | | - ] + $getDefaultAttributes()) !!} |
22 | | - type="{{ $type }}" |
23 | | - value="{{ $value ?? ($type === 'color' ? '#000000' : '') }}" |
24 | | - name="{{ $name }}" |
25 | | - @if($label && ! $attributes->get('id')) |
26 | | - id="{{ $id() }}" |
27 | | - @endif |
28 | | - {{-- Placeholder is required as of writing --}} |
29 | | - @if($floating || $placeholder) |
30 | | - @if($placeholder) |
31 | | - placeholder="{{ $placeholder }}" |
32 | | - @else |
33 | | - placeholder=" " |
| 18 | + <input |
| 19 | + {!! $attributes->merge([ |
| 20 | + 'class' => 'form-control' . ($type === 'color' ? ' form-control-color' : '') . ($hasError($name) ? ' is-invalid' : '') . ($isDateInput() ? ' ' . $datePickerClass() : ''), |
| 21 | + 'required' => $required |
| 22 | + ] + $getDefaultAttributes()) !!} |
| 23 | + type="{{ $type }}" |
| 24 | + value="{{ $value ?? ($type === 'color' ? '#000000' : '') }}" |
| 25 | + name="{{ $name }}" |
| 26 | + @if($label && ! $attributes->get('id')) |
| 27 | + id="{{ $id() }}" |
| 28 | + @endif |
| 29 | + {{-- Placeholder is required as of writing --}} |
| 30 | + @if($floating || $placeholder) |
| 31 | + @if($placeholder) |
| 32 | + placeholder="{{ $placeholder }}" |
| 33 | + @else |
| 34 | + placeholder=" " |
| 35 | + @endif |
34 | 36 | @endif |
| 37 | + /> |
| 38 | + @if($showLabel) |
| 39 | + <i class="form-group__bar"></i> |
35 | 40 | @endif |
36 | | - /> |
37 | | - @if($showLabel) |
38 | | - <i class="form-group__bar"></i> |
39 | | - @endif |
40 | 41 |
|
41 | 42 |
|
42 | | - @if($isDateInput() || (! empty($prepend)) || (! empty($append))) |
43 | | - @if($isDateInput() || (! empty($append))) |
44 | | - <div class="input-group-append"> |
45 | | - @if($isDateInput()) |
46 | | - <div class="input-group-text input-group-text-link"> |
47 | | - <a href="#" data-date-clear="#{{ $attributes->get('id') ?: $id() }}" class="{{ $clearBtnClass }}" title="{{ __('Clear') }}"> |
48 | | - <i class="{{ $clearIcon }}"></i> |
49 | | - </a> |
50 | | - </div> |
51 | | - @elseif(! empty($append)) |
52 | | - {{ $append }} |
53 | | - @endif |
54 | | - </div> |
| 43 | + @if($isDateInput() || (! empty($prepend)) || (! empty($append))) |
| 44 | + @if($isDateInput() || (! empty($append))) |
| 45 | + <div class="input-group-append"> |
| 46 | + @if($isDateInput()) |
| 47 | + <div class="input-group-text input-group-text-link"> |
| 48 | + <a href="#" data-date-clear="#{{ $attributes->get('id') ?: $id() }}" class="{{ $clearBtnClass }}" title="{{ __('Clear') }}"> |
| 49 | + <i class="{{ $clearIcon }}"></i> |
| 50 | + </a> |
| 51 | + </div> |
| 52 | + @elseif(! empty($append)) |
| 53 | + {{ $append }} |
| 54 | + @endif |
| 55 | + </div> |
| 56 | + @endif |
| 57 | + </div> |
55 | 58 | @endif |
56 | 59 | </div> |
57 | | - @endif |
58 | 60 |
|
59 | 61 | @if(! empty($help)) |
60 | 62 | <x-forms::input-help :framework="$framework" :attributes="$help->attributes"> |
|
0 commit comments