72 lines
3 KiB
PHP
72 lines
3 KiB
PHP
{{--
|
|
VARIABLE || COMMENT || TYPE || REQUIRED || DEFAULT
|
|
|
|
$id || The id of the input tag. || string || REQUIRED ||
|
|
$name || The name of the input tag. || string || REQUIRED ||
|
|
$helper || The helper of the input. || string || REQUIRED ||
|
|
$required || Is the field required ? || boolean || OPTIONNAL || false
|
|
$model || The model we're creating/editing || Model class || OPTIONNAL || null
|
|
--}}
|
|
|
|
<table class="table-striped table-hover table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
{{ __('Ligne') }}
|
|
</th>
|
|
<th>
|
|
{{ __('Valeur') }}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{-- FIRST LINE --}}
|
|
<tr>
|
|
<td>
|
|
<label class="col-form-label" for="{{ $id }}FirstLine">
|
|
{{ __('Première ligne') }} {{ $required ?? false ? '*' : '' }}
|
|
</label>
|
|
</td>
|
|
<td>
|
|
<input class="form-control @if ($errors->has($name)) is-invalid @endif" id="{{ $id }}FirstLine"
|
|
name="access_line[]" type="text" value="{{ old('first-access-line', $model->{$name}[0] ?? '') }}"
|
|
aria-describedby="{{ $id }}Help" placeholder="{{ __('6 minutes de la gare') }}"
|
|
@if (!empty($required)) required @endif>
|
|
</td>
|
|
</tr>
|
|
{{-- SECOND LINE --}}
|
|
<tr>
|
|
<td>
|
|
<label class="col-form-label" for="{{ $id }}SecondLine">
|
|
{{ __('Deuxième ligne') }} {{ $required ?? false ? '*' : '' }}
|
|
</label>
|
|
</td>
|
|
<td>
|
|
<input class="form-control @if ($errors->has($name)) is-invalid @endif" id="{{ $id }}SecondLine"
|
|
name="access_line[]" type="text" value="{{ old('second-access-line', $model->{$name}[1] ?? '') }}"
|
|
aria-describedby="{{ $id }}Help" placeholder="{{ __('6 minutes de la gare') }}"
|
|
@if (!empty($required)) required @endif>
|
|
</td>
|
|
</tr>
|
|
{{-- THIRD LINE --}}
|
|
<tr>
|
|
<td>
|
|
<label class="col-form-label" for="{{ $id }}ThirdLine">
|
|
{{ __('Troisième ligne') }} {{ $required ?? false ? '*' : '' }}
|
|
</label>
|
|
</td>
|
|
<td>
|
|
<input class="form-control @if ($errors->has($name)) is-invalid @endif" id="{{ $id }}ThirdLine"
|
|
name="access_line[]" type="text" value="{{ old('third-access-line', $model->{$name}[2] ?? '') }}"
|
|
aria-describedby="{{ $id }}Help" placeholder="{{ __('6 minutes de la gare') }}"
|
|
@if (!empty($required)) required @endif>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
@include('modules.input-error', [
|
|
'inputName' => $name,
|
|
'helperId' => $id . 'Help',
|
|
'helper' => $helper,
|
|
])
|