added setting new form type..
This commit is contained in:
parent
4829c7728d
commit
24f0dbb961
|
|
@ -95,13 +95,27 @@
|
||||||
without-add-new
|
without-add-new
|
||||||
/>
|
/>
|
||||||
@break
|
@break
|
||||||
|
@case('toggle')
|
||||||
|
@case('toggleGroup')
|
||||||
|
@php $value = setting($module->getAlias() . '.' . $field['name'], $field['value'] ?? null); @endphp
|
||||||
|
|
||||||
|
<x-form.group.toggle
|
||||||
|
name="{{ $field['name'] }}"
|
||||||
|
label="{{ trans($field['title']) }}"
|
||||||
|
enable="{{ $field['enable'] ? trans($field['enable']) : '' }}"
|
||||||
|
disable="{{ $field['disable'] ? trans($field['disable']) : '' }}"
|
||||||
|
:value="$value"
|
||||||
|
:dynamic-attributes="$field['attributes']"
|
||||||
|
/>
|
||||||
|
@break
|
||||||
@default
|
@default
|
||||||
@php
|
@php
|
||||||
$type = str_replace('Group', '', $type);
|
$type = str_replace('Group', '', $type);
|
||||||
$componentName = 'form.group.' . $type;
|
$componentName = 'form.group.' . $type;
|
||||||
|
$value = setting($module->getAlias() . '.' . $field['name'], $field['value'] ?? null);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<x-dynamic-component :component="$componentName" name="{{ $field['name'] }}" label="{{ trans($field['title']) }}" :dynamic-attributes="$field['attributes']" />
|
<x-dynamic-component :component="$componentName" name="{{ $field['name'] }}" label="{{ trans($field['title']) }}" :value="$value" :dynamic-attributes="$field['attributes']" />
|
||||||
@endswitch
|
@endswitch
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue