PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
core
/
base
/
resources
/
views
/
forms
/
partials
@php Assets::addScriptsDirectly('vendor/core/core/base/js/repeater-field.js'); $group = ''; foreach ($fields as $key => $field) { $item = Form::hidden($name . '[__key__][' . $key . '][key]', $field['attributes']['name']); $field['attributes']['name'] = $name . '[__key__][' . $key . '][value]'; $field['attributes']['options']['id'] = md5($field['attributes']['name']); Arr::set($field, 'label_attr.for', $field['attributes']['options']['id']); $item .= Form::customLabel(Arr::get($field, 'attr.name'), $field['label'], Arr::get($field, 'label_attr')) . call_user_func_array([Form::class, $field['type']], array_values($field['attributes'])); $group .= '<div class="form-group">' . $item . '</div>'; } $defaultFields = ['<div class="repeater-item-group form-group mb-3">' . $group . '</div>']; $values = (array)json_decode($value ?: '[]', true); $added = []; if (count($values) > 0) { for ($i = 0; $i < count($values); $i++) { $group = ''; foreach ($fields as $key => $field) { $item = Form::hidden($name . '[' . $i . '][' . $key . '][key]', $field['attributes']['name']); $field['attributes']['name'] = $name . '[' . $i . '][' . $key . '][value]'; $field['attributes']['value'] = Arr::get($values, $i . '.' . $key. '.value'); $field['attributes']['options']['id'] = md5($field['attributes']['name']); Arr::set($field, 'label_attr.for', $field['attributes']['options']['id']); $item .= Form::customLabel(Arr::get($field, 'attr.name'), $field['label'], Arr::get($field, 'label_attr')) . call_user_func_array([Form::class, $field['type']], array_values($field['attributes'])); $group .= '<div class="form-group">' . $item . '</div>'; } $added[] = '<div class="repeater-item-group form-group mb-3">' . $group . '</div>'; } } @endphp <repeater-component :fields="{{ json_encode($defaultFields) }}" :added="{{ json_encode($added) }}"></repeater-component>
[-] error.blade.php
[edit]
[-] tree-category.blade.php
[edit]
[-] custom-select.blade.php
[edit]
[-] form-actions.blade.php
[edit]
[+]
..
[-] tree-categories.blade.php
[edit]
[-] google-fonts.blade.php
[edit]
[-] repeater.blade.php
[edit]
[-] file.blade.php
[edit]
[-] meta-box.blade.php
[edit]
[-] editor.blade.php
[edit]
[-] images.blade.php
[edit]
[-] helper.blade.php
[edit]
[-] toolbox.blade.php
[edit]
[-] image.blade.php
[edit]
[-] autocomplete.blade.php
[edit]
[-] custom-checkbox.blade.php
[edit]
[-] tinymce.blade.php
[edit]
[-] modal.blade.php
[edit]
[-] on-off.blade.php
[edit]
[-] image-box.blade.php
[edit]
[-] custom-radio.blade.php
[edit]
[-] errors.blade.php
[edit]
[-] status.blade.php
[edit]
[-] ckeditor.blade.php
[edit]
[-] color.blade.php
[edit]
[-] help-block.blade.php
[edit]