@php
if ($field->form_type_id == 3) {
$ISEditable = false;
}
@endphp
{{ __('forms.' . $label) }} |
@if ($field->fieldType->name == 'entity')
@php
$items = '';
$model_column = json_decode($field->model_column, true);
$name = $field->name;
$relation = $user->$name;
$fieldSources[$name] = [
'type' => $field->model_type,
'column' => $model_column,
];
@endphp
@include('users.profile.entity')
@elseif($field->fieldType->name == 'checkbox' || $field->fieldType->name == 'radio')
@include('users.profile.choice')
@if ($field->core)
@php
$fieldSources['profile[' . $field->name . ']'] = [
['value' => 1, 'text' => trans('forms.lbl_yes')],
['value' => 0, 'text' => trans('forms.lbl_no')],
];
@endphp
@else
@php
$fieldSources['metas[' . $field->id . ']'] = [
['value' => 1, 'text' => trans('forms.lbl_yes')],
['value' => 0, 'text' => trans('forms.lbl_no')],
];
@endphp
@endif
@else
@include('users.profile.default')
@if ($field->fieldType->name == 'select')
@php
$choices = json_decode($field->choices, true);
$resultedChoices = [];
foreach ($choices as $index => $choice) {
if ($index == 'male') {
$choice = trans('forms.lbl_male');
} elseif ($index == 'female') {
$choice = trans('forms.lbl_female');
} elseif ($index == 'yes') {
$choice = trans('forms.lbl_yes');
} elseif ($index == 'no') {
$choice = trans('forms.lbl_no');
}
$resultedChoices[] = [
'value' => $index,
'text' => $choice,
];
}
@endphp
@if ($field->core)
@php $fieldSources["profile[".$field->name."]"] = $resultedChoices; @endphp
@else
@php $fieldSources["metas[".$field->id."]"] = $resultedChoices; @endphp
@endif
@endif
@endif
|
@if ($field->name == 'contract_type')
@php $label = generateTranslationKey("Times extended"); @endphp