2020-01-16 15:39:37 +03:00
|
|
|
@foreach($fields as $field)
|
|
|
|
@php $type = $field['type']; @endphp
|
|
|
|
|
|
|
|
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
2020-01-20 10:34:10 +03:00
|
|
|
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
|
2020-01-18 19:24:29 +03:00
|
|
|
'data-field' => 'settings'
|
|
|
|
],
|
|
|
|
$field['attributes'])
|
|
|
|
) }}
|
2020-01-16 15:39:37 +03:00
|
|
|
@elseif ($type == 'textareaGroup')
|
2020-01-20 10:34:10 +03:00
|
|
|
{{ Form::$type($field['name'], $field['title']) }}
|
2020-07-07 13:36:58 +03:00
|
|
|
@elseif ($type == 'dateGroup')
|
|
|
|
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
|
|
|
|
'model' => 'form.settings'.'.'.$field['name']
|
|
|
|
],
|
|
|
|
$field['attributes'])
|
|
|
|
) }}
|
2020-01-16 15:39:37 +03:00
|
|
|
@elseif ($type == 'selectGroup')
|
2020-01-18 19:24:29 +03:00
|
|
|
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
|
|
|
|
'data-field' => 'settings'
|
|
|
|
],
|
|
|
|
$field['attributes'])
|
|
|
|
) }}
|
2020-01-16 15:39:37 +03:00
|
|
|
@elseif ($type == 'radioGroup')
|
2020-07-16 12:38:05 +03:00
|
|
|
{{ Form::$type($field['name'], $field['title'], $field['selected'] ?? true, $field['enable'], $field['disable'], array_merge([
|
2020-01-18 19:24:29 +03:00
|
|
|
'data-field' => 'settings'
|
|
|
|
],
|
|
|
|
$field['attributes'])
|
|
|
|
) }}
|
2020-01-16 15:39:37 +03:00
|
|
|
@elseif ($type == 'checkboxGroup')
|
2020-01-20 10:34:10 +03:00
|
|
|
{{ Form::$type($field['name'], $field['title'], $field['items'], $field['value'], $field['id'], array_merge([
|
2020-01-18 19:24:29 +03:00
|
|
|
'data-field' => 'settings'
|
|
|
|
],
|
|
|
|
$field['attributes'])
|
|
|
|
) }}
|
2020-01-16 15:39:37 +03:00
|
|
|
@endif
|
|
|
|
@endforeach
|