2018-08-04 19:07:32 +03:00
|
|
|
@stack($name . '_input_start')
|
|
|
|
|
2020-02-01 13:32:43 +03:00
|
|
|
<div
|
2020-02-01 18:47:15 +03:00
|
|
|
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
2021-03-25 23:34:16 +03:00
|
|
|
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
|
|
|
@if (isset($attributes['show']))
|
|
|
|
v-if="{{ $attributes['show'] }}"
|
|
|
|
@endif
|
|
|
|
>
|
2020-02-01 18:47:15 +03:00
|
|
|
@if (!empty($text))
|
|
|
|
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
|
|
|
@endif
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2021-06-28 14:21:43 +03:00
|
|
|
@php
|
|
|
|
$vue_key = '@input';
|
2021-06-29 20:14:52 +03:00
|
|
|
$vue_value = !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event.target.value' : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name . ' = $event.target.value' : 'form.' . $name . ' = $event.target.value');
|
2021-06-28 14:21:43 +03:00
|
|
|
|
|
|
|
if (!empty($attributes['enable-v-model'])) {
|
|
|
|
$vue_key = 'v-model';
|
2021-06-29 20:14:52 +03:00
|
|
|
$vue_value = !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name);
|
2021-06-28 14:21:43 +03:00
|
|
|
}
|
|
|
|
@endphp
|
|
|
|
|
2020-02-01 13:32:43 +03:00
|
|
|
{!! Form::textarea($name, $value, array_merge([
|
|
|
|
'class' => 'form-control',
|
|
|
|
'data-name' => $name,
|
|
|
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
2021-06-29 20:14:52 +03:00
|
|
|
$vue_key => $vue_value,
|
2020-02-01 13:32:43 +03:00
|
|
|
], $attributes)) !!}
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2020-02-01 13:32:43 +03:00
|
|
|
<div class="invalid-feedback d-block"
|
|
|
|
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
|
|
|
|
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
|
|
|
|
</div>
|
2019-11-16 10:21:14 +03:00
|
|
|
</div>
|
2018-08-04 19:07:32 +03:00
|
|
|
|
|
|
|
@stack($name . '_input_end')
|