2024-08-14 12:19:53 +00:00
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
@if(isset($label))
|
|
|
|
<label {{ $attributes->only(['class']) }} for="{{ $id ?? $name }}">{{ $label }}</label>
|
|
|
|
@endisset
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
@if(isset($icon) || isset($prepend))
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<span class="input-group-text">@isset($icon)<i class="fas fa-fw {{ $icon }}"></i>@endisset @isset($prepend){!! $prepend !!}@endisset</span>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
<div class="w-100">
|
2024-08-22 11:42:02 +00:00
|
|
|
<textarea class="form-control {{ $class ?? ''}} @error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @isset($placeholder)placeholder="{{ $placeholder }}"@endisset @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>{{ old($old ?? $name,$value ?? '') }}</textarea>
|
2024-08-14 12:19:53 +00:00
|
|
|
<span class="invalid-feedback">
|
|
|
|
@error($old ?? $name)
|
|
|
|
{{ $message }}
|
|
|
|
@elseif(isset($feedback))
|
|
|
|
{{ $feedback }}
|
|
|
|
@enderror
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@isset($helper)
|
|
|
|
<span class="input-helper">{{ $helper }}</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@pa(simplemde)
|
|
|
|
|
|
|
|
@section('page-scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
new SimpleMDE({
|
|
|
|
element: $('#{{ $id ?? $name }}')[0],
|
|
|
|
forceSync: true
|
|
|
|
});
|
|
|
|
|
|
|
|
@error($old ?? $name)
|
|
|
|
$('div.CodeMirror-wrap').addClass('form-control is-invalid');
|
|
|
|
@enderror
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|