Skip to content

Commit 1739dde

Browse files
committed
- Fixed form-group-bar showing below texts in material admin
Signed-off-by: Arushad Ahmed <dash-8x@hotmail.com>
1 parent da2c615 commit 1739dde

File tree

2 files changed

+72
-68
lines changed

2 files changed

+72
-68
lines changed

resources/views/material-admin-26/input.blade.php

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,62 @@
11
<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
1416
@endif
15-
@endif
1617

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="&nbsp;"
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="&nbsp;"
35+
@endif
3436
@endif
37+
/>
38+
@if($showLabel)
39+
<i class="form-group__bar"></i>
3540
@endif
36-
/>
37-
@if($showLabel)
38-
<i class="form-group__bar"></i>
39-
@endif
4041

4142

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>
5558
@endif
5659
</div>
57-
@endif
5860

5961
@if(! empty($help))
6062
<x-forms::input-help :framework="$framework" :attributes="$help->attributes">

resources/views/material-admin-26/textarea.blade.php

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
<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-
<textarea
3-
{!! $attributes->merge([
4-
'class' => 'form-control' . ($hasError($name) ? ' is-invalid' : '') . ($wysiwyg ? ' wysiwyg' : ''),
5-
'required' => $required
6-
]) !!}
7-
type="{{ $type }}"
8-
name="{{ $name }}"
9-
rows="{{ $rows }}"
10-
@if($label && ! $attributes->get('id'))
11-
id="{{ $id() }}"
12-
@endif
13-
{{-- Placeholder is required as of writing --}}
14-
@if($floating || $placeholder)
15-
@if($placeholder)
16-
placeholder="{{ $placeholder }}"
17-
@else
18-
placeholder="&nbsp;"
2+
<div class="position-relative">
3+
<textarea
4+
{!! $attributes->merge([
5+
'class' => 'form-control' . ($hasError($name) ? ' is-invalid' : '') . ($wysiwyg ? ' wysiwyg' : ''),
6+
'required' => $required
7+
]) !!}
8+
type="{{ $type }}"
9+
name="{{ $name }}"
10+
rows="{{ $rows }}"
11+
@if($label && ! $attributes->get('id'))
12+
id="{{ $id() }}"
1913
@endif
20-
@endif
21-
>{!! $value !!}</textarea>
22-
<i class="form-group__bar"></i>
14+
{{-- Placeholder is required as of writing --}}
15+
@if($floating || $placeholder)
16+
@if($placeholder)
17+
placeholder="{{ $placeholder }}"
18+
@else
19+
placeholder="&nbsp;"
20+
@endif
21+
@endif
22+
>{!! $value !!}</textarea>
23+
<i class="form-group__bar"></i>
24+
</div>
2325

2426
@if(! empty($help))
2527
<x-forms::input-help :framework="$framework">

0 commit comments

Comments
 (0)