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
|
|
|
|
2020-02-01 13:32:43 +03:00
|
|
|
<div class="tab-pane tab-example-result fade show active" role="tabpanel" aria-labelledby="-component-tab">
|
|
|
|
<div class="btn-group btn-group-toggle radio-yes-no" data-toggle="buttons">
|
2021-04-26 18:37:14 +03:00
|
|
|
@if (empty($attributes['disabled']))
|
2020-02-01 13:32:43 +03:00
|
|
|
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} == 1 }">
|
|
|
|
{{ trans('general.yes') }}
|
2020-02-01 18:47:15 +03:00
|
|
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name) }}">
|
2020-02-01 13:32:43 +03:00
|
|
|
</label>
|
2021-04-26 18:37:14 +03:00
|
|
|
@else
|
|
|
|
<label class="btn btn-success{{ ($value) ? ' active-disabled disabled' : ' disabled' }}">
|
|
|
|
{{ trans('general.yes') }}
|
|
|
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" disabled>
|
|
|
|
</label>
|
|
|
|
@endif
|
2020-02-01 13:32:43 +03:00
|
|
|
|
2021-04-26 18:37:14 +03:00
|
|
|
@if (empty($attributes['disabled']))
|
2020-02-01 13:32:43 +03:00
|
|
|
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
|
|
|
|
{{ trans('general.no') }}
|
|
|
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name) }}">
|
|
|
|
</label>
|
2021-04-26 18:37:14 +03:00
|
|
|
@else
|
|
|
|
<label class="btn btn-danger{{ ($value) ? ' disabled' : ' active-disabled disabled' }}">
|
|
|
|
{{ trans('general.no') }}
|
|
|
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" disabled>
|
|
|
|
</label>
|
|
|
|
@endif
|
2020-02-01 13:32:43 +03:00
|
|
|
</div>
|
2020-02-01 18:47:15 +03:00
|
|
|
|
2020-02-01 18:52:08 +03:00
|
|
|
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? 1 : 0 }}" />
|
2017-09-14 22:21:00 +03:00
|
|
|
</div>
|
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')
|