@if ($is_label)
{{-- titre --}}
@if ($item->type == 'heading')
{!! "<{$item->option('heading_level')}>{$item->title}{$item->option('heading_level')}>" !!}
@endif
{{-- Zone de texte --}}
@if ($item->type == 'text_field')
{!! $item->html !!}
@endif
{{-- Texte de fin --}}
@if ($item->type == 'ending_text')
{{-- Choix unique --}}
@if ($item->type == 'unique_choice')
@foreach ($answers as $key => $answer)
@endforeach
@include('quiz.answers.other_answer', [
'item' => $item,
'name' => $name,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'yes_no')
@endif
@if ($item->type == 'multiple_choice')
@foreach ($answers as $key => $answer)
@endforeach
@include('quiz.answers.other_answer', [
'item' => $item,
'answer' => $answer,
'name' => $name,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'date')
@if ($item?->option('input_model') !== null)
@include('quiz.answers.answer_hint', [
'message' => __('labels.LbDateExpectedFormat', [
'format' => $item?->option('input_model'),
]),
])
@endif
@include('quiz.answers.condition', [
'item' => $item,
'answer' => null,
'for_question' => true,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'numeric')
@php($min_max = $item->getMinMaxValues())
option('allow_decimals')) step=".01" @endif>
@include('quiz.answers.answer_hint', [
'message' => \App\Models\Question::mapQuestionsWithType($item)->getHint(),
])
@include('quiz.answers.condition', [
'item' => $item,
'answer' => null,
'for_question' => true,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'scale')
@component('components.forms.range-with-steps', [
'name' => $name,
'min' => $item?->option('minimum_value'),
'max' => $item?->option('maximum_value'),
'step' => $item?->option('step_value'),
'showDegrees' => true,
'displayMode' => $item?->option('display_all_values'),
'scale_style' => $item?->option('scale_style'),
'message' => [
'start' => $item?->option('scale_labels_start'),
'middle' => $item?->option('scale_labels_middle'),
'last' => $item?->option('scale_labels_end'),
],
])
@endcomponent
@include('quiz.answers.condition', [
'item' => $item,
'answer' => null,
'for_question' => true,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'ranking')
@if (!empty($item->option('message')))
{!! $item->option('message') !!}
@endif
@component('components.forms.ranking', [
'create_mode' => true,
'item' => $item,
'choices' => $item->answers,
'inputName' => $name,
'maximumChoicesAllowed' => $item->option('maximum_answers_required'),
'minimumChoicesAllowed' => $item->option('maximum_answers_required'),
'other_answer' => $item->option('other_answer'),
'id_child' => $id_child,
])
@endcomponent
@endif
@if ($item->type == 'free_text')
@php($input_model = $item?->option('input_model'))
@component('components.forms.input', [
'name' => $name,
'required' => true,
'type' => 'text',
'placeholder' => $customPlaceholder ?? strip_tags($item->title),
'rows' => 4,
'class' => 'm-0',
])
@endcomponent
@if (isset($input_model))
@include('quiz.answers.answer_hint', [
'message' => __('labels.LbQuestionInputModelHint2', [
'input_model' => $input_model,
]),
])
@endif
@include('quiz.answers.condition', [
'item' => $item,
'answer' => null,
'for_question' => true,
'id_child' => $id_child,
])
@endif
@if ($item->type == 'terms_condition')
@if (!empty($item->html))
{!! $item->html !!}
{{ __('labels.LbTermsConsditionTermsReadMore') }}
@endif
@if (!empty($item->option('agreement_text')))
@endif
@endif
@if (in_array($item->type, $item::$question_choices))
@component('components.forms.input', [
'type' => 'text',
'name' => 'other-asnwer',
'class' => 'other-asnwer',
'placeholder' => ' ', //__('labels.LbQuestionOtherAnswer'),
'rows' => 4,
])
@endcomponent
@endif
@endif