ldc-com-app-bo/resources/views/bo/partials/inputs/bigint-foreign-id.blade.php
Vincent BRIDIER 777d3e0e86 Multiple fix
2023-07-13 08:34:54 +00:00

16 lines
779 B
PHP

@if(!empty($label))
<label for="{{ $name }}" class="col-form-label"><b>{{ $label }} *</b></label>
@endif
<select id="bigIntForeignId{{ $name }}" class="form-select" name="{{ $name }}" aria-describedby="{{ $id }}Help" @if(!empty($label))required @endif>
<option value="0" @if (old($name, $model->{$name} ?? null) == null) selected @endif>{{ __('Aucun dossier associé') }}</option>
@foreach ($associatedModels as $_associatedModel)
<option value="{{ $_associatedModel->id }}" @if (old($name, $model->{$name} ?? null) == $_associatedModel->id) selected @endif>
{{ $_associatedModel->{$foreignLabel} }}
</option>
@endforeach
</select>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => $id . "Help",
'helper' => $helper
])