fixed invoice_text custom input issue..

This commit is contained in:
Cüneyt Şentürk 2020-11-24 16:52:55 +03:00
parent 0705c1ec2f
commit 4d24ec013f

View File

@ -6,24 +6,23 @@
@if (!empty($text)) @if (!empty($text))
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!} {!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
@endif @endif
<div class="input-group-invoice-text"> <div class="input-group-invoice-text">
@foreach ($values as $input_key => $input_value) @foreach ($values as $radio_key => $radio_value)
<div class="custom-control custom-radio mb-2"> <div class="custom-control custom-radio mb-2">
<input <input
type="radio" type="radio"
id="{{ $name }}-{{ $input_key }}"
name="{{ $name }}" name="{{ $name }}"
id="{{ $name }}-{{ $radio_key }}"
v-model="form.{{ $name }}" v-model="form.{{ $name }}"
@change="form.errors.clear('{{ $name }}');" @change="form.errors.clear('{{ $name }}');"
class="custom-control-input" class="custom-control-input"
@if($selected == $input_value) @if($selected == $radio_key)
checked checked="checked"
@endif @endif
value="{{ $input_key }}"> value="{{ $radio_key }}">
<label for="{{ $name }}-{{ $input_key }}" class="custom-control-label"> {{ $input_value }} </label> <label for="{{ $name }}-{{ $radio_key }}" class="custom-control-label"> {{ $radio_value }} </label>
@if ($input_key == 'custom') @if ($radio_key == 'custom')
<div :class="[{'has-error': form.errors.get('{{ $input_name }}')}, form.{{ $name }} == 'custom' ? 'col-md-12' : 'd-none']" <div :class="[{'has-error': form.errors.get('{{ $input_name }}')}, form.{{ $name }} == 'custom' ? 'col-md-12' : 'd-none']"
style="margin-top: -25px; padding-left: 5.5rem;" style="margin-top: -25px; padding-left: 5.5rem;"
> >